js-dev-tool 1.0.8 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-dev-tool",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "bin": {
5
5
  "jstool": "tools.js"
6
6
  },
@@ -35,25 +35,19 @@ const wppHandlerV4 = ((renderer, cwd) => {
35
35
  };
36
36
  })(lib.renderLine, process.cwd());
37
37
  /** @type {TWebpackProgressHandler} */
38
- const wppHandlerV5 = ((renderer, cwd) => {
39
- const cwdLen = cwd.length;
38
+ const wppHandlerV5 = ((renderer/*, cwd*/) => {
39
+ const maxLen = 70;
40
40
  return (percentage, message, ...args) => {
41
41
  if (!message) {
42
42
  message = "- done -";
43
43
  }
44
44
  let pathOrPluginName = args.shift() || "";
45
- if (pathOrPluginName) {
46
- const x = pathOrPluginName.lastIndexOf(cwd) + 1;
47
- if (x > 0) {
48
- pathOrPluginName = pathOrPluginName.slice(x + cwdLen);
49
- }
50
- }
51
45
  renderer(
52
- `pct: ${(percentage * 100).toFixed(4)}%, process: [${message}]${pathOrPluginName ? `, info: [${pathOrPluginName}]` : ""}${args.length ? " - " : ""}${args.join(", ")}`,
46
+ `pct: ${(percentage * 100).toFixed(4)}%, process: [${message}]${pathOrPluginName ? `, info: [${pathOrPluginName}]` : ""}${args.length ? " - " : ""}${args[0]?.slice(args[0].length - maxLen) || ""}`,
53
47
  );
54
48
  percentage === 1 && console.log();
55
49
  };
56
- })(lib.renderLine, process.cwd());
50
+ })(lib.renderLine/*, process.cwd()*/);
57
51
  /** @type {boolean} */
58
52
  let checkedCache;
59
53
  /**
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "1.0.8"
2
+ "version": "1.0.9"
3
3
  }
package/tool-lib/cjbm.js CHANGED
@@ -120,12 +120,13 @@ module.exports = () => {
120
120
  },
121
121
  get help() {
122
122
  return `${this.taskName}
123
- ex - jstool -cmd cjbm [-root ./build | -basePath "./dist/esm,extra-tests/mini-semaphore"] [-ext js] [-targets "['core.js', 'object.js']"]
123
+ ex - jstool -cmd cjbm [-root ./build | -basePath "./dist/esm,extra-tests/mini-semaphore"] [-ext js] [-test /\\.js$/] [-targets "['core.js', 'object.js']"]
124
124
  note:
125
125
  root - Recursively searches for files.
126
126
  This option is useful, but if there are directories that need to be avoided, use the 'basePath' option
127
127
  basePath - can be "<path>,<path>,..." (array type arg)
128
128
  ext - specifies the module extension for import clauses. default is "js"
129
+ test - Any file extension can be specified. (The default is /\\.js$/)
129
130
  targets - specify this if you want to apply it only to a specific file.
130
131
  the file specified here should be directly under \`basePath\`!
131
132
  value must be array type arg, "['<path>', '<path>',...]" or "<path>,<path>,..."