bfg-common 1.1.46 → 1.1.48

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.
@@ -5,25 +5,21 @@ const path = require('path')
5
5
  const npmGenerate = (): void => {
6
6
  // Переносим весь контент и удаляем все файлы кроме картинок
7
7
  const filePath = path.join(
8
- __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
8
+ __dirname.replace('/node_modules/bfg-common/modules/replaceEnv', ''),
9
9
  'assets',
10
10
  'scss',
11
11
  'common',
12
- 'normalize.css'
12
+ 'normalize.scss'
13
13
  )
14
14
  if (!fs.existsSync(filePath)) return
15
15
 
16
16
  const searchString = 'FONT'
17
- const replacementString = process.env.FONT || ''
17
+ const replacementString = `'${process.env.FONT}'` || ''
18
18
  fs.readFile(filePath, 'utf8', (err: any, data: string) => {
19
19
  if (err) {
20
20
  return console.log(err)
21
21
  }
22
22
 
23
- if (data.match(replacementString)) {
24
- return
25
- }
26
-
27
23
  const updatedContent = data.replace(searchString, replacementString)
28
24
 
29
25
  fs.writeFile(filePath, updatedContent, 'utf8', (err: any) => {
@@ -37,9 +33,6 @@ const npmGenerate = (): void => {
37
33
  // @ts-ignore
38
34
  export default defineNuxtModule(() => {
39
35
  switch (process.env.npm_command) {
40
- case 'run-script':
41
- // npmDev()
42
- break
43
36
  case 'exec':
44
37
  npmGenerate()
45
38
  break
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.46",
4
+ "version": "1.1.48",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",