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/07/01 14:24] – [grunt js] crhallbergdevelopment:grunt [2016/09/15 14:13] – [grunt sass] crhallberg
Line 2: Line 2:
  
 [[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. 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]].
 +
 +To setup Grunt to run, first install node and run "npm install" to install all the dependencies in package.json.
  
 ===== Default ===== ===== Default =====
Line 21: Line 23:
   - adjust theme.config.php to point to new compressed file.   - adjust theme.config.php to point to new compressed file.
  
-===== grunt sass =====+===== 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. By default works for bootstrap3 and bootprint3.
  
-  - add path to theme's sass folder to start of loadPath (look up path for imports). <code javascript>loadPath: ["themes/CUSTOM/sass", "themes/bootprint3/sass", "themes/bootstrap3/sass"],</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>
   - add destination file and link to root sass file. <code javascript>files: {   - add destination file and link to root sass file. <code javascript>files: {
-  "themes/bootstrap3/css/compiled.css": "themes/bootstrap3/sass/bootstrap.scss", // you can remove +  "themes/bootstrap3/css/compiled.css": "themes/bootstrap3/scss/bootstrap.scss", // you can remove 
-  "themes/bootprint3/css/compiled.css": "themes/bootprint3/sass/bootprint.scss", // these if you wish +  "themes/bootprint3/css/compiled.css": "themes/bootprint3/scss/bootprint.scss", // these if you wish 
-  "themes/CUSTOM/css/compiled.css": "themes/CUSTOM/sass/custom.scss"+  "themes/CUSTOM/css/compiled.css": "themes/CUSTOM/scss/custom.scss"
 }</code> }</code>
-  - run <code>grunt sass</code>+  - run <code>grunt scss</code>
   - adjust theme.config.php to point to new compressed file.   - adjust theme.config.php to point to new compressed file.
  
development/grunt.txt · Last modified: 2023/03/22 18:25 by demiankatz