js-dev-tool 1.2.10 → 1.2.12

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/lib/zip.min.js CHANGED
@@ -1,5 +1,6 @@
1
1
  /*! @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */
2
2
  /*! Copyright (C) 2018 jeffy-g <hirotom1107@gmail.com> Released under the MIT license https://opensource.org/licenses/mit-license.php */
3
+ // @ts-nocheck
3
4
  (function () {
4
5
  "use strict";
5
6
  var n = void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-dev-tool",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
4
4
  "bin": {
5
5
  "jstool": "tools.js"
6
6
  },
@@ -76,6 +76,8 @@
76
76
  "!regex-test.ts",
77
77
  "!extras/npm",
78
78
  "!/**/*.png",
79
+ "!*@*.js",
80
+ "!*fragments*",
79
81
  "!tool.sh"
80
82
  ],
81
83
  "peerDependencies": {
@@ -64,7 +64,7 @@ type TSpinners = {
64
64
  grenade: Dots;
65
65
  point: Dots;
66
66
  layer: Dots;
67
- }
67
+ };
68
68
  interface Dots {
69
69
  interval: number;
70
70
  frames: string[];
package/tool-lib/rws.js CHANGED
@@ -151,9 +151,8 @@ module.exports = (fs, utils) => {
151
151
  msg = `${this.taskName}: webpack size record created: [%s]`;
152
152
  }
153
153
  if (needWrite) {
154
- utils.writeText(
155
- JSON.stringify(sizeRecord, null, 2),
156
- recordPath,
154
+ utils.writeJson(
155
+ sizeRecord, recordPath,
157
156
  () => {
158
157
  console.log(msg, recordPath, entry);
159
158
  },
package/tools.js CHANGED
@@ -93,14 +93,14 @@ const ToolFunctions = {
93
93
  get help() {
94
94
  return `jstool -cmd replace [-after <replacement>] -regex \"/^\\s+<!--[\\s\\S]+?-->(?:\\r?\\n)?/gm\" [-targets "<path>,<path>,..." | <args: file, file file...>]
95
95
 
96
- ${"Options:".red}
97
- ${"after".cyan} ${`: If omitted, "" (empty string) is used, meaning that the matched string is deleted.`.gray(16)}
98
- ${"targets".cyan}${`: Single path string or Array type arg, "['<path>', '<path>',...]" or "<path>,<path>,..."`.gray(16)}
96
+ ${" Options:".red}
97
+ ${" after".cyan} ${`: If omitted, "" (empty string) is used, meaning that the matched string is deleted.`.gray(16)}
98
+ ${" targets".cyan}${`: Single path string or Array type arg, "['<path>', '<path>',...]" or "<path>,<path>,..."`.gray(16)}
99
99
 
100
- ${"remarks".magenta}${": targets - can use args parameter instead".gray(16)}${`
101
- It is better to use the <args: file, file file...>
102
- e.g - ${"jstool".yellow} ${"-cmd".green} ${"replace".cyan} ${"-after".green} ${`".."`.red} ${"-regex".green} ${String.raw`'re/(?<=reference path=")(\.)(?=\/index.d.ts")/'`.magenta} ${"build/**/*.js".gray(16)}
103
- ^^^^^^^^^^^^^
100
+ ${" remarks".magenta}${": targets - can use args parameter instead".gray(16)}${`
101
+ It is better to use the <args: file, file file...>
102
+ e.g - ${"jstool".yellow} ${"-cmd".green} ${"replace".cyan} ${"-after".green} ${`".."`.red} ${"-regex".green} ${String.raw`'re/(?<=reference path=")(\.)(?=\/index.d.ts")/'`.magenta} ${"build/**/*.js".gray(16)}
103
+ ^^^^^^^^^^^^^
104
104
  `.gray(16)}`;
105
105
  },
106
106
  },
package/tsconfig.json CHANGED
@@ -15,6 +15,9 @@
15
15
  "module": "nodenext",
16
16
  "outDir": "./dts",
17
17
  // "baseUrl": ".",
18
+ "types": [
19
+ "node"
20
+ ],
18
21
  "rootDir": ".",
19
22
  "paths": {
20
23
  "*": [
@@ -32,5 +35,7 @@
32
35
  ],
33
36
  "exclude": [
34
37
  "./**/npm-outdated*.js",
38
+ "./scripts/*.js",
39
+ "./lib/*.js",
35
40
  ]
36
41
  }