bfg-common 1.2.11 → 1.2.13

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/minify.js CHANGED
@@ -116,7 +116,7 @@ filesByOrder.forEach((filePath) => {
116
116
  `Ошибка при минификации файла ${filePath}: ${minified.error.message}`
117
117
  )
118
118
  } else {
119
- runMinJsContent += `\r${minified.code}`
119
+ runMinJsContent += minified.code
120
120
  index++
121
121
 
122
122
  // Если последний файл то все помещаем в run.min.js
@@ -0,0 +1,28 @@
1
+ import { defineNuxtModule } from '@nuxt/kit'
2
+ const fs = require('fs')
3
+ const path = require('path')
4
+
5
+ const npmGenerate = (): void => {
6
+ // Переносим весь контент и удаляем все файлы кроме картинок
7
+ const folderPath = path.join(
8
+ __dirname.replace('/modules/fixSpiceConsole', ''),
9
+ 'public',
10
+ 'spice-console'
11
+ )
12
+ if (!fs.existsSync(folderPath)) return
13
+
14
+ fs.rmdir(folderPath, { recursive: true }, (err: any) => {
15
+ if (err) {
16
+ console.error('Error while removing folder:', err);
17
+ }
18
+ });
19
+ }
20
+
21
+ // @ts-ignore
22
+ export default defineNuxtModule(() => {
23
+ switch (process.env.npm_command) {
24
+ case 'exec':
25
+ npmGenerate()
26
+ break
27
+ }
28
+ })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.11",
4
+ "version": "1.2.13",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",