Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
a3b7a653
Commit
a3b7a653
authored
Oct 19, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix npm build error
parent
5fb069f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
build.ts
build/script/build.ts
+7
-7
package.json
package.json
+1
-1
No files found.
build/script/build.ts
View file @
a3b7a653
// #!/usr/bin/env node
// #!/usr/bin/env node
import
{
sh
}
from
'
tasksfile
'
;
//
import { sh } from 'tasksfile';
import
{
argv
}
from
'
yargs
'
;
import
{
argv
}
from
'
yargs
'
;
import
{
runBuildConfig
}
from
'
./buildConf
'
;
import
{
runBuildConfig
}
from
'
./buildConf
'
;
...
@@ -11,12 +11,12 @@ import { startGzipStyle } from '../plugin/gzip/compress';
...
@@ -11,12 +11,12 @@ import { startGzipStyle } from '../plugin/gzip/compress';
export
const
runBuild
=
async
()
=>
{
export
const
runBuild
=
async
()
=>
{
try
{
try
{
const
argvList
=
argv
.
_
;
const
argvList
=
argv
.
_
;
let
cmd
=
`cross-env NODE_ENV=production vite build`
;
//
let cmd = `cross-env NODE_ENV=production vite build`;
// await run('cross-env', ['NODE_ENV=production', 'vite', 'build']);
//
//
await run('cross-env', ['NODE_ENV=production', 'vite', 'build']);
await
sh
(
cmd
,
{
//
await sh(cmd, {
async
:
true
,
//
async: true,
nopipe
:
true
,
//
nopipe: true,
});
//
});
// Generate configuration file
// Generate configuration file
if
(
!
argvList
.
includes
(
'
no-conf
'
))
{
if
(
!
argvList
.
includes
(
'
no-conf
'
))
{
...
...
package.json
View file @
a3b7a653
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"scripts"
:
{
"scripts"
:
{
"bootstrap"
:
"yarn install"
,
"bootstrap"
:
"yarn install"
,
"serve"
:
"cross-env ts-node --files -P ./build/tsconfig.json ./build/script/preserve && cross-env NODE_ENV=development vite"
,
"serve"
:
"cross-env ts-node --files -P ./build/tsconfig.json ./build/script/preserve && cross-env NODE_ENV=development vite"
,
"build"
:
"node ./build/jsc.ts build"
,
"build"
:
"
cross-env NODE_ENV=production vite build &&
node ./build/jsc.ts build"
,
"build:site"
:
"cross-env SITE=true npm run build "
,
"build:site"
:
"cross-env SITE=true npm run build "
,
"build:no-cache"
:
"yarn clean:cache && node ./build/jsc.ts build"
,
"build:no-cache"
:
"yarn clean:cache && node ./build/jsc.ts build"
,
"report"
:
"cross-env REPORT=true npm run build "
,
"report"
:
"cross-env REPORT=true npm run build "
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment