strip-directives 1.0.0 → 1.0.1
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/bin.js +5 -3
- package/package.json +2 -2
package/bin.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
1
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
4
|
|
|
3
5
|
import * as console from "node:console";
|
|
@@ -8,10 +10,10 @@ Object.freeze(Object.prototype);
|
|
|
8
10
|
Object.freeze(Array.prototype);
|
|
9
11
|
Object.freeze(globalThis);
|
|
10
12
|
|
|
11
|
-
const {
|
|
13
|
+
const { stripFilesDirectives } = await import("./lib.js");
|
|
12
14
|
try {
|
|
13
|
-
const files = argv.slice(2);
|
|
14
|
-
await
|
|
15
|
+
const files = argv[0].endsWith("node") ? argv.slice(2) : argv.slice(1);
|
|
16
|
+
await stripFilesDirectives(files);
|
|
15
17
|
exit(0);
|
|
16
18
|
} catch (error) {
|
|
17
19
|
console.error(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strip-directives",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Strip directives (like eslint-disable-line) before you publish",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"minify"
|
|
41
41
|
],
|
|
42
42
|
"scripts": {
|
|
43
|
-
"_prettier": "prettier '**/*.{js,md}'",
|
|
43
|
+
"_prettier": "prettier '**/*.{js,md,yml}'",
|
|
44
44
|
"check": "npm run _prettier -- --check && npm run test",
|
|
45
45
|
"format": "npm run _prettier -- --write",
|
|
46
46
|
"test": "node --test '*.test.js'",
|