![]() ![]() "build:hva:prd": "ng build hva -prod -c=prd ", "build:hva:acc": "ng build hva -prod -c=acc ", "build:hva:tst": "ng build hva -prod -c=tst ", "build:hva:dev": "ng build hva -prod -c=dev ", "build:uva:prd": "ng build uva -prod -c=prd ", "build:uva:acc": "ng build uva -prod -c=acc ", "build:uva:tst": "ng build uva -prod -c=tst ", "build:uva:dev": "ng build uva -prod -c=dev ", With larger projects that have multiple environments, this can quickly become a hassle and difficult to maintain, like the example below: In a traditional package.json you can only run scripts on a per line basis. Launch arguments, command arguments, parameters and arguments.Environment and command line argument values.Environment values and special commands.Start a specific launch script npm start serve:devīasically you can now use npm start instead of npm run. You could also include the package.json file in this list, then you can use the strength of Script Launcher in your package.json file.You are now ready to start use Script Launcher by running: npm start > as described in the examples below. It's a good practice is to split your script and menu configurations to their own file. Be aware the launcher-config.json is always the first file being loaded even when it is not present in the files list.īy using this option it's possible the split your configuration over multiple files. When using multiple files they will be merged together in the loading order. The files options can be used to configure the config files to load when starting launcher. The launcher options can be used the customize the default behavior of Script Launcher. "echo ' \\$npm_config_node_version ' : '$npm_config_node_version' ", With script-launcher you have the benefits of using variables, script references and many more features, so you can make the above example easier to maintain: "deploy:prd": "npm run deploy:uva:prd & npm run deploy:hva:prd " ![]() "deploy:acc": "npm run deploy:uva:acc & npm run deploy:hva:acc ", "deploy:tst": "npm run deploy:uva:tst & npm run deploy:hva:tst ", "deploy:dev": "npm run deploy:uva:dev & npm run deploy:hva:dev ", "deploy:hva:prd": "npm run build:hva:prd & firebase deploy -public dist/hva -project status-hva-prd ", "deploy:hva:acc": "npm run build:hva:acc & firebase deploy -public dist/hva -project status-hva-acc ", "deploy:hva:tst": "npm run build:hva:tst & firebase deploy -public dist/hva -project status-hva-tst ", "deploy:hva:dev": "npm run build:hva:dev & firebase deploy -public dist/hva -project status-hva-dev ", "deploy:uva:prd": "npm run build:uva:prd & firebase deploy -public dist/uva -project status-uva-prd ", "deploy:uva:acc": "npm run build:uva:acc & firebase deploy -public dist/uva -project status-uva-acc ", "deploy:uva:tst": "npm run build:uva:tst & firebase deploy -public dist/uva -project status-uva-tst ", "deploy:uva:dev": "npm run build:uva:dev & firebase deploy -public dist/uva -project status-uva-dev ", "build:hva:prd": "ng build hva -c=prd -prod ", "build:hva:acc": "ng build hva -c=acc -prod ", "build:hva:tst": "ng build hva -c=tst -prod ", "build:hva:dev": "ng build hva -c=dev -prod ", "build:uva:prd": "ng build uva -c=prd -prod ", "build:uva:acc": "ng build uva -c=acc -prod ", "build:uva:tst": "ng build uva -c=tst -prod ", "build:uva:dev": "ng build uva -c=dev -prod ", Install script-launcher as a development dependency in your project. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |