How to save CSS Style changes to ANGULAR 2.0 components form within Chrome Developer Tools?

梦想的初衷 提交于 2019-12-21 20:37:33

问题


I'm building an Angular 2.0 CLI app - and it just happens that i have lots and lot of CSS tweaks to make.

I can of course modify something inside Webstorm, press Ctrl+S and than wait 3-7 seconds for the webpack build process to detect those changes and update the view.

But I feel like I'm wasting a lot of time for little changes like: border-radius form 5px to 3px - it's killing me..

If instead i change stuff inside Chrome Developer Tools - it updates instantly - no time wasted.. Instant Feedback!

Question:

How do i save all those CSS changes form Chrome back into the Angular CLI project? Across multiple components if possible:)

The Big Problem:

I know this is possible with simple css files but the Angular CLI bundles everything inside the main.bundle or styles.bundle or somewhere similar like you can see below: ( this is development mode not production )

I guess this is important, and can be a major draw back inside Angular Community - if hasn't been already figured out by now..Thank's so much!


回答1:


First, you can edit your local css files from chrome devtools.

By adding "extractCss" in angualr.json file, and adding your project folder to devtools filesystem folders, you'll be able to edit your local project files from devtools. Look at my answer here for more details.

As for I feel like I'm wasting a lot of time, there is nothing to do about this, each change in your project css files will resolve in recompiling.



来源:https://stackoverflow.com/questions/39646705/how-to-save-css-style-changes-to-angular-2-0-components-form-within-chrome-devel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!