Adding "clean source" task to gulp file
This commit is contained in:
parent
d8c00eff2a
commit
fdaf21d765
|
@ -39,6 +39,7 @@ var clone = require('gulp-clone');
|
||||||
var merge = require('gulp-merge');
|
var merge = require('gulp-merge');
|
||||||
var sourcemaps = require('gulp-sourcemaps');
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
var browserSync = require('browser-sync').create();
|
var browserSync = require('browser-sync').create();
|
||||||
|
var del = require('del');
|
||||||
|
|
||||||
|
|
||||||
// Run:
|
// Run:
|
||||||
|
@ -160,13 +161,16 @@ gulp.task('scripts', function() {
|
||||||
.pipe(gulp.dest('./js/'));
|
.pipe(gulp.dest('./js/'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('clean-source', function () {
|
||||||
|
return del(['src/**/*',]);
|
||||||
|
});
|
||||||
|
|
||||||
// Run:
|
// Run:
|
||||||
// gulp copy-assets.
|
// gulp copy-assets.
|
||||||
// Copy all needed dependency assets files from bower_component assets to themes /js, /scss and /fonts folder. Run this task after bower install or bower update
|
// Copy all needed dependency assets files from bower_component assets to themes /js, /scss and /fonts folder. Run this task after bower install or bower update
|
||||||
|
|
||||||
////////////////// All Bootstrap SASS Assets /////////////////////////
|
////////////////// All Bootstrap SASS Assets /////////////////////////
|
||||||
gulp.task('copy-assets', function() {
|
gulp.task('copy-assets', ['clean-source'], function() {
|
||||||
|
|
||||||
////////////////// All Bootstrap 4 Assets /////////////////////////
|
////////////////// All Bootstrap 4 Assets /////////////////////////
|
||||||
// Copy all Bootstrap JS files
|
// Copy all Bootstrap JS files
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "gulp copy-assets"
|
"postinstall": "gulp copy-assets"
|
||||||
},
|
},
|
||||||
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/holger1411/understrap.git"
|
"url": "https://github.com/holger1411/understrap.git"
|
||||||
|
@ -27,6 +26,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^4.0.0-alpha.6",
|
"bootstrap": "^4.0.0-alpha.6",
|
||||||
"browser-sync": "^2.18.5",
|
"browser-sync": "^2.18.5",
|
||||||
|
"del": "^2.2.2",
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
"gulp-clone": "^1.0.0",
|
"gulp-clone": "^1.0.0",
|
||||||
|
|
Reference in New Issue