File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 149
149
"build:all" : " npm run clean:build && npm run build:wasm:release && npm run bundle && npm run bundle:min && npm run build" ,
150
150
"build:wasm:debug" : " mkdir -p dist && cd ./src/parsers/manifest/dash/wasm-parser && cargo build --target wasm32-unknown-unknown && cp target/wasm32-unknown-unknown/debug/mpd_node_parser.wasm ../../../../../dist/mpd-parser.wasm" ,
151
151
"build:wasm:release" : " bash ./scripts/build_wasm_release.sh" ,
152
- "bundle" : " node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.js" ,
153
- "bundle:min" : " node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.min.js --minify" ,
152
+ "bundle" : " node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals --name \" RxPlayer default bundle \" - o dist/rx-player.js" ,
153
+ "bundle:min" : " node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals --name \" RxPlayer minified bundle \" - o dist/rx-player.min.js --minify" ,
154
154
"certificate" : " bash ./scripts/generate_certificate" ,
155
155
"check" : " npm run check:types && npm run lint && npm run check:types:unit_tests" ,
156
156
"check:all" : " npm run check:types && npm run lint && npm run lint:demo && npm run lint:tests && npm run lint:scripts && npm run test:unit && npm run test:integration && npm run test:memory && node -r esm ./scripts/check_nodejs_import_compatibility.js" ,
Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ if (import.meta.url === pathToFileURL(process.argv[1]).href) {
148
148
let globalScope = false ;
149
149
let outputFile = "" ;
150
150
let silent = false ;
151
+ let name ;
151
152
152
153
if ( args [ 0 ] === "-h" || args [ 0 ] === "--help" ) {
153
154
displayHelp ( ) ;
@@ -187,6 +188,19 @@ if (import.meta.url === pathToFileURL(process.argv[1]).href) {
187
188
silent = true ;
188
189
break ;
189
190
191
+ case "-n" :
192
+ case "--name" :
193
+ {
194
+ argOffset ++ ;
195
+ name = args [ argOffset ] ;
196
+ if ( name === undefined ) {
197
+ console . error ( "ERROR: no name provided\n" ) ;
198
+ displayHelp ( ) ;
199
+ process . exit ( 1 ) ;
200
+ }
201
+ }
202
+ break ;
203
+
190
204
case "-o" :
191
205
case "--output" :
192
206
{
@@ -231,6 +245,7 @@ if (import.meta.url === pathToFileURL(process.argv[1]).href) {
231
245
globalScope,
232
246
silent,
233
247
outfile : outputFile ,
248
+ name,
234
249
} ) . catch ( ( err ) => {
235
250
console . error ( `ERROR: ${ err } \n` ) ;
236
251
process . exit ( 1 ) ;
@@ -257,6 +272,7 @@ Available options:
257
272
-m, --minify Minify the built bundle.
258
273
-p, --production-mode Build all files in production mode (less runtime checks, mostly).
259
274
-g, --globals Add the RxPlayer to the global scope.
275
+ -n, --name Optional "name" to refer to your bundle. Will be used for in log output outputs.
260
276
-s, --silent Don't log to stdout/stderr when bundling.
261
277
-w, --watch Re-build each time any of the files depended on changed.` ,
262
278
) ;
You can’t perform that action at this time.
0 commit comments