Setting up node-sass
Bulma is built with Sass, a CSS preprocessor. Although it’s originally written in Ruby (and available as a Ruby gem), it’s recommended to use the faster C/C++ compiler LibSass.
Most developers actually use node-sass, which provides binding for Node.js to LibSass. This is the library we’re going to use here.
You need to have NodeJS installed on your computer.
Creating package.json
With your terminal, go to the folder where you’ve saved your HTML files (alongside books.html
, customers.html
, etc.), and type the following:
npm init
Follow the instructions. This will create a package.json
file.
Then type the following:
npm i bulma node-sass --save-dev
This will add the dev dependencies to your package.json
:
"devDependencies"
:
{
"bulma"
:
"^0.6.2"
,
"node-sass"
:
"^4.7.2"
}
Right now, the list of scripts only has one called test
, which simply echos an error message and exits.
Replace that...