@dxtmisha/scripts 0.5.22 → 0.5.23
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/bin/design-package.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env vite-node
|
|
2
2
|
|
|
3
3
|
import { PackageInit } from '../src/classes/Package/PackageInit'
|
|
4
|
+
import { UI_DIR_PACKAGES } from '../src/config'
|
|
4
5
|
|
|
5
6
|
const type: string = process.argv?.[2] ?? 'library'
|
|
6
7
|
const templates: string | undefined = process.argv?.[3]
|
|
8
|
+
const dir: string | undefined = process.argv?.[4] ?? UI_DIR_PACKAGES
|
|
7
9
|
|
|
8
|
-
new PackageInit(type, templates).make()
|
|
10
|
+
new PackageInit(type, templates, dir).make()
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/scripts",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.23",
|
|
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": [
|
|
@@ -13,7 +13,8 @@ import { UI_DIR_PACKAGES } from '../../config'
|
|
|
13
13
|
export class PackageInit {
|
|
14
14
|
constructor(
|
|
15
15
|
protected readonly type: string,
|
|
16
|
-
protected readonly templates?: string
|
|
16
|
+
protected readonly templates?: string,
|
|
17
|
+
protected readonly dir: string = UI_DIR_PACKAGES
|
|
17
18
|
) {
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -27,7 +28,7 @@ export class PackageInit {
|
|
|
27
28
|
|
|
28
29
|
this.getDirs()
|
|
29
30
|
.forEach((dir) => {
|
|
30
|
-
new PackageInitItem(dir, [
|
|
31
|
+
new PackageInitItem(dir, [this.dir, dir], this.type, this.templates).make()
|
|
31
32
|
})
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -37,9 +38,9 @@ export class PackageInit {
|
|
|
37
38
|
* Возвращает массив имен директорий для инициализации пакета.
|
|
38
39
|
*/
|
|
39
40
|
protected getDirs(): string[] {
|
|
40
|
-
return PropertiesFile.readDir(
|
|
41
|
+
return PropertiesFile.readDir(this.dir)
|
|
41
42
|
.filter(
|
|
42
|
-
path => PropertiesFile.readDir([
|
|
43
|
+
path => PropertiesFile.readDir([this.dir, path]).length === 0
|
|
43
44
|
)
|
|
44
45
|
}
|
|
45
46
|
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { viteBasicFunction } from '@dxtmisha/configuration/viteBasicFunction'
|
|
2
2
|
|
|
3
3
|
// https://vite.dev/config/
|
|
4
|
-
export default
|
|
4
|
+
export default viteBasicFunction(
|
|
5
|
+
undefined,
|
|
6
|
+
undefined,
|
|
7
|
+
undefined,
|
|
8
|
+
undefined,
|
|
9
|
+
undefined,
|
|
10
|
+
undefined,
|
|
11
|
+
undefined,
|
|
12
|
+
undefined,
|
|
13
|
+
true
|
|
14
|
+
)
|