@deot/dev-linker 1.1.0 → 2.0.0
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/README.md +1 -3
- package/dist/index.cjs.js +24 -21
- package/dist/index.es.js +19 -18
- package/package.json +4 -3
package/README.md
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const chalk = require('chalk');
|
|
6
|
+
const ora = require('ora');
|
|
7
|
+
const devShared = require('@deot/dev-shared');
|
|
6
8
|
|
|
7
9
|
const run = (options) => devShared.Utils.autoCatch(async () => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
const locals = devShared.Locals.impl();
|
|
11
|
+
const { workspace, packageFolderNames } = locals;
|
|
12
|
+
if (!workspace) {
|
|
13
|
+
return devShared.Logger.log(`<link> Monorepo Supported Only.`);
|
|
14
|
+
}
|
|
15
|
+
if (typeof options.dryRun === "undefined") {
|
|
16
|
+
options.dryRun = process.env.NODE_ENV === "UNIT";
|
|
17
|
+
}
|
|
18
|
+
const command = `npx pnpm link ./${workspace}/`;
|
|
19
|
+
if (options.dryRun)
|
|
20
|
+
return devShared.Shell.spawn(`echo ${command}`);
|
|
21
|
+
const spinner = ora(`Links ...
|
|
22
|
+
`);
|
|
23
|
+
spinner.start();
|
|
24
|
+
await Promise.all(packageFolderNames.map((i) => {
|
|
25
|
+
return devShared.Shell.spawn(`${command}${i}`);
|
|
26
|
+
}));
|
|
27
|
+
spinner.stop();
|
|
28
|
+
devShared.Logger.log(`${chalk.green("Links Success")}`);
|
|
26
29
|
});
|
|
27
30
|
|
|
28
31
|
exports.run = run;
|
package/dist/index.es.js
CHANGED
|
@@ -3,24 +3,25 @@ import ora from 'ora';
|
|
|
3
3
|
import { Utils, Locals, Logger, Shell } from '@deot/dev-shared';
|
|
4
4
|
|
|
5
5
|
const run = (options) => Utils.autoCatch(async () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
const locals = Locals.impl();
|
|
7
|
+
const { workspace, packageFolderNames } = locals;
|
|
8
|
+
if (!workspace) {
|
|
9
|
+
return Logger.log(`<link> Monorepo Supported Only.`);
|
|
10
|
+
}
|
|
11
|
+
if (typeof options.dryRun === "undefined") {
|
|
12
|
+
options.dryRun = process.env.NODE_ENV === "UNIT";
|
|
13
|
+
}
|
|
14
|
+
const command = `npx pnpm link ./${workspace}/`;
|
|
15
|
+
if (options.dryRun)
|
|
16
|
+
return Shell.spawn(`echo ${command}`);
|
|
17
|
+
const spinner = ora(`Links ...
|
|
18
|
+
`);
|
|
19
|
+
spinner.start();
|
|
20
|
+
await Promise.all(packageFolderNames.map((i) => {
|
|
21
|
+
return Shell.spawn(`${command}${i}`);
|
|
22
|
+
}));
|
|
23
|
+
spinner.stop();
|
|
24
|
+
Logger.log(`${chalk.green("Links Success")}`);
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
export { run };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deot/dev-linker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"main": "dist/index.es.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@deot/dev-
|
|
17
|
-
"
|
|
16
|
+
"@deot/dev-shared": "^2.0.0",
|
|
17
|
+
"chalk": "^5.2.0",
|
|
18
|
+
"ora": "^6.1.2"
|
|
18
19
|
}
|
|
19
20
|
}
|