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:npm

This is an old revision of the document!


NPM Scripts

NPM is a Javascript and Node.js package manager and task runner. Starting with VuFind® 9.0, it has been configured to run several tasks for front end manipulation and packaging. Earlier VuFind® releases relied on Grunt.

To setup NPM to run, first install node and run “npm install” to install all the dependencies in package.json.

npm run css

Generates any CSS files that require pre-processing inside all available themes. As of this writing, this is an alias for npm run less, but as VuFind® evolves, if we migrate to different technologies, we plan to maintain this alias, so your development routines will not be disrupted.

npm run less

:!: Using “npm run css” instead is recommended; see above.

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:

npm run less

npm run scss

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.

  1. npm run scss

npm run lessToSass

Converts all less files to sass. Mostly for the VuFind® dev team. By default does bootstrap3 and bootprint3.

development/npm.1679509407.txt.gz · Last modified: 2023/03/22 18:23 by demiankatz