2014-08-25
Http://www.w3cplus.com/preprocessor/nodejs-and-grunt-compile-sass-to-css.html
Installation of grunt Sass support, including Grunt watch Boostraps
Gruntfile.js,package.json,Direct test to the new project directory to adjust the use, run the NPM install dependency package, you can cut unnecessary a. Integration method 1.https://github.com/gruntjs/grunt-contrib-sass See the installation method here first, is an official example, after downloading, you can go to the corresponding directory debugging, 2. After the installation is complete, enter this directory, copy2 files to the root directory of Jekyll, respectively, isPackage.jsonAnd
Gruntfile.js
3.package.jsonIt contains some dependent packages that need to be converted to sass.
Gruntfile.jsis the configuration file; 4. Install the dependent package, the command is: NPM install will be installed automatically; 5. When finished, execute the command.
Grunt SassSass for the plug-in assigned to the task name, generally can not be changed, if you want to change, to go to the plug-in corresponding directory, find sass.js modify 6. The Listener file changes the plugin to Grunt-contrib-watch code snippet, to join
Gruntfile.js,As one of the tasks
Watch:{
Scripts:{
Files: [
],
&N Bsp Tasks: [ ' sass '
}
Similar to 7.less support, https://github.com/gruntjs/grunt-contrib-less steps to view the project root directory run:npm Install grunt-contrib-less--save-devBootstraps's
Gruntfile.jsThe configuration file has an instance and can be used to modify it.
Boostraps+jekyll+sass/scss+less+grunt Integration Use detailed memo