-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
4 changed files
with
58 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
import Breadc from '../src'; | ||
|
||
const vite = Breadc('vite', { version: '1.0.0' }) | ||
.option('-c, --config <file>', { description: `[string] use specified config file` }) | ||
.option('--base <path>', { description: `[string] public base path (default: /)` }) | ||
.option('-l, --logLevel <level>', { description: `[string] info | warn | error | silent` }) | ||
.option('--clearScreen', { description: `[boolean] allow/disable clear screen when logging` }) | ||
.option('-d, --debug [feat]', { description: `[string | boolean] show debug logs` }) | ||
.option('-f, --filter <filter>', { description: `[string] filter debug logs` }) | ||
.option('-m, --mode <mode>', { description: `[string] set env mode` }); | ||
.option('-c, --config <file>', `[string] use specified config file`) | ||
.option('--base <path>', `[string] public base path (default: /)`) | ||
.option('-l, --logLevel <level>', `[string] info | warn | error | silent`) | ||
.option('--clearScreen', `[boolean] allow/disable clear screen when logging`) | ||
.option('-d, --debug [feat]', `[string | boolean] show debug logs`) | ||
.option('-f, --filter <filter>', `[string] filter debug logs`) | ||
.option('-m, --mode <mode>', `[string] set env mode`); | ||
|
||
vite | ||
.command('dev [root]', { description: 'start dev server' }) | ||
.option('--host [host]', { description: `[string] specify hostname` }) | ||
.option('--port <port>', { description: `[number] specify port` }) | ||
.option('--https', { description: `[boolean] use TLS + HTTP/2` }) | ||
.option('--open [path]', { description: `[boolean | string] open browser on startup` }) | ||
.option('--cors', { description: `[boolean] enable CORS` }) | ||
.option('--strictPort', { description: `[boolean] exit if specified port is already in use` }) | ||
.option('--force', { | ||
description: `[boolean] force the optimizer to ignore the cache and re-bundle` | ||
}) | ||
.action(async (root, option) => {}); | ||
.option('--host [host]', `[string] specify hostname`) | ||
.option('--port <port>', `[number] specify port`) | ||
.option('--https', `[boolean] use TLS + HTTP/2`) | ||
.option('--open [path]', `[boolean | string] open browser on startup`) | ||
.option('--cors', `[boolean] enable CORS`) | ||
.option('--strictPort', `[boolean] exit if specified port is already in use`) | ||
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`) | ||
.action(async (root, option) => { | ||
console.log(`Root: ${root}`); | ||
console.log(`Option:`); | ||
console.log(option); | ||
}); | ||
|
||
vite.run(process.argv.slice(2)).catch((err) => vite.logger.error(err.message)); |
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