About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:grunt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
development:grunt [2016/09/15 14:13] – [grunt sass] crhallbergdevelopment:grunt [2016/09/15 14:22] crhallberg
Line 1: Line 1:
 ====== Grunt Manual ====== ====== Grunt Manual ======
  
-[[http://gruntjs.com/|Grunt]] is a javascript and nodejs based task runner. It has been configured to run several tasks for front end manipulation and packaging. The file has been left simple in order to be easy to edit. You will have to edit Gruntfile.js (root folder) in order to get these scripts to work for custom themes. For more advanced methods, please see our [[development:grunt:scripts|community scripts page]].+[[http://gruntjs.com/|Grunt]] is a javascript and nodejs based task runner. It has been configured to run several tasks for front end manipulation and packaging. For more advanced methods, please see our [[development:grunt:scripts|community scripts page]].
  
 To setup Grunt to run, first install node and run "npm install" to install all the dependencies in package.json. To setup Grunt to run, first install node and run "npm install" to install all the dependencies in package.json.
Line 11: Line 11:
 ===== grunt less ===== ===== grunt less =====
  
-Compiles all less files into a compressed css file. By default works for bootstrap3 and bootprint3.+Compiles all less files into a compressed css file. This script will detect themes inside of your themes directory and build the proper paths for you.
  
 To use: To use:
-  - add path to theme's less folder to start of paths (look up path for imports). <code javascript>paths: ["themes/CUSTOM/less", "themes/bootprint3/less", "themes/bootstrap3/less"],</code> +  - <code>grunt less</code> 
-  - add destination file and link to root less file. <code javascript>files:+  - adjust theme.config.php to point to new compressed file at themes/CUSTOM/css/compiled.css.
-  "themes/bootstrap3/css/compiled.css": "themes/bootstrap3/less/bootstrap.less", // you can remove +
-  "themes/bootprint3/css/compiled.css": "themes/bootprint3/less/bootprint.less", // these if you wish +
-  "themes/CUSTOM/css/compiled.css": "themes/CUSTOM/less/custom.less" +
-}</code> +
-  - run <code>grunt less</code> +
-  - adjust theme.config.php to point to new compressed file.+
  
 ===== grunt scss ===== ===== grunt scss =====
  
-Compiles all sass files into a compressed css file. By default works for bootstrap3 and bootprint3. +Compiles all sass files into a compressed css file. This script will detect themes inside of your themes directory and build the proper paths for you. 
- +  - <code>grunt scss</code> 
-  - add path to theme's sass folder to start of loadPath (look up path for imports). <code javascript>loadPath: ["themes/CUSTOM/sass", "themes/bootprint3/scss", "themes/bootstrap3/scss"],</code> +  - adjust theme.config.php to point to new compressed file at themes/CUSTOM/css/compiled.css.
-  - add destination file and link to root sass file. <code javascript>files:+
-  "themes/bootstrap3/css/compiled.css": "themes/bootstrap3/scss/bootstrap.scss", // you can remove +
-  "themes/bootprint3/css/compiled.css": "themes/bootprint3/scss/bootprint.scss", // these if you wish +
-  "themes/CUSTOM/css/compiled.css": "themes/CUSTOM/scss/custom.scss" +
-}</code> +
-  - run <code>grunt scss</code> +
-  - adjust theme.config.php to point to new compressed file.+
  
 ===== grunt js ===== ===== grunt js =====
development/grunt.txt · Last modified: 2023/03/22 18:25 by demiankatz