angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Ability to specify different styling per environment

Open jstoppa opened this issue 9 years ago • 25 comments

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request

Versions.

@angular/cli: 1.0.0 node: 6.9.1 os: win32 x64

Desired functionality.

Ability to specify different styling per environment

Mention any other details that might be useful.

I’d like to have the ability to pass the styling when executing ng serve or ng build in the same way the environment parameter works (or… is it a way to do this already with angular cli?) We need this because we are building a product that will have different styling per client

Example: At the moment, the angular-cli.json takes styling like in the example below (adding the environment configuration to put more context to the desired functionality):

"styles": [
 	"styles.scss"
 ],
"environment": "environments/environment.ts",
"environmentSource": "environments/environment.ts",
"environments": {
	"development ": "environments/development/environment.ts",
	"client1": "environments/client1/environment.ts",
	"client2": "environments/client1/environment.ts"
}

I would ideally like to be able to set a different style list per environment, I’m suggesting something like this:

"styles": {
 	"development": [
 		"environments/development/styles/styles.scss"		
 	],
 	"client1": [
 		"environments/client1/styles/styles.scss"		
 	],
 	"client2": [
		"environments/client2/styles/styles.scss"
 	]
 }
"environment" : "environments/environment.ts",
"environmentSource": "environments/environment.ts",
"environments": {
	"development ": "environments/development/environment.ts",
	"client1": "environments/client1/environment.ts",
	"client2": "environments/client1/environment.ts"
}

Then I would run: for development: ng serve --environemnt:development --style:development ng build --bh /development/ --environemnt:development --style:development

for client1: ng serve --environemnt:client1 --style:client1 ng build --bh /client1/ --environemnt:client1 --style:client1

for client2: ng serve --environemnt:client2 --style:client2 ng build --bh /client2/ --environemnt:client2 --style:client2

jstoppa avatar Apr 03 '17 09:04 jstoppa

+1

carndacier avatar Apr 03 '17 09:04 carndacier

Would be good to have this feature :)

mattngan avatar Apr 03 '17 10:04 mattngan

Sounds super dandy

nilsbeuth avatar Apr 03 '17 10:04 nilsbeuth

+1 Have a requirement for this.

jcoo02 avatar Apr 03 '17 15:04 jcoo02

+1

dougfrench avatar Apr 03 '17 17:04 dougfrench

Would be great for templates too.

davkraid avatar Apr 05 '17 12:04 davkraid

+1 I have requirement for it too

changLiuUNSW avatar Apr 19 '17 14:04 changLiuUNSW

+1

werthdavid avatar Apr 24 '17 07:04 werthdavid

+1

marvinhuebner avatar Apr 26 '17 10:04 marvinhuebner

I see there's some interest in this sort of feature. I can't promise something like this is going to happen but will keep the issue open for discussion.

I think it's overloading the environment feature somewhat, since it's meant to separate different deployment environments (such as dev/staging/prod) but in here it also means different variations of the same app.

For instance, if you want to use a certain styling and scripts for Client 1, it stands to reason that you should also have dev/staging/prod environments for that client.

filipesilva avatar May 04 '17 14:05 filipesilva

In my case, I'm looking at using ExtJS for some of my views. ExtJS has it's own build tool, so I'd like to include the appropriate build (testing, dev, prod etc) in the same angular cli build. Maybe there's another way to accomplish the same thing though?

Blacktiger avatar Jul 14 '17 18:07 Blacktiger

Any updates on this?

marvinhuebner avatar Jul 14 '17 18:07 marvinhuebner

+1

aharonbarel avatar Mar 06 '18 14:03 aharonbarel

Does anyone have a solution similar to the suggestion of @jstoppa ? The need is pretty high here

Khanji avatar Apr 05 '18 07:04 Khanji

any updates ?

usmanahmed061 avatar Jul 19 '18 13:07 usmanahmed061

+1

hkreddy avatar Aug 13 '18 10:08 hkreddy

+1

markpenaranda avatar Aug 29 '18 08:08 markpenaranda

+1

gimlidc avatar Sep 19 '18 08:09 gimlidc

+1

felipe-mena avatar Nov 14 '18 07:11 felipe-mena

+1

inesvanstappen avatar Jan 15 '19 07:01 inesvanstappen