In your terminal, create a new folder called mybulma, navigate to it, then type the following command:
--- title: With node-sass layout: documentation doc-tab: customize doc-subtab: node-sass breadcrumb: - home - documentation - customize - customize-node-sass --- {% capture init %} npm init {% endcapture %} {% capture step_1 %}
In your terminal, create a new folder called mybulma, navigate to it, then type the following command:
This will launch an interactive setup to create package.json. When prompted for an entry point, enter sass/mystyles.scss.
You only need 2 packages to customize Bulma: node-sass and bulma itself.
Your package.json should look like this at this point.
To build a CSS file from a Sass file, we can use node scripts. In package.json, add the following:
css-build takes sass/mystyles.scss as an input, and outputs css/mystyles.css, while omitting the source map
css-watch builds the CSS and watches for changes
start is simply a shortcut for css-watch
To test it out, go in your terminal and run the following command:
{% highlight bash %}{{ npm_build }}{% endhighlight %}If set up correctly, you will see the following message:
Reload the page and it should be styled like this:
To watch for changes, just launch the following command:
package.json file'
content=step_1
%}