bfg-common 1.2.12 → 1.2.14

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.
@@ -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/fixSpiceConsoleBuild', ''),
9
+ 'public',
10
+ 'spice-console'
11
+ )
12
+ if (!fs.existsSync(folderPath)) return
13
+
14
+ fs.rm(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.12",
4
+ "version": "1.2.14",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",