![]() ![]() sass input.scss:output. This produces a CSS file much small smaller in size, which results in improved loading time during production. This writes the entire stylesheet on a single line. It should look similar to the following example.Īll we need to do now is to run the following command when we want to build our final CSS file. Minifying the SASS file: We can use the style flag with compressed as an argument to remove any extra space from the file. We will use NPM scripts and Node packages for the example build process in this lesson, so open up your package.jsonįile. Again, gulp is there to automate this process. In that case, youll simply have to run two commands. Or perhaps you were trying to get a unminified and a minified version alongside. Use node-sass to minify your CSS If you want to turn your. The build process includes things like the compiling, concatenating, minifying etc. sass sass/style.scss:css/ -style compressed Add -watch if you want to have it react to file changes in your scss file. ![]() css files but without using Webpack or Gulp, just install the node-sass package using npm package manager and then run this on your terminal: sass scss/style.scss css/style.css -style compressed And now, you can use your style. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |