From 2b193398039cf901929810f171b0d3b550b90388 Mon Sep 17 00:00:00 2001 From: dpilafian Date: Fri, 7 Oct 2022 22:55:55 -0700 Subject: [PATCH] Swap out glup for files-replace Fixes: 9 vulnerabilities (2 moderate, 7 high) --- gulpfile.js | 30 ------------------- package.json | 27 +++++++---------- ...mize-style.css => style-customization.css} | 0 3 files changed, 10 insertions(+), 47 deletions(-) delete mode 100644 gulpfile.js rename src/{customize-style.css => style-customization.css} (100%) diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index b6f3fed..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,30 +0,0 @@ -// HamburgerMenu ☰ MIT License -// Gulp configuration and tasks - -// Imports -import cssNano from 'cssnano'; -import gap from 'gulp-append-prepend'; -import gulp from 'gulp'; -import postCss from 'gulp-postcss'; -import rename from 'gulp-rename'; -import size from 'gulp-size'; - -// Tasks -const task = { - - minifyCss() { - return gulp.src('src/hamburger-menu.css') - .pipe(gap.appendFile('src/customize-style.css')) - .pipe(gap.appendText('\n')) - .pipe(gulp.dest('build')) - .pipe(postCss([cssNano()])) - .pipe(rename({ extname: '.min.css' })) - .pipe(gap.appendText('\n')) - .pipe(size({ showFiles: true })) - .pipe(gulp.dest('build')); - }, - - }; - -// Gulp -gulp.task('minify-css', task.minifyCss); diff --git a/package.json b/package.json index 87e99b7..0003d44 100644 --- a/package.json +++ b/package.json @@ -43,13 +43,14 @@ "scripts": { "step:01": "rimraf build dist **/.DS_Store", "step:02": "jshint . --exclude-path .gitignore", - "step:05": "gulp minify-css", - "step:06": "copy-folder src --ext=.js build", - "step:07": "uglifyjs src/hamburger-menu.js --output build/hamburger-menu.min.js", - "step:08": "add-dist-header build dist --delimiter=☰", - "step:09": "copy-file dist/hamburger-menu.css --folder docs", - "step:10": "copy-file dist/hamburger-menu.js --folder docs", - "step:11": "html-validator", + "step:10": "files-replace src --ext=.css build --concat=hamburger-menu.css", + "step:11": "csso build/hamburger-menu.css --output build/hamburger-menu.min.css", + "step:12": "copy-folder src --ext=.js build", + "step:13": "uglifyjs src/hamburger-menu.js --output build/hamburger-menu.min.js", + "step:20": "add-dist-header build dist --delimiter=☰", + "step:30": "copy-file dist/hamburger-menu.css --folder docs", + "step:31": "copy-file dist/hamburger-menu.js --folder docs", + "step:40": "html-validator", "pretest": "npm-run-all step:*", "test": "mocha spec/*.spec.js", "interactive": "npm test && browser-sync docs --watch" @@ -61,23 +62,15 @@ "@fortawesome/fontawesome-free": "~6.2", "add-dist-header": "~0.3", "assert-deep-strict-equal": "~1.0", - "babel-minify": "~0.5", "browser-sync": "~2.27", "copy-file-util": "~0.1", "copy-folder-cli": "~0.1", - "cssnano": "~5.1", + "csso-cli": "~4.0", "dna.js": "~2.0", - "gulp": "~4.0", - "gulp-append-prepend": "~1.0", - "gulp-babel": "~8.0", - "gulp-postcss": "~9.0", - "gulp-rename": "~2.0", - "gulp-replace": "~1.1", - "gulp-size": "~4.0", + "files-replace": "~0.1", "jshint": "~2.13", "mocha": "~10.0", "npm-run-all2": "~6.0", - "postcss": "~8.4", "rimraf": "~3.0", "uglify-js": "~3.17", "w3c-html-validator": "~1.1", diff --git a/src/customize-style.css b/src/style-customization.css similarity index 100% rename from src/customize-style.css rename to src/style-customization.css