Skip to content

Commit

Permalink
fix: add cli option --root-dir
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Mar 28, 2019
1 parent 4c29b35 commit 36f4070
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cli
)
.option('--input.* [file]', 'An object mapping names to entry points')
.option('-d, --out-dir <outDir>', 'Output directory', { default: 'dist' })
.option('--root-dir <rootDir>', 'The root directory to resolve files from')
.option('--file-name <name>', 'Set the file name for output files')
.option('--module-name <name>', 'Set the module name for umd bundle')
.option('--env.* [value]', 'Replace env variables')
Expand Down
7 changes: 7 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,12 @@ export interface Options {
* Use a custom config file rather than auto-loading bili.config.js
*/
configFile?: string | boolean
/**
* The root directory to resolve files from
* Useful for mono-repo
* e.g. You can install Bili in root directory and leaf packages can use their own Bili config file:
* - `bili --root-dir packages/foo`
* - `bili --root-dir packages/bar`
*/
rootDir?: string
}

0 comments on commit 36f4070

Please sign in to comment.