UNPKG

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