mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
Add proper clean task.
This commit is contained in:
parent
64199f911b
commit
2635f30eea
2 changed files with 10 additions and 3 deletions
11
gulpfile.js
11
gulpfile.js
|
@ -1,4 +1,3 @@
|
|||
// Main Gulp
|
||||
var gulp = require("gulp");
|
||||
var runseq = require('run-sequence');
|
||||
var clean = require("gulp-clean");
|
||||
|
@ -7,8 +6,8 @@ var plumber = require("gulp-plumber");
|
|||
var autoprefixer = require('gulp-autoprefixer');
|
||||
var watch = require("gulp-watch");
|
||||
var cssmin = require("gulp-cssmin");
|
||||
var rimraf = require("rimraf");
|
||||
|
||||
// Paths
|
||||
var paths = {};
|
||||
paths.app = "./resources/";
|
||||
paths.output = "./resources/public/";
|
||||
|
@ -42,6 +41,12 @@ gulp.task("styles:dist", function(next) {
|
|||
runseq("scss", "autoprefixer", next);
|
||||
});
|
||||
|
||||
gulp.task("clean", function(next) {
|
||||
rimraf(paths.output + "css/", function() {
|
||||
rimraf(paths.output + "js/", next)
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task("copy", function() {
|
||||
return gulp.src(paths.output + "/**/*.*")
|
||||
.pipe(gulp.dest(paths.dist));
|
||||
|
@ -49,7 +54,7 @@ gulp.task("copy", function() {
|
|||
|
||||
// Default
|
||||
gulp.task("dist", function(next) {
|
||||
runseq("styles:dist", "cssmin", "copy", next);
|
||||
runseq("clean", "styles:dist", "cssmin", "copy", next);
|
||||
});
|
||||
|
||||
// Watch
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"scripts": {
|
||||
"watch": "gulp",
|
||||
"dist": "./scripts/dist && gulp dist",
|
||||
"clean": "gulp clean",
|
||||
"figwheel": "./scripts/figwheel",
|
||||
"test-watch": "./scripts/watch",
|
||||
"test-build": "./scripts/build",
|
||||
|
@ -23,6 +24,7 @@
|
|||
"gulp-plumber": "1.1.0",
|
||||
"gulp-sass": "2.2.0",
|
||||
"gulp-watch": "4.3.5",
|
||||
"rimraf": "2.5.2",
|
||||
"run-sequence": "1.1.5"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in a new issue