Angular CLI + npm + prebuild -


i've angular 2 project (that uses npm) created angluar-cli.

i'd copy folder in folder before each compilation. idea have multiple theme (multiple folders) , copy 1 of theme ( choosen via variable 'themeid' ).

is possible ?

  • how execute copy script before each compilation ( script has work on windows or linux!) ?
  • how set param themeid argument passed script , how set default value of variable if not set ?

thx in advance.

now use nodejs script executed in npm scripts conf (package.json) , use environnement variables using --projectname:client=client1

here part of package.json

 "config": {   //default value   "client": "client0" }   "scripts": {  //link nodejs file who's using process.env.npm_package_config_client variable    "prestart": "node inoscripts/copyfiles.js",    "ng": "ng",    "start": "ng serve",    "test": "ng test",    "lint": "ng lint",    "e2e": "ng e2e" } 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -