@dxtmisha/scripts 0.5.23 → 0.6.0
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.
|
|
4
|
+
"version": "0.6.0",
|
|
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": [
|
|
@@ -105,7 +105,9 @@ export class LibraryExport {
|
|
|
105
105
|
*/
|
|
106
106
|
protected initFile(): string {
|
|
107
107
|
const files: LibraryFiles = this.getDirectory()
|
|
108
|
-
const imports: string[] = [
|
|
108
|
+
const imports: string[] = [
|
|
109
|
+
this.initStyles()
|
|
110
|
+
]
|
|
109
111
|
const html: string[] = []
|
|
110
112
|
|
|
111
113
|
files.forEach((file) => {
|
|
@@ -141,4 +143,27 @@ export class LibraryExport {
|
|
|
141
143
|
+ '\r\n'
|
|
142
144
|
+ html.join('\r\n').trim()
|
|
143
145
|
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Generates imports for global styles
|
|
149
|
+
*
|
|
150
|
+
* Генерация импортов для глобальных стилей
|
|
151
|
+
*/
|
|
152
|
+
protected initStyles(): string {
|
|
153
|
+
const imports: string[] = []
|
|
154
|
+
const paths: string[] = [
|
|
155
|
+
'style.scss',
|
|
156
|
+
'style.css'
|
|
157
|
+
]
|
|
158
|
+
|
|
159
|
+
paths.forEach((path) => {
|
|
160
|
+
const fullPath = [UI_DIR_IN, path]
|
|
161
|
+
|
|
162
|
+
if (PropertiesFile.is(fullPath)) {
|
|
163
|
+
imports.push(`import './${path}'`)
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
return imports.join('\r\n') + '\r\n'
|
|
168
|
+
}
|
|
144
169
|
}
|
|
@@ -211,7 +211,8 @@ export class PackageInitItem {
|
|
|
211
211
|
) {
|
|
212
212
|
console.log('Generate library...')
|
|
213
213
|
|
|
214
|
-
PropertiesFile.writeByPath(path, `export * from '${this.getProjectName()}'
|
|
214
|
+
PropertiesFile.writeByPath(path, `export * from '${this.getProjectName()}/style'
|
|
215
|
+
export * from '${this.getProjectName()}'
|
|
215
216
|
`
|
|
216
217
|
)
|
|
217
218
|
}
|
|
File without changes
|