@dxtmisha/scripts 0.5.4 → 0.5.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/scripts",
3
3
  "private": false,
4
- "version": "0.5.4",
4
+ "version": "0.5.5",
5
5
  "type": "module",
6
6
  "description": "Development scripts and CLI tools for DXT UI projects - automated component generation, library building and project management tools",
7
7
  "keywords": [
@@ -40,14 +40,20 @@ export class PackageInitItem {
40
40
  * Инициализирует элемент пакета, создавая файлы из образцов и шаблонов.
41
41
  */
42
42
  make() {
43
- console.log('Package init in:', this.dir)
43
+ console.log('Package init in:', this.dir, [
44
+ ...this.getSample(),
45
+ ...this.getTemplates()
46
+ ])
44
47
 
45
48
  ;[
46
49
  ...this.getSample(),
47
50
  ...this.getTemplates()
48
51
  ]
49
52
  .forEach((item) => {
50
- this.writeFile(item.file, item.content)
53
+ this.writeFile(
54
+ this.getFileName(item.file),
55
+ item.content
56
+ )
51
57
 
52
58
  if (item.path.endsWith('library.ts')) {
53
59
  this.makeLibrary()
@@ -57,6 +63,16 @@ export class PackageInitItem {
57
63
  })
58
64
  }
59
65
 
66
+ /**
67
+ * Gets the original file name by replacing placeholders.
68
+ *
69
+ * Получает оригинальное имя файла, заменяя заполнители.
70
+ * @param filePath file path with placeholders / путь к файлу с заполнителями
71
+ */
72
+ protected getFileName(filePath: string): string {
73
+ return filePath.replace('_.gitignore.txt', '.gitignore')
74
+ }
75
+
60
76
  /**
61
77
  * Gets sample files for the specified package type.
62
78
  *
@@ -0,0 +1,23 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ dist-ssr
12
+ *.local
13
+
14
+ # Editor directories and files
15
+ .vscode/*
16
+ !.vscode/extensions.json
17
+ .idea
18
+ .DS_Store
19
+ *.suo
20
+ *.ntvs*
21
+ *.njsproj
22
+ *.sln
23
+ *.sw?
@@ -0,0 +1,24 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ dist
12
+ dist-ssr
13
+ *.local
14
+
15
+ # Editor directories and files
16
+ .vscode/*
17
+ !.vscode/extensions.json
18
+ .idea
19
+ .DS_Store
20
+ *.suo
21
+ *.ntvs*
22
+ *.njsproj
23
+ *.sln
24
+ *.sw?