@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 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}`
@@ -34,6 +34,7 @@ class Upgrade {
34
34
  this.ctx.app = await this.getApp()
35
35
 
36
36
  // devtools
37
+ await this.devtools.gitignore()
37
38
  await this.devtools.git()
38
39
  await this.devtools.gitlab()
39
40
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.16",
2
+ "version": "1.0.17",
3
3
  "name": "@fullstackunicorn/root",
4
4
  "author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
5
5
  "description": "Root CLI: init config, generate project, upgrade project",