@dword-design/base 9.0.7 → 9.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +5 -6
- package/dist/load-config/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5,10 +5,9 @@ import makeCli from 'make-cli';
|
|
|
5
5
|
import { Base } from "./index.js";
|
|
6
6
|
import loadConfig from "./load-config/index.js";
|
|
7
7
|
const run = async () => {
|
|
8
|
-
const
|
|
9
|
-
const base = new Base(config);
|
|
8
|
+
const base = new Base(await loadConfig());
|
|
10
9
|
try {
|
|
11
|
-
var _ref, _checkUnknownFiles$co,
|
|
10
|
+
var _ref, _checkUnknownFiles$co, _base$config$commands;
|
|
12
11
|
await makeCli({
|
|
13
12
|
commands: (_ref = (_checkUnknownFiles$co = {
|
|
14
13
|
checkUnknownFiles: {
|
|
@@ -27,7 +26,7 @@ const run = async () => {
|
|
|
27
26
|
prepare: {
|
|
28
27
|
handler: () => base.prepare()
|
|
29
28
|
},
|
|
30
|
-
...(config.testInContainer && {
|
|
29
|
+
...(base.config.testInContainer && {
|
|
31
30
|
'test:raw': {
|
|
32
31
|
arguments: '[pattern]',
|
|
33
32
|
handler: (pattern, options) => base.testRaw({
|
|
@@ -57,9 +56,9 @@ const run = async () => {
|
|
|
57
56
|
name: '-u, --update-snapshots'
|
|
58
57
|
}]
|
|
59
58
|
},
|
|
60
|
-
...(
|
|
59
|
+
...(_base$config$commands = base.config.commands, mapValues(command => typeof command === 'function' ? {
|
|
61
60
|
handler: command
|
|
62
|
-
} : command)(
|
|
61
|
+
} : command)(_base$config$commands))
|
|
63
62
|
}, mapValues((command, name) => ({
|
|
64
63
|
name,
|
|
65
64
|
...command
|
|
@@ -5,7 +5,7 @@ export default (async () => {
|
|
|
5
5
|
const explorer = cosmiconfig('base', {
|
|
6
6
|
packageProp: 'baseConfig'
|
|
7
7
|
});
|
|
8
|
-
let config = (_ref = (_explorer$search = explorer.search(), await _explorer$search), property('config')(_ref))
|
|
8
|
+
let config = (_ref = (_explorer$search = explorer.search(), await _explorer$search), property('config')(_ref));
|
|
9
9
|
if (typeof config === 'string') {
|
|
10
10
|
config = {
|
|
11
11
|
name: config
|