@mxpicture/build-cli 0.2.8 → 0.2.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 +10 -0
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -7,6 +7,7 @@ import { runFixDeps } from "@mxpicture/build-api/deps";
|
|
|
7
7
|
import { isAbsolute, join, resolve } from "node:path";
|
|
8
8
|
import { runNpmPublisher } from "@mxpicture/build-api/npmPublish";
|
|
9
9
|
import { consoleLogger, setLogger } from "@mxpicture/build-api/logger";
|
|
10
|
+
import { runBarrel } from "@mxpicture/build-api/barrel";
|
|
10
11
|
setLogger(consoleLogger);
|
|
11
12
|
const resolveRoot = (repoRoot) => isAbsolute(repoRoot) ? repoRoot : resolve(cwd(), repoRoot);
|
|
12
13
|
program.name("build-cli").version("1.0.0").description("Build CLI");
|
|
@@ -38,6 +39,15 @@ program
|
|
|
38
39
|
.action(async (repoRoot, workspacesName) => runNpmPublisher({
|
|
39
40
|
packagesDir: join(resolveRoot(repoRoot), workspacesName),
|
|
40
41
|
}));
|
|
42
|
+
program
|
|
43
|
+
.command("barrel")
|
|
44
|
+
.description("Create barrel files")
|
|
45
|
+
.addArgument(new Argument("[repoRoot]", "Repo root path").default(cwd()))
|
|
46
|
+
.addArgument(new Argument("[workspacesName]", "Name of workspaces location").default("packages"))
|
|
47
|
+
.action(async (repoRoot, workspacesName) => runBarrel({
|
|
48
|
+
repoRoot,
|
|
49
|
+
workspacesName,
|
|
50
|
+
}));
|
|
41
51
|
// program
|
|
42
52
|
// .command("extract-imports")
|
|
43
53
|
// .description("Extract Typescript Imports")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/build-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Build utilities CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@mxpicture/build-api": "^0.2.
|
|
35
|
+
"@mxpicture/build-api": "^0.2.9"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@commander-js/extra-typings": "^14.0.0",
|