Learn how to use Now’s included npm scripts to start a local server, compile source scss code, run tests, and more.
Bootstrap uses NPM scripts for its build system. Our package.json includes convenient methods for working with the framework, including compiling code, running tests, and more.
To use our build system and use Sass to customize your website you’ll need a copy of Now UI Design System source files and Node. Follow these steps and you should be ready to rock:
- Download and install Node.js, which we use to manage our dependencies.
Navigate to the root
/directory and run
npm installto install our local dependencies.
When completed, you’ll be able to run the various commands provided from the command line.
||for opening the Presentation Page (default) of the product. You can set in gulpfile.js from your downloaded archive any page you want to open in browser, at line 30: gulp.src(‘index.html’).|
||for a single compilation|
||for continous compilation of the changes that you make in *.scss files. This command should be run in the same folder where gulpfile.js and package.json are located.|
Now UI uses Autoprefixer (included in our build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins like those found in v3.
Should you encounter problems with installing dependencies,
uninstall all previous dependency versions (global and local). Then,