Reputation: 261
I've an angular 2 project (that uses npm) created with angluar-cli.
I'd like to copy a folder in a another folder before each compilation. the idea is have multiple theme (multiple folders) and copy one of theme ( choosen via a variable 'themeId' ).
Is it possible ?
Thx in advance.
Upvotes: 0
Views: 2513
Reputation: 261
now i use nodejs script executed in npm scripts conf (package.json) and use environnement variables using --projectname:client=client1
HERE SOME PART OF MY package.json
"config": {
//default value
"client": "client0"
}
"scripts": {
//link to 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"
}
Upvotes: 2