-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab0fc12
commit 458b397
Showing
10 changed files
with
393 additions
and
360 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
const { spawn, execSync } = require('child_process'); | ||
const exec = commands => { | ||
execSync(commands, { stdio: 'inherit', shell: true }); | ||
const { execSync } = require("child_process"); | ||
const exec = (commands) => { | ||
execSync(commands, { stdio: "inherit", shell: true }); | ||
}; | ||
const spawnProcess = commands => { | ||
spawn(commands, { stdio: 'inherit', shell: true }); | ||
}; | ||
|
||
const readline = require('readline'); | ||
const readline = require("readline"); | ||
|
||
const rl = readline.createInterface({ | ||
input: process.stdin, | ||
output: process.stdout | ||
output: process.stdout, | ||
}); | ||
|
||
const defaultDest = "dist" | ||
const defaultDest = "dist"; | ||
|
||
rl.question(`DESTINATION (${defaultDest}):`, (dir) => { | ||
|
||
if(!dir){ | ||
dir=defaultDest; | ||
if (!dir) { | ||
dir = defaultDest; | ||
} | ||
|
||
exec(`set BUILD_DEST_DIRECTORY=${dir} && vite build --config vite.pack.config.js`); | ||
exec( | ||
`cross-env BUILD_DEST_DIRECTORY="${dir}" vite build --config vite.pack.config.js` | ||
); | ||
rl.close(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters