init-blueprint 0.0.10 → 0.0.12
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/BlueprintTemplate/package.json +2 -2
- package/create.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "__APP_NAME__",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"description": "A custom project blueprint",
|
|
5
5
|
"main": "create.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"__APP_NAME__": "./create.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|
package/create.js
CHANGED
|
@@ -43,7 +43,7 @@ fs.mkdirSync(destinationPath, { recursive: true });
|
|
|
43
43
|
// Copy and rename all files
|
|
44
44
|
fs.readdirSync(templatePath).forEach(item => {
|
|
45
45
|
const srcPath = path.join(templatePath, item);
|
|
46
|
-
let destPath = path.join(destinationPath, item.replace(/
|
|
46
|
+
let destPath = path.join(destinationPath, item.replace(/__APP_NAME__/g, projectName));
|
|
47
47
|
|
|
48
48
|
if (item === "gitignore") {
|
|
49
49
|
destPath = path.join(destinationPath, ".gitignore"); // Rename gitignore
|