@fullstackunicorn/root 1.0.16 → 1.0.17
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/index.def.js +1 -0
- package/modules/targets/@tools.js +7 -1
- package/modules/targets/devtools.js +6 -0
- package/modules/upgrade.js +1 -0
- package/package.json +1 -1
package/index.def.js
CHANGED
|
@@ -19,6 +19,7 @@ export class Def {
|
|
|
19
19
|
this.folders = {}
|
|
20
20
|
// devtools
|
|
21
21
|
this.files.devtools = {}
|
|
22
|
+
this.files.devtools.gitignore = `.gitignore`
|
|
22
23
|
this.files.devtools.git = `.devtools/git.sh`
|
|
23
24
|
this.files.devtools.gitlab = `.devtools/gitlab.sh` // da capire a cosa serviva
|
|
24
25
|
// frontend
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fsa } from '#@/index.dep.js'
|
|
1
|
+
import { fsa, path } from '#@/index.dep.js'
|
|
2
2
|
|
|
3
3
|
export class Tools {
|
|
4
4
|
|
|
@@ -133,6 +133,12 @@ export class Tools {
|
|
|
133
133
|
return true
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
copyFile = async ({ templatePath, outputPath }) => {
|
|
137
|
+
await fsa.ensureFileDir(outputPath)
|
|
138
|
+
await fsa.copyFile(templatePath, outputPath)
|
|
139
|
+
return true
|
|
140
|
+
}
|
|
141
|
+
|
|
136
142
|
patchPackage = async ({ templatePath, outputPath, values, dependencies, devDependencies }) => {
|
|
137
143
|
|
|
138
144
|
const template = await fsa.readJSON(templatePath)
|
|
@@ -6,6 +6,12 @@ export class Devtools {
|
|
|
6
6
|
this.tools = init.tools
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
async gitignore() {
|
|
10
|
+
const templatePath = `${this.def.templates}/gitignore`
|
|
11
|
+
const outputPath = `${this.def.cwd}/${this.def.files.devtools.gitignore}`
|
|
12
|
+
await this.tools.copyFile({ templatePath, outputPath })
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
async git() {
|
|
10
16
|
// GIT_USER_NAME, GIT_USER_EMAIL, REPO_NAMESPACE, REPO_NAME
|
|
11
17
|
const templatePath = `${this.def.templates}/${this.def.files.devtools.git}`
|
package/modules/upgrade.js
CHANGED
package/package.json
CHANGED