Skip to content

Commit 7fdf2b5

Browse files
committed
Add path and basedir command-line options
1 parent 0ab43f6 commit 7fdf2b5

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

lib/node_modules/@stdlib/_tools/browserify/string/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ Options:
169169
modules are assumed to be present in a separate
170170
external bundle. To omit multiple modules, set an
171171
--external flag for each module to omit.
172+
--path path Directory paths in which to search for modules
173+
referenced using non-relative paths. To specify
174+
multiple directories, set a --path flag for each
175+
directory to search.
176+
--basedir path Directory from which to resolve relative paths.
177+
Default: current working directory.
172178
```
173179

174180
</section>

lib/node_modules/@stdlib/_tools/browserify/string/bin/cli

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ function main() {
112112
opts.external = flags.external;
113113
}
114114
}
115+
if ( flags.path ) {
116+
if ( isString( flags.path ) ) {
117+
opts.paths = [ flags.path ];
118+
} else {
119+
opts.paths = flags.path;
120+
}
121+
}
122+
if ( flags.basedir ) {
123+
opts.basedir = flags.basedir;
124+
}
115125
// Check if we are receiving data from `stdin`...
116126
if ( !process.stdin.isTTY ) {
117127
return stdin( onData );

lib/node_modules/@stdlib/_tools/browserify/string/docs/usage.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ Options:
2525
modules are assumed to be present in a separate
2626
external bundle. To omit multiple modules, set an
2727
--external flag for each module to omit.
28+
--path path Directory paths in which to search for modules
29+
referenced using non-relative paths. To specify
30+
multiple directories, set a --path flag for each
31+
directory to search.
32+
--basedir path Directory from which to resolve relative paths.
33+
Default: current working directory.
2834

lib/node_modules/@stdlib/_tools/browserify/string/etc/cli_opts.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"transform",
66
"plugin",
77
"external",
8-
"standalone"
8+
"standalone",
9+
"path",
10+
"basedir"
911
],
1012
"boolean": [
1113
"help",

0 commit comments

Comments
 (0)