mkdir app01 cd app01 npm init -y npm install --save-dev gulp npm install --save-dev gulp-sass npm install --save-dev sass
A sass csomag helyben is telepítve kell legyen.
$primary-color: #333; $background: skyblue; body { color: $primary-color; background-color: $background; }
const { src, dest } = require('gulp'); const sass = require('gulp-sass')(require('sass')); function buildStyles(cb) { src('src/sass/**/*.scss') .pipe(sass().on('error', sass.logError)) .pipe(dest('src/css')); cb(); } exports.build = buildStyles;