init-blueprint 0.0.9 → 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/README.md +7 -18
- package/BlueprintTemplate/package.json +2 -2
- package/create.js +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
How to make a blueprint
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
3. Add git to the blueprint, and change the root branch from master to main
|
|
9
|
-
- git branch -m master main
|
|
10
|
-
4. Create new repo in git
|
|
11
|
-
- Add environment variables into the git repo: Project > Settings > CI/CD > Variables
|
|
12
|
-
+ NPM_TOKEN: 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
|
|
13
|
-
+ PACKAGE_NAME: python-blueprint
|
|
14
|
-
- push the blueprint to main branch
|
|
15
|
-
5. Use the lib from npm:
|
|
16
|
-
- npm install -g python-blueprint
|
|
17
|
-
- npm list -g python-blueprint
|
|
18
|
-
- python-blueprint thmoney
|
|
1
|
+
How to make a blueprint
|
|
2
|
+
|
|
3
|
+
1. Use the lib from npm:
|
|
4
|
+
- npm uninstall -g netcore-blueprint
|
|
5
|
+
- npm install -g netcore-blueprint
|
|
6
|
+
- npm list -g netcore-blueprint
|
|
7
|
+
- netcore-blueprint test
|
|
@@ -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
|