nextia 6.0.2 → 6.0.4
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/LICENSE +1 -1
- package/README.md +5 -15
- package/package.json +14 -11
- package/src/lib.js +43 -55
- package/src/bin.js +0 -233
- package/src/template/README.md +0 -30
- package/src/template/_env.dev +0 -1
- package/src/template/_env.prod +0 -1
- package/src/template/_env.test +0 -1
- package/src/template/_gitignore +0 -9
- package/src/template/biome.json +0 -43
- package/src/template/package.json +0 -37
- package/src/template/public/error.html +0 -14
- package/src/template/public/logo.svg +0 -865
- package/src/template/src/assets/i18n/index.js +0 -8
- package/src/template/src/assets/img/image.jpg +0 -0
- package/src/template/src/components/I18n/index.jsx +0 -23
- package/src/template/src/components/Icon/index.jsx +0 -48
- package/src/template/src/components/Link/index.jsx +0 -14
- package/src/template/src/components/Translate/index.jsx +0 -31
- package/src/template/src/components/Translate/style.css +0 -2
- package/src/template/src/components/index.js +0 -6
- package/src/template/src/index.html +0 -18
- package/src/template/src/index.jsx +0 -5
- package/src/template/src/pages/demo/functions.js +0 -3
- package/src/template/src/pages/demo/index.jsx +0 -10
- package/src/template/src/pages/demo/style.css +0 -2
- package/src/template/src/pages/functions.js +0 -9
- package/src/template/src/pages/home/functions.js +0 -43
- package/src/template/src/pages/home/index.jsx +0 -10
- package/src/template/src/pages/home/style.css +0 -2
- package/src/template/src/pages/http/not-found/index.jsx +0 -19
- package/src/template/src/pages/http/not-found/style.css +0 -2
- package/src/template/src/pages/index.jsx +0 -65
- package/src/template/src/theme/animations.css +0 -30
- package/src/template/src/theme/fonts/Roboto-Regular.ttf +0 -0
- package/src/template/src/theme/fonts/index.css +0 -7
- package/src/template/src/theme/icons/icons.svg +0 -121
- package/src/template/src/theme/icons/index.css +0 -1
- package/src/template/src/theme/index.css +0 -40
- package/src/template/src/theme/util.css +0 -27
- package/src/template/src/utils/hooks.js +0 -23
- package/src/template/src/utils/index.js +0 -14
- package/src/template/vite.config.js +0 -97
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { version } from './package.json'
|
|
2
|
-
import { execSync } from 'node:child_process'
|
|
3
|
-
import { readFile } from 'node:fs/promises'
|
|
4
|
-
import { defineConfig } from 'vite'
|
|
5
|
-
import autoprefixer from 'autoprefixer'
|
|
6
|
-
import react from '@vitejs/plugin-react'
|
|
7
|
-
|
|
8
|
-
export default defineConfig(({ mode }) => {
|
|
9
|
-
const CWD = process.cwd()
|
|
10
|
-
const port = 3000
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
server: {
|
|
14
|
-
host: '0.0.0.0',
|
|
15
|
-
port
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
preview: {
|
|
19
|
-
port
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
base: '',
|
|
23
|
-
envDir: CWD,
|
|
24
|
-
root: CWD + '/src',
|
|
25
|
-
publicDir: CWD + '/public',
|
|
26
|
-
resolve: {
|
|
27
|
-
alias: {
|
|
28
|
-
assets: CWD + '/src/assets',
|
|
29
|
-
components: CWD + '/src/components',
|
|
30
|
-
containers: CWD + '/src/containers',
|
|
31
|
-
services: CWD + '/src/services',
|
|
32
|
-
theme: CWD + '/src/theme',
|
|
33
|
-
utils: CWD + '/src/utils'
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
build: {
|
|
38
|
-
outDir: '../out',
|
|
39
|
-
assetsDir: 'assets',
|
|
40
|
-
emptyOutDir: true
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
css: {
|
|
44
|
-
postcss: {
|
|
45
|
-
plugins: [autoprefixer]
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
plugins: [
|
|
50
|
-
react(),
|
|
51
|
-
{
|
|
52
|
-
name: 'html',
|
|
53
|
-
transformIndexHtml(html) {
|
|
54
|
-
let gitHash = ''
|
|
55
|
-
try {
|
|
56
|
-
gitHash = execSync('git rev-parse --short HEAD 2> /dev/null')
|
|
57
|
-
.toString()
|
|
58
|
-
.trim()
|
|
59
|
-
} catch (e) {}
|
|
60
|
-
|
|
61
|
-
return html.replaceAll(
|
|
62
|
-
'%VERSION%',
|
|
63
|
-
`version=${version}, env=${mode}, release-date=${new Date()}, git-hash=${gitHash}`
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'svg',
|
|
69
|
-
async transform(src, id) {
|
|
70
|
-
let code = id.split('?')[0]
|
|
71
|
-
const type = id.split('?')[1]
|
|
72
|
-
|
|
73
|
-
if (type === 'raw') {
|
|
74
|
-
code = await readFile(code, 'utf8')
|
|
75
|
-
code = code
|
|
76
|
-
.replace(/\s{2,}/g, ' ') // multiple spaces to single space
|
|
77
|
-
.replace(/\n/g, '') // remove newlines
|
|
78
|
-
.replace(/\t/g, '') // remove tabs
|
|
79
|
-
.replace(/>\s+</g, '><') // remove space between tags
|
|
80
|
-
.trim()
|
|
81
|
-
return `export default ${JSON.stringify(code)};`
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
|
|
87
|
-
test: {
|
|
88
|
-
root: './',
|
|
89
|
-
environment: 'jsdom',
|
|
90
|
-
coverage: {
|
|
91
|
-
reportsDirectory: '.coverage',
|
|
92
|
-
include: ['src/**/*.{js,jsx}'],
|
|
93
|
-
exclude: ['.coverage', 'src/assets', 'src/index.jsx']
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
})
|