Skip to content

Commit

Permalink
fix: fix npm build error
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Oct 19, 2020
1 parent 5fb069f commit a3b7a65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions build/script/build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// #!/usr/bin/env node

import { sh } from 'tasksfile';
// import { sh } from 'tasksfile';

import { argv } from 'yargs';
import { runBuildConfig } from './buildConf';
Expand All @@ -11,12 +11,12 @@ import { startGzipStyle } from '../plugin/gzip/compress';
export const runBuild = async () => {
try {
const argvList = argv._;
let cmd = `cross-env NODE_ENV=production vite build`;
// await run('cross-env', ['NODE_ENV=production', 'vite', 'build']);
await sh(cmd, {
async: true,
nopipe: true,
});
// let cmd = `cross-env NODE_ENV=production vite build`;
// // await run('cross-env', ['NODE_ENV=production', 'vite', 'build']);
// await sh(cmd, {
// async: true,
// nopipe: true,
// });

// Generate configuration file
if (!argvList.includes('no-conf')) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"bootstrap": "yarn install",
"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:no-cache": "yarn clean:cache && node ./build/jsc.ts build",
"report": "cross-env REPORT=true npm run build ",
Expand Down

0 comments on commit a3b7a65

Please sign in to comment.