Migrate to @Mister-Hope's better gulp-sass

See why: https://github.com/Mister-Hope/gulp-sass#compare
This commit is contained in:
Nikita Karamov 2021-03-12 20:31:20 +01:00
parent 8c4d6f510e
commit 02eb6950da
No known key found for this signature in database
GPG key ID: EA4E7DECEEA050E4
4 changed files with 108 additions and 895 deletions

View file

@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Node.js version is now 14, since it's now supported by Vercel - Node.js version is now 14, since it's now supported by Vercel
### Security
- migrated from `gulp-sass` to `@mr-hope/gulp-sass` to avoid loading and building `node-sass` and other old deps
## [1.1.1] - 2021-03-03 ## [1.1.1] - 2021-03-03
### Added ### Added

View file

@ -1,10 +1,9 @@
const gulp = require('gulp'); const gulp = require('gulp');
const postcss = require('gulp-postcss'); const postcss = require('gulp-postcss');
const pug = require('gulp-pug'); const pug = require('gulp-pug');
const sass = require('gulp-sass'); const { sass, sassSync } = require("@mr-hope/gulp-sass");
const terser = require('gulp-terser'); const terser = require('gulp-terser');
sass.compiler = require('sass');
function html() { function html() {
return gulp.src('./src/index.pug') return gulp.src('./src/index.pug')
@ -14,7 +13,7 @@ function html() {
function css() { function css() {
return gulp.src('./src/style/*.scss') return gulp.src('./src/style/*.scss')
.pipe(sass.sync().on('error', sass.logError)) .pipe(sassSync().on('error', sass.logError))
.pipe(postcss([require('autoprefixer'), require('cssnano')])) .pipe(postcss([require('autoprefixer'), require('cssnano')]))
.pipe(gulp.dest('./dist/')); .pipe(gulp.dest('./dist/'));
} }

View file

@ -12,13 +12,13 @@
"serve": "sirv dist/ --dev" "serve": "sirv dist/ --dev"
}, },
"devDependencies": { "devDependencies": {
"@mr-hope/gulp-sass": "^2.0.0",
"autoprefixer": "^10.2.4", "autoprefixer": "^10.2.4",
"browserslist": "^4.14.4", "browserslist": "^4.14.4",
"cssnano": "^4.1.10", "cssnano": "^4.1.10",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"gulp-postcss": "^9.0.0", "gulp-postcss": "^9.0.0",
"gulp-pug": "^4.0.1", "gulp-pug": "^4.0.1",
"gulp-sass": "^4.1.0",
"gulp-terser": "^1.4.0", "gulp-terser": "^1.4.0",
"postcss": "^8.2.4", "postcss": "^8.2.4",
"pug": "^3.0.1", "pug": "^3.0.1",

992
yarn.lock

File diff suppressed because it is too large Load diff