@akinon/next 1.32.0 → 1.33.0
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/CHANGELOG.md +2 -0
- package/bin/pz-copy-template.js +43 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const projectZeroNextDir = path.join(
|
|
4
|
+
__dirname,
|
|
5
|
+
'../../../apps/projectzeronext'
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
const templatesDir = path.join(
|
|
9
|
+
__dirname,
|
|
10
|
+
'../../../packages/projectzero-cli/app-template'
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
if (fs.existsSync(templatesDir)) {
|
|
14
|
+
fs.rmdirSync(templatesDir, { recursive: true });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function copyRecursively(src, dest) {
|
|
18
|
+
if (path.basename(src) === 'node_modules') {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (fs.existsSync(src) && fs.statSync(src).isDirectory()) {
|
|
23
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
24
|
+
fs.readdirSync(src).forEach((childItemName) => {
|
|
25
|
+
const childSrcPath = path.join(src, childItemName);
|
|
26
|
+
const childDestPath = path.join(dest, childItemName);
|
|
27
|
+
copyRecursively(childSrcPath, childDestPath);
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
fs.copyFileSync(src, dest);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (!fs.existsSync(templatesDir)) {
|
|
35
|
+
fs.mkdirSync(templatesDir, { recursive: true });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
copyRecursively(projectZeroNextDir, templatesDir);
|
|
39
|
+
|
|
40
|
+
console.log(
|
|
41
|
+
'\x1b[33m%s\x1b[0m',
|
|
42
|
+
'projectzeronext content has been copied to templates.'
|
|
43
|
+
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.33.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@typescript-eslint/eslint-plugin": "6.7.4",
|
|
33
33
|
"@typescript-eslint/parser": "6.7.4",
|
|
34
34
|
"eslint": "^8.14.0",
|
|
35
|
-
"@akinon/eslint-plugin-projectzero": "1.
|
|
35
|
+
"@akinon/eslint-plugin-projectzero": "1.33.0",
|
|
36
36
|
"eslint-config-prettier": "8.5.0"
|
|
37
37
|
}
|
|
38
38
|
}
|