ASP.NET 5 MVC6 Custom CSS & Javascript placing convention

喜夏-厌秋 提交于 2019-12-04 08:33:54

I do have app and vendor folders outside wwwroot. In vendor, I customize libraries like bootstrap, themes. In app I have my own css, less and js files for the application. I also have an asset path inside app for anything that needs to be copied (folder font shown in the screenshot)

Then I use the opinionated really easy to use and way better than grunt or gulp tool: brunch.

With this simple config, I get sourcemaps, concat, jshint, and with --production also uglify, minify, csso. Adding anything else to the pipeline is simple as installing a brunch-plugin, so I recommend to also check http://brunch.io/ out.

Any static files (.css, .js) should be added directly into the wwwroot path (e.g. wwwroot/scripts, wwwroot/css). Anything that will be compiled into static files (.ts, .less) should be put into an Assets directory (or whatever name you like) in your project and output into the wwwroot path during compilation (generally configured through grunt compilation tasks).

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