gulpfile.js:
const { src, dest } = require('gulp');
const scss = require('gulp-sass');
function styles() {
return src('app/scss/style.scss')
.pipe(scss())
.pipe(dest('app/css'))
}
exports.styles = styles;
main.scss:
.testr{
text-align: center;
&__box{
margin: 0;
}
}
package.json:
{
"name": "gulp-start",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gulp": "^4.0.2",
"gulp-sass": "^4.1.0"
}
}