copy-file-util 0.1.4 → 0.1.5
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 +3 -1
- package/bin/cli.js +1 -1
- package/dist/copy-file.d.ts +1 -1
- package/dist/copy-file.js +1 -1
- package/dist/copy-file.umd.cjs +1 -1
- package/package.json +19 -15
package/README.md
CHANGED
|
@@ -51,10 +51,11 @@ Command-line flags:
|
|
|
51
51
|
| ---------- | ---------------------------------------------- | ---------- |
|
|
52
52
|
| `--cd` | Change working directory before starting copy. | **string** |
|
|
53
53
|
| `--folder` | Indicates the target is a folder. | N/A |
|
|
54
|
+
| `--note` | Place to add a comment only for humans. | **string** |
|
|
54
55
|
| `--quiet` | Suppress informational messages. | N/A |
|
|
55
56
|
|
|
56
57
|
Examples:
|
|
57
|
-
- `copy-file app.js app.mjs --
|
|
58
|
+
- `copy-file app.js app.mjs --quiet` Displays no output.
|
|
58
59
|
- `copy-file app.js --folder dist` Copies **app.js** into the **dist** folder.
|
|
59
60
|
|
|
60
61
|
### 4. Template Variables
|
|
@@ -84,6 +85,7 @@ See the **TypeScript Declarations** at the top of [copy-file.ts](copy-file.ts) f
|
|
|
84
85
|
- 📂 [copy-folder-util](https://github.com/center-key/copy-folder-util): _Recursively copy files from one folder to another folder_
|
|
85
86
|
- 🔍 [replacer-util](https://github.com/center-key/replacer-util): _Find and replace strings or template outputs in text files_
|
|
86
87
|
- 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets): _Revision web asset filenames with cache busting content hash fingerprints_
|
|
88
|
+
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util): _Organize npm scripts into named groups of easy to manage commands_
|
|
87
89
|
- 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator): _Check the markup validity of HTML files using the W3C validator_
|
|
88
90
|
|
|
89
91
|
Feel free to submit questions at:<br>
|
package/bin/cli.js
CHANGED
|
@@ -28,7 +28,7 @@ import fs from 'fs';
|
|
|
28
28
|
import log from 'fancy-log';
|
|
29
29
|
|
|
30
30
|
// Parameters
|
|
31
|
-
const validFlags = ['cd', 'folder', 'quiet'];
|
|
31
|
+
const validFlags = ['cd', 'folder', 'note', 'quiet'];
|
|
32
32
|
const args = process.argv.slice(2);
|
|
33
33
|
const flags = args.filter(arg => /^--/.test(arg));
|
|
34
34
|
const flagMap = Object.fromEntries(flags.map(flag => flag.replace(/^--/, '').split('=')));
|
package/dist/copy-file.d.ts
CHANGED
package/dist/copy-file.js
CHANGED
package/dist/copy-file.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! copy-file-util v0.1.
|
|
1
|
+
//! copy-file-util v0.1.5 ~~ https://github.com/center-key/copy-file-util ~~ MIT License
|
|
2
2
|
|
|
3
3
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copy-file-util",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Copy or rename a file with optional package version number (CLI tool designed for use in npm scripts)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -63,15 +63,19 @@
|
|
|
63
63
|
"@typescript-eslint/no-non-null-assertion": "off"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
+
"runScriptsConfig": {
|
|
67
|
+
"build": [
|
|
68
|
+
"rimraf build dist spec/fixtures/target **/.DS_Store",
|
|
69
|
+
"jshint . --exclude-path .gitignore",
|
|
70
|
+
"eslint --max-warnings 0 . --ext .ts",
|
|
71
|
+
"tsc",
|
|
72
|
+
"tsc --module UMD --outDir build/umd",
|
|
73
|
+
"cpy build/umd/copy-file.js build --rename=copy-file.umd.cjs --flat=true",
|
|
74
|
+
"add-dist-header build dist"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
66
77
|
"scripts": {
|
|
67
|
-
"
|
|
68
|
-
"step:02": "jshint . --exclude-path .gitignore",
|
|
69
|
-
"step:03": "eslint --max-warnings 0 . --ext .ts",
|
|
70
|
-
"step:04": "tsc",
|
|
71
|
-
"step:05": "tsc --module UMD --outDir build/umd",
|
|
72
|
-
"step:06": "cpy build/umd/copy-file.js build --rename=copy-file.umd.cjs --flat=true",
|
|
73
|
-
"step:07": "add-dist-header build dist",
|
|
74
|
-
"pretest": "npm-run-all step:*",
|
|
78
|
+
"pretest": "run-scripts build",
|
|
75
79
|
"test": "mocha spec/*.spec.js"
|
|
76
80
|
},
|
|
77
81
|
"dependencies": {
|
|
@@ -82,17 +86,17 @@
|
|
|
82
86
|
},
|
|
83
87
|
"devDependencies": {
|
|
84
88
|
"@types/fancy-log": "~2.0",
|
|
85
|
-
"@types/node": "~18.
|
|
86
|
-
"@typescript-eslint/eslint-plugin": "~5.
|
|
87
|
-
"@typescript-eslint/parser": "~5.
|
|
89
|
+
"@types/node": "~18.11",
|
|
90
|
+
"@typescript-eslint/eslint-plugin": "~5.42",
|
|
91
|
+
"@typescript-eslint/parser": "~5.42",
|
|
88
92
|
"add-dist-header": "~0.3",
|
|
89
93
|
"assert-deep-strict-equal": "~1.0",
|
|
90
94
|
"cpy-cli": "~4.2",
|
|
91
|
-
"eslint": "~8.
|
|
95
|
+
"eslint": "~8.27",
|
|
92
96
|
"jshint": "~2.13",
|
|
93
|
-
"mocha": "~10.
|
|
94
|
-
"npm-run-all2": "~6.0",
|
|
97
|
+
"mocha": "~10.1",
|
|
95
98
|
"rimraf": "~3.0",
|
|
99
|
+
"run-scripts-util": "~0.1",
|
|
96
100
|
"typescript": "~4.8"
|
|
97
101
|
}
|
|
98
102
|
}
|