.Net Core Assets Compilation 📂


.Net Core project is integrated with Webpack and Gulp (see available tasks):

For SCSS:

  • All *.scss files within wwwroot/ directory are processed by node-sass. Output files will have the next filename format: {filename}.dist.css. Example:
  • Note: You can use the below SCSS file to write your own custom style.

    body{
      background-color: #fafafa;
    }
  • wwwroot\vendor\scss\*.scss files will be processed and generated css files as wwwroot\vendor\css\*.dist.css.
  • Include this css file to the template :
  • <environment include="Development"><link rel="stylesheet" href="~/css/site.dist.css" /></environment>
    <environment exclude="Development"><link rel="stylesheet" href="~/css/site.dist.css" asp-append-version="true" /></environment>

For JS:

  • All .js files within wwwroot/ directory are processed by Webpack. Output files will have the next filename format: {filename}.dist.js. Example:
  • Note: You can use the below site.js file to write your own custom script.

    $(() => {
      alert('Alert Success!')
    })
  • wwwroot\vendor\js\*.js files will be processed and generated js files as wwwroot\vendor\js\*.dist.js.
  • Include this js file to the template :
  • <environment include="Development"><script src="~/js/site.dist.js"></script></environment>
    <environment exclude="Development"><script src="~/js/site.dist.js" asp-append-version="true"></script></environment>
© 2017- ThemeSelection, Hand-crafted & Made with ❤️