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