0

I'm developing a SPA application in VS. I have separated html (angularjs) and webapi services. I develop html pages and css in WebStorm (which is perfect for the job) and VS for webapi (WebStorm and VS project folders are the same). Everything works fine but I want to minimize html pages and assets automatically when deploying to Azure through VS. I learnt that casette can do this but you need to have razor pages and reference bundles inside.

When I put my html inside a razor page then I lose WebStorm development (can't see references and can't debug angularjs). Is there a solution to this situation? I want to develop html/css completely on WebStrom and when I deploy in release config, I want this html/css/js to be minified without their names changed (so js/css references in html will be correct). I don't want to do this manually for each html/js/css, there should be an automated solution.

1 Answers1

2

I can suggest using Grunt - it can be run from WebStorm (and doesn't require using any .NET technologies WebStorm knows nothing of) and has tasks for minifying HTML, CSS and JS. See https://stackoverflow.com/questions/728260/html-minification for more info.

Community
  • 1
  • 1
lena
  • 90,154
  • 11
  • 145
  • 150