UNPKG

414 BJavaScriptView Raw
1const path = require('path')
2const JoyCon = require('joycon').default
3const { SHERRY_CONFIG_FILE } = require('./env')
4
5const joycon = new JoyCon({
6 files: [`${SHERRY_CONFIG_FILE}.js`, `${SHERRY_CONFIG_FILE}.json`]
7})
8
9module.exports = cwd =>
10 joycon.load({
11 cwd,
12 stopDir: path.dirname(cwd)
13 })
14
15module.exports.hasConfig = cwd => {
16 return joycon.resolve({
17 cwd,
18 stopDir: path.dirname(cwd)
19 })
20}