fg-devkit 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.
package/configs/lefthook.yml
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
pre-commit:
|
|
2
2
|
commands:
|
|
3
3
|
lint-check:
|
|
4
|
-
run:
|
|
4
|
+
run: >
|
|
5
|
+
if [ -x "__FG_NODE_BIN__" ]; then
|
|
6
|
+
"__FG_NODE_BIN__" ./node_modules/fg-devkit/scripts/fg-devkit.mjs lint .;
|
|
7
|
+
elif command -v node >/dev/null 2>&1; then
|
|
8
|
+
node ./node_modules/fg-devkit/scripts/fg-devkit.mjs lint .;
|
|
9
|
+
else
|
|
10
|
+
/usr/bin/env node ./node_modules/fg-devkit/scripts/fg-devkit.mjs lint .;
|
|
11
|
+
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fg-devkit",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Shared configs, scripts, and DX tooling for Vue / TypeScript frontend repos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"typescript": "5.9.3",
|
|
75
75
|
"vue-eslint-parser": "10.4.0",
|
|
76
76
|
"vue-tsc": "3.2.7"
|
|
77
|
-
}
|
|
77
|
+
},
|
|
78
|
+
"scripts": {}
|
|
78
79
|
}
|
|
@@ -55,7 +55,9 @@ if (pkg['lint-staged'] !== undefined) {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
try {
|
|
58
|
-
fs.
|
|
58
|
+
const template = fs.readFileSync(lefthookTemplate, 'utf8')
|
|
59
|
+
const rendered = template.replaceAll('__FG_NODE_BIN__', process.execPath)
|
|
60
|
+
fs.writeFileSync(lefthookTarget, rendered, 'utf8')
|
|
59
61
|
fs.writeFileSync(packageJsonPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf8')
|
|
60
62
|
if (fs.existsSync(huskyDir)) {
|
|
61
63
|
fs.rmSync(huskyDir, { recursive: true, force: true })
|