1) Installare node-sass (con npm).
2) Creare un file scss che importa il file scss di bootstrap:
ex:
$theme-colors: (
"primary": #0074d9,
"danger": #ff4136
);
@import "bootstrap/scss/bootstrap";
dove l'ultimo bootstrap ad ex: si riferisce al file bootstrap.scss (che importa tutto il resto).
3) nella root del sito digitare npm itim e configurare (anche vuoto) il file package.json
4) "scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-css": "node-sass --include-path scss custom.scss css/main3.css",
},
dentro scripts inserire un nome comando (ex:"build-css")e l'azione: (node-sass con i percorsi dei due files: scss e quello compilato in css).
5) eseguire "npm run build-css" e condire a piacere
Nessun commento:
Posta un commento