@p8ec/shared 1.3.2 → 1.3.3

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.
@@ -37,11 +37,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  const path = __importStar(require("path"));
38
38
  const fs = __importStar(require("fs"));
39
39
  const ferramenta_1 = require("ferramenta");
40
+ const IS_DEV = process.env.NODE_ENV === 'development';
40
41
  const args = ferramenta_1.processArgs.args;
41
42
  const self = path.parse(ferramenta_1.processArgs.name).name;
42
43
  const writeLn = console.log;
43
44
  const writeFile = (name, data) => fs.writeFileSync(path.join(process.cwd(), name), data);
44
- const copyAsset = (name) => fs.copyFileSync(path.join(__dirname, '..', 'assets', name), path.join(process.cwd(), name));
45
+ const copyAsset = (name) => IS_DEV
46
+ ? fs.copyFileSync(path.join(__dirname, '..', 'assets', name), path.join(process.cwd(), name))
47
+ : fs.copyFileSync(path.join(__dirname, '..', '..', 'assets', name), path.join(process.cwd(), name));
45
48
  if (args.length === 0) {
46
49
  writeLn(`
47
50
  Usage: ${self} [command] [options]
@@ -52,6 +55,9 @@ Commands:
52
55
  Options:
53
56
  cleanup: Removes redundant configurations from package.json.
54
57
  `);
58
+ if (IS_DEV) {
59
+ writeLn(`DEVELOPMENT MODE`);
60
+ }
55
61
  process.exit(1);
56
62
  }
57
63
  const initCleanup = (packageJson) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@p8ec/shared",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "P(8) Global Shared Library",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18,7 +18,7 @@
18
18
  "build:types": "tsc -p configs/tsconfig.types.json",
19
19
  "build:assets": "cp -R src/assets dist",
20
20
  "clean": "rm -rf dist docs coverage",
21
- "cli": "ts-node src/bin/p8-shared-cli.ts",
21
+ "cli": "NODE_ENV=development ts-node src/bin/p8-shared-cli.ts",
22
22
  "reset": "npm run clean && rm -rf node_modules && npm install",
23
23
  "postinstall": "lefthook install",
24
24
  "test": "jest --no-cache --runInBand",