@docusaurus/core 2.0.0-beta.0e652730d → 2.0.0-beta.10
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/bin/beforeCli.js +125 -0
- package/bin/docusaurus.js +36 -105
- package/lib/.tsbuildinfo +1 -1
- package/lib/babel/preset.d.ts +6 -0
- package/lib/babel/preset.js +3 -3
- package/lib/choosePort.js +12 -13
- package/lib/client/.eslintrc.js +0 -1
- package/lib/client/.tsbuildinfo +1 -1
- package/lib/client/App.js +12 -22
- package/lib/client/LinksCollector.d.ts +2 -2
- package/lib/client/LinksCollector.js +4 -8
- package/lib/client/PendingNavigation.d.ts +24 -1
- package/lib/client/PendingNavigation.js +1 -1
- package/lib/client/baseUrlIssueBanner/BaseUrlIssueBanner.d.ts +5 -0
- package/lib/client/client-lifecycles-dispatcher.d.ts +2 -2
- package/lib/client/client-lifecycles-dispatcher.js +0 -2
- package/lib/client/docusaurus.d.ts +6 -0
- package/lib/client/docusaurus.js +11 -19
- package/lib/client/exports/BrowserOnly.js +5 -3
- package/lib/client/exports/ErrorBoundary.d.ts +18 -0
- package/lib/client/exports/ErrorBoundary.js +35 -0
- package/lib/client/exports/Interpolate.js +12 -15
- package/lib/client/exports/Link.js +11 -11
- package/lib/client/exports/Translate.d.ts +2 -2
- package/lib/client/exports/Translate.js +13 -9
- package/lib/client/exports/browserContext.d.ts +11 -0
- package/lib/client/exports/browserContext.js +21 -0
- package/lib/client/exports/constants.js +1 -11
- package/lib/client/exports/{context.d.ts → docusaurusContext.d.ts} +5 -3
- package/lib/client/exports/docusaurusContext.js +25 -0
- package/lib/client/exports/useBaseUrl.js +2 -4
- package/lib/client/exports/useDocusaurusContext.js +2 -7
- package/lib/client/exports/useGlobalData.js +1 -5
- package/lib/client/exports/{context.js → useIsBrowser.d.ts} +1 -2
- package/lib/{webpack/sharedModuleAliases.d.ts → client/exports/useIsBrowser.js} +5 -4
- package/lib/client/flat.d.ts +2 -1
- package/lib/client/flat.js +7 -9
- package/lib/client/normalizeLocation.d.ts +1 -3
- package/lib/client/prefetch.js +0 -1
- package/lib/client/serverEntry.js +15 -31
- package/lib/client/theme-fallback/Error/index.js +47 -0
- package/lib/client/theme-fallback/Layout/index.js +1 -1
- package/lib/client/theme-fallback/Loading/index.js +2 -2
- package/lib/client/theme-fallback/Root/index.js +1 -3
- package/lib/commands/build.js +37 -40
- package/lib/commands/clear.d.ts +6 -0
- package/lib/commands/clear.js +9 -9
- package/lib/commands/commandUtils.d.ts +6 -0
- package/lib/commands/commandUtils.js +7 -7
- package/lib/commands/deploy.d.ts +3 -0
- package/lib/commands/deploy.js +98 -53
- package/lib/commands/external.js +4 -4
- package/lib/commands/serve.js +13 -13
- package/lib/commands/start.js +83 -73
- package/lib/commands/swizzle.js +49 -49
- package/lib/commands/writeHeadingIds.d.ts +9 -6
- package/lib/commands/writeHeadingIds.js +32 -32
- package/lib/commands/writeTranslations.js +31 -11
- package/lib/server/brokenLinks.js +13 -17
- package/lib/server/client-modules/index.js +1 -3
- package/lib/server/config.js +4 -4
- package/lib/server/configValidation.d.ts +1 -1
- package/lib/server/configValidation.js +12 -7
- package/lib/server/duplicateRoutes.js +8 -2
- package/lib/server/html-tags/htmlTags.js +5 -6
- package/lib/server/html-tags/index.d.ts +2 -2
- package/lib/server/html-tags/index.js +3 -3
- package/lib/server/i18n.js +16 -13
- package/lib/server/index.js +129 -71
- package/lib/server/loadSetup.js +3 -3
- package/lib/server/moduleShorthand.d.ts +9 -0
- package/lib/server/moduleShorthand.js +42 -0
- package/lib/server/plugins/applyRouteTrailingSlash.d.ts +2 -1
- package/lib/server/plugins/applyRouteTrailingSlash.js +3 -3
- package/lib/server/plugins/index.d.ts +3 -4
- package/lib/server/plugins/index.js +44 -33
- package/lib/server/plugins/init.d.ts +2 -6
- package/lib/server/plugins/init.js +9 -12
- package/lib/server/plugins/pluginIds.d.ts +2 -2
- package/lib/server/plugins/pluginIds.js +6 -4
- package/lib/server/presets/index.js +12 -12
- package/lib/server/routes.js +41 -23
- package/lib/server/themes/alias.d.ts +3 -2
- package/lib/server/themes/alias.js +22 -12
- package/lib/server/themes/index.d.ts +6 -2
- package/lib/server/themes/index.js +32 -21
- package/lib/server/translations/translations.d.ts +10 -5
- package/lib/server/translations/translations.js +15 -17
- package/lib/server/translations/translationsExtractor.d.ts +8 -3
- package/lib/server/translations/translationsExtractor.js +65 -56
- package/lib/server/utils.d.ts +8 -2
- package/lib/server/utils.js +8 -10
- package/lib/server/versions/__fixtures__/dummy-plugin.d.ts +0 -0
- package/lib/server/versions/__tests/index.test.js +5 -5
- package/lib/server/versions/index.js +6 -6
- package/lib/webpack/base.js +29 -21
- package/lib/webpack/client.js +8 -17
- package/lib/webpack/plugins/CleanWebpackPlugin.js +4 -11
- package/lib/webpack/plugins/LogPlugin.js +5 -6
- package/lib/webpack/plugins/WaitPlugin.js +4 -4
- package/lib/webpack/server.js +13 -9
- package/lib/webpack/utils.d.ts +2 -23
- package/lib/webpack/utils.js +29 -127
- package/package.json +56 -51
- package/tsconfig.client.json +1 -2
- package/tsconfig.json +5 -4
- package/lib/commands/buildRemoteBranchUrl.d.ts +0 -7
- package/lib/commands/buildRemoteBranchUrl.js +0 -27
- package/lib/constants.d.ts +0 -18
- package/lib/constants.js +0 -23
- package/lib/webpack/react-dev-utils-webpack5/README.md +0 -11
- package/lib/webpack/react-dev-utils-webpack5/evalSourceMapMiddleware.js +0 -57
- package/lib/webpack/react-dev-utils-webpack5/formatWebpackMessages.js +0 -138
- package/lib/webpack/react-dev-utils-webpack5/webpackHotDevClient.js +0 -285
- package/lib/webpack/sharedModuleAliases.js +0 -18
package/bin/beforeCli.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const chalk = require('chalk');
|
|
9
|
+
const fs = require('fs-extra');
|
|
10
|
+
const semver = require('semver');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const updateNotifier = require('update-notifier');
|
|
13
|
+
const boxen = require('boxen');
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
name,
|
|
17
|
+
version,
|
|
18
|
+
engines: {node: requiredVersion},
|
|
19
|
+
} = require('../package.json');
|
|
20
|
+
|
|
21
|
+
// Notify user if @docusaurus packages is outdated
|
|
22
|
+
//
|
|
23
|
+
// Note: this is a 2-step process to avoid delaying cli usage by awaiting a response:
|
|
24
|
+
// - 1st run: trigger background job to check releases + store result
|
|
25
|
+
// - 2nd run: display potential update to users
|
|
26
|
+
//
|
|
27
|
+
// Note: even if the
|
|
28
|
+
//
|
|
29
|
+
// cache data is stored in ~/.config/configstore/update-notifier-@docusaurus
|
|
30
|
+
//
|
|
31
|
+
const notifier = updateNotifier({
|
|
32
|
+
pkg: {
|
|
33
|
+
name,
|
|
34
|
+
version,
|
|
35
|
+
},
|
|
36
|
+
// Check is in background so it's fine to use a small value like 1h
|
|
37
|
+
// Use 0 for debugging
|
|
38
|
+
updateCheckInterval: 1000 * 60 * 60,
|
|
39
|
+
// updateCheckInterval: 0
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// Hacky way to ensure we check for updates on first run
|
|
43
|
+
// Note: the notification will only happen in the 2nd run
|
|
44
|
+
// See https://github.com/yeoman/update-notifier/issues/209
|
|
45
|
+
try {
|
|
46
|
+
if (
|
|
47
|
+
notifier.config &&
|
|
48
|
+
!notifier.disabled &&
|
|
49
|
+
Date.now() - notifier.config.get('lastUpdateCheck') < 50
|
|
50
|
+
) {
|
|
51
|
+
notifier.config.set('lastUpdateCheck', 0);
|
|
52
|
+
notifier.check();
|
|
53
|
+
}
|
|
54
|
+
} catch (e) {
|
|
55
|
+
// Do not stop cli if this fails, see https://github.com/facebook/docusaurus/issues/5400
|
|
56
|
+
console.error(e);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// We don't want to display update message for canary releases
|
|
60
|
+
// See https://github.com/facebook/docusaurus/issues/5378
|
|
61
|
+
function ignoreUpdate(update) {
|
|
62
|
+
const isCanaryRelease =
|
|
63
|
+
update && update.current && update.current.startsWith('0.0.0');
|
|
64
|
+
return isCanaryRelease;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (
|
|
68
|
+
notifier.config &&
|
|
69
|
+
notifier.update &&
|
|
70
|
+
semver.lt(notifier.update.current, notifier.update.latest)
|
|
71
|
+
) {
|
|
72
|
+
// Because notifier clears cached data after reading it, leading to notifier not consistently displaying the update
|
|
73
|
+
// See https://github.com/yeoman/update-notifier/issues/209
|
|
74
|
+
notifier.config.set('update', notifier.update);
|
|
75
|
+
|
|
76
|
+
if (ignoreUpdate(notifier.update)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
81
|
+
const sitePkg = require(path.resolve(process.cwd(), 'package.json'));
|
|
82
|
+
const siteDocusaurusPackagesForUpdate = Object.keys({
|
|
83
|
+
...sitePkg.dependencies,
|
|
84
|
+
...sitePkg.devDependencies,
|
|
85
|
+
})
|
|
86
|
+
.filter((p) => p.startsWith('@docusaurus'))
|
|
87
|
+
.map((p) => p.concat('@latest'))
|
|
88
|
+
.join(' ');
|
|
89
|
+
const isYarnUsed = fs.existsSync(path.resolve(process.cwd(), 'yarn.lock'));
|
|
90
|
+
const upgradeCommand = isYarnUsed
|
|
91
|
+
? `yarn upgrade ${siteDocusaurusPackagesForUpdate}`
|
|
92
|
+
: `npm i ${siteDocusaurusPackagesForUpdate}`;
|
|
93
|
+
|
|
94
|
+
const boxenOptions = {
|
|
95
|
+
padding: 1,
|
|
96
|
+
margin: 1,
|
|
97
|
+
align: 'center',
|
|
98
|
+
borderColor: 'yellow',
|
|
99
|
+
borderStyle: 'round',
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const docusaurusUpdateMessage = boxen(
|
|
103
|
+
`Update available ${chalk.dim(`${notifier.update.current}`)}${chalk.reset(
|
|
104
|
+
' → ',
|
|
105
|
+
)}${chalk.green(
|
|
106
|
+
`${notifier.update.latest}`,
|
|
107
|
+
)}\n\nTo upgrade Docusaurus packages with the latest version, run the following command:\n${chalk.cyan(
|
|
108
|
+
`${upgradeCommand}`,
|
|
109
|
+
)}`,
|
|
110
|
+
boxenOptions,
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
console.log(docusaurusUpdateMessage);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// notify user if node version needs to be updated
|
|
117
|
+
if (!semver.satisfies(process.version, requiredVersion)) {
|
|
118
|
+
console.log(
|
|
119
|
+
chalk.red(`\nMinimum Node version not met :(`) +
|
|
120
|
+
chalk.yellow(
|
|
121
|
+
`\n\nYou are using Node ${process.version}. We require Node ${requiredVersion} or up!\n`,
|
|
122
|
+
),
|
|
123
|
+
);
|
|
124
|
+
process.exit(1);
|
|
125
|
+
}
|
package/bin/docusaurus.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// TODO remove when fixed: https://github.com/Stuk/eslint-plugin-header/issues/39
|
|
4
|
-
/* eslint-disable header/header */
|
|
5
2
|
/**
|
|
6
3
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
4
|
*
|
|
@@ -10,12 +7,8 @@
|
|
|
10
7
|
*/
|
|
11
8
|
|
|
12
9
|
const chalk = require('chalk');
|
|
13
|
-
const fs = require('fs
|
|
14
|
-
const semver = require('semver');
|
|
15
|
-
const path = require('path');
|
|
10
|
+
const fs = require('fs');
|
|
16
11
|
const cli = require('commander');
|
|
17
|
-
const updateNotifier = require('update-notifier');
|
|
18
|
-
const boxen = require('boxen');
|
|
19
12
|
const {
|
|
20
13
|
build,
|
|
21
14
|
swizzle,
|
|
@@ -27,69 +20,10 @@ const {
|
|
|
27
20
|
writeTranslations,
|
|
28
21
|
writeHeadingIds,
|
|
29
22
|
} = require('../lib');
|
|
30
|
-
const {
|
|
31
|
-
name,
|
|
32
|
-
version,
|
|
33
|
-
engines: {node: requiredVersion},
|
|
34
|
-
} = require('../package.json');
|
|
35
|
-
|
|
36
|
-
// notify user if @docusaurus packages is outdated
|
|
37
|
-
const notifier = updateNotifier({
|
|
38
|
-
pkg: {
|
|
39
|
-
name,
|
|
40
|
-
version,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
23
|
|
|
44
|
-
|
|
45
|
-
if (notifier.lastUpdateCheck === Date.now()) {
|
|
46
|
-
notifier.lastUpdateCheck = 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (notifier.update && semver.gt(this.update.latest, this.update.current)) {
|
|
50
|
-
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
51
|
-
const sitePkg = require(path.resolve(process.cwd(), 'package.json'));
|
|
52
|
-
const siteDocusaurusPackagesForUpdate = Object.keys(sitePkg.dependencies)
|
|
53
|
-
.filter((p) => p.startsWith('@docusaurus'))
|
|
54
|
-
.map((p) => p.concat('@latest'))
|
|
55
|
-
.join(' ');
|
|
56
|
-
const isYarnUsed = fs.existsSync(path.resolve(process.cwd(), 'yarn.lock'));
|
|
57
|
-
const upgradeCommand = isYarnUsed
|
|
58
|
-
? `yarn upgrade ${siteDocusaurusPackagesForUpdate}`
|
|
59
|
-
: `npm i ${siteDocusaurusPackagesForUpdate}`;
|
|
24
|
+
require('./beforeCli');
|
|
60
25
|
|
|
61
|
-
|
|
62
|
-
padding: 1,
|
|
63
|
-
margin: 1,
|
|
64
|
-
align: 'center',
|
|
65
|
-
borderColor: 'yellow',
|
|
66
|
-
borderStyle: 'round',
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const docusaurusUpdateMessage = boxen(
|
|
70
|
-
`Update available ${chalk.dim(`${notifier.update.current}`)}${chalk.reset(
|
|
71
|
-
' → ',
|
|
72
|
-
)}${chalk.green(
|
|
73
|
-
`${notifier.update.latest}`,
|
|
74
|
-
)}\n\nTo upgrade Docusaurus packages with the latest version, run the following command:\n${chalk.cyan(
|
|
75
|
-
`${upgradeCommand}`,
|
|
76
|
-
)}`,
|
|
77
|
-
boxenOptions,
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
console.log(docusaurusUpdateMessage);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// notify user if node version needs to be updated
|
|
84
|
-
if (!semver.satisfies(process.version, requiredVersion)) {
|
|
85
|
-
console.log(
|
|
86
|
-
chalk.red(`\nMinimum Node.js version not met :(`) +
|
|
87
|
-
chalk.yellow(
|
|
88
|
-
`\n\nYou are using Node.js ${process.version}. We require Node.js ${requiredVersion} or up!\n`,
|
|
89
|
-
),
|
|
90
|
-
);
|
|
91
|
-
process.exit(1);
|
|
92
|
-
}
|
|
26
|
+
const resolveDir = (dir = '.') => fs.realpathSync(dir);
|
|
93
27
|
|
|
94
28
|
cli.version(require('../package.json').version).usage('<command> [options]');
|
|
95
29
|
|
|
@@ -116,8 +50,8 @@ cli
|
|
|
116
50
|
'--no-minify',
|
|
117
51
|
'build website without minimizing JS bundles (default: false)',
|
|
118
52
|
)
|
|
119
|
-
.action((siteDir
|
|
120
|
-
build(
|
|
53
|
+
.action((siteDir, {bundleAnalyzer, config, outDir, locale, minify}) => {
|
|
54
|
+
build(resolveDir(siteDir), {
|
|
121
55
|
bundleAnalyzer,
|
|
122
56
|
outDir,
|
|
123
57
|
config,
|
|
@@ -134,14 +68,8 @@ cli
|
|
|
134
68
|
'copy TypeScript theme files when possible (default: false)',
|
|
135
69
|
)
|
|
136
70
|
.option('--danger', 'enable swizzle for internal component of themes')
|
|
137
|
-
.action((themeName, componentName, siteDir
|
|
138
|
-
swizzle(
|
|
139
|
-
path.resolve(siteDir),
|
|
140
|
-
themeName,
|
|
141
|
-
componentName,
|
|
142
|
-
typescript,
|
|
143
|
-
danger,
|
|
144
|
-
);
|
|
71
|
+
.action((themeName, componentName, siteDir, {typescript, danger}) => {
|
|
72
|
+
swizzle(resolveDir(siteDir), themeName, componentName, typescript, danger);
|
|
145
73
|
});
|
|
146
74
|
|
|
147
75
|
cli
|
|
@@ -163,8 +91,8 @@ cli
|
|
|
163
91
|
'--skip-build',
|
|
164
92
|
'skip building website before deploy it (default: false)',
|
|
165
93
|
)
|
|
166
|
-
.action((siteDir
|
|
167
|
-
deploy(
|
|
94
|
+
.action((siteDir, {outDir, skipBuild, config}) => {
|
|
95
|
+
deploy(resolveDir(siteDir), {
|
|
168
96
|
outDir,
|
|
169
97
|
config,
|
|
170
98
|
skipBuild,
|
|
@@ -190,19 +118,17 @@ cli
|
|
|
190
118
|
'--poll [interval]',
|
|
191
119
|
'use polling rather than watching for reload (default: false). Can specify a poll interval in milliseconds',
|
|
192
120
|
)
|
|
193
|
-
.action(
|
|
194
|
-
(siteDir
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
},
|
|
205
|
-
);
|
|
121
|
+
.action((siteDir, {port, host, locale, config, hotOnly, open, poll}) => {
|
|
122
|
+
start(resolveDir(siteDir), {
|
|
123
|
+
port,
|
|
124
|
+
host,
|
|
125
|
+
locale,
|
|
126
|
+
config,
|
|
127
|
+
hotOnly,
|
|
128
|
+
open,
|
|
129
|
+
poll,
|
|
130
|
+
});
|
|
131
|
+
});
|
|
206
132
|
|
|
207
133
|
cli
|
|
208
134
|
.command('serve [siteDir]')
|
|
@@ -220,7 +146,7 @@ cli
|
|
|
220
146
|
.option('-h, --host <host>', 'use specified host (default: localhost)')
|
|
221
147
|
.action(
|
|
222
148
|
(
|
|
223
|
-
siteDir
|
|
149
|
+
siteDir,
|
|
224
150
|
{
|
|
225
151
|
dir = 'build',
|
|
226
152
|
port = 3000,
|
|
@@ -229,7 +155,7 @@ cli
|
|
|
229
155
|
config,
|
|
230
156
|
},
|
|
231
157
|
) => {
|
|
232
|
-
serve(
|
|
158
|
+
serve(resolveDir(siteDir), {
|
|
233
159
|
dir,
|
|
234
160
|
port,
|
|
235
161
|
build: buildSite,
|
|
@@ -242,8 +168,8 @@ cli
|
|
|
242
168
|
cli
|
|
243
169
|
.command('clear [siteDir]')
|
|
244
170
|
.description('Remove build artifacts.')
|
|
245
|
-
.action((siteDir
|
|
246
|
-
clear(
|
|
171
|
+
.action((siteDir) => {
|
|
172
|
+
clear(resolveDir(siteDir));
|
|
247
173
|
});
|
|
248
174
|
|
|
249
175
|
cli
|
|
@@ -267,10 +193,10 @@ cli
|
|
|
267
193
|
)
|
|
268
194
|
.action(
|
|
269
195
|
(
|
|
270
|
-
siteDir
|
|
196
|
+
siteDir,
|
|
271
197
|
{locale = undefined, override = false, messagePrefix = '', config},
|
|
272
198
|
) => {
|
|
273
|
-
writeTranslations(
|
|
199
|
+
writeTranslations(resolveDir(siteDir), {
|
|
274
200
|
locale,
|
|
275
201
|
override,
|
|
276
202
|
config,
|
|
@@ -280,11 +206,16 @@ cli
|
|
|
280
206
|
);
|
|
281
207
|
|
|
282
208
|
cli
|
|
283
|
-
.command('write-heading-ids [contentDir]')
|
|
209
|
+
.command('write-heading-ids [contentDir] [files]')
|
|
284
210
|
.description('Generate heading ids in Markdown content.')
|
|
285
|
-
.
|
|
286
|
-
|
|
287
|
-
|
|
211
|
+
.option(
|
|
212
|
+
'--maintain-case',
|
|
213
|
+
"keep the headings' casing, otherwise make all lowercase (default: false)",
|
|
214
|
+
)
|
|
215
|
+
.option('--overwrite', 'overwrite existing heading IDs (default: false)')
|
|
216
|
+
.action((siteDir, files, options) =>
|
|
217
|
+
writeHeadingIds(resolveDir(siteDir), files, options),
|
|
218
|
+
);
|
|
288
219
|
|
|
289
220
|
cli.arguments('<command>').action((cmd) => {
|
|
290
221
|
cli.outputHelp();
|
|
@@ -307,7 +238,7 @@ function isInternalCommand(command) {
|
|
|
307
238
|
|
|
308
239
|
async function run() {
|
|
309
240
|
if (!isInternalCommand(process.argv.slice(2)[0])) {
|
|
310
|
-
await externalCommand(cli,
|
|
241
|
+
await externalCommand(cli, resolveDir('.'));
|
|
311
242
|
}
|
|
312
243
|
|
|
313
244
|
cli.parse(process.argv);
|