This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the gulp-bump plugin to gulpfile.js
- Loading branch information
Maurizio Turatti
committed
Mar 17, 2016
1 parent
3e722c9
commit 469fb54
Showing
3 changed files
with
68 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,57 @@ | ||
/** | ||
* IMPORTANT: set the version number here when ready for a new release | ||
* then run the 'gulp build' task to update both bower.json and package.json | ||
* See the README.md file for more information. | ||
*/ | ||
var VERSION = '1.1.5'; | ||
|
||
var gulp = require('gulp'), | ||
del = require('del'), | ||
runSequence = require('run-sequence'), | ||
concat = require('gulp-concat'), | ||
uglify = require('gulp-uglify'); | ||
del = require('del'), | ||
runSequence = require('run-sequence'), | ||
concat = require('gulp-concat'), | ||
uglify = require('gulp-uglify'), | ||
bump = require('gulp-bump'); | ||
|
||
// Update bower, component, npm at once: | ||
gulp.task('bump', function() { | ||
gulp.src(['./bower.json', './component.json', './package.json']) | ||
.pipe(bump({ | ||
version: VERSION | ||
})) | ||
.pipe(gulp.dest('./')); | ||
}); | ||
|
||
gulp.task('default', function(callback) { | ||
runSequence('build', callback); | ||
runSequence('build', callback); | ||
}); | ||
|
||
gulp.task('build', function (callback) { | ||
runSequence( | ||
'clean', | ||
'copy-build', | ||
callback); | ||
gulp.task('build', function(callback) { | ||
runSequence( | ||
'clean', | ||
'bump', | ||
'copy-build', | ||
callback); | ||
}); | ||
|
||
|
||
gulp.task('clean', function () { | ||
return del(['./dist'], {force: true}); | ||
gulp.task('clean', function() { | ||
return del(['./dist'], { | ||
force: true | ||
}); | ||
}); | ||
|
||
gulp.task('copy-build', [ 'concat-js','concat-min-js']); | ||
gulp.task('copy-build', ['concat-js', 'concat-min-js']); | ||
|
||
|
||
gulp.task('concat-js', function () { | ||
return gulp.src(['./angular-restheart.module.js','./angular-restheart.config.js','./services/**/*.js','!node_modules{,/**}','!example/{,/**}','!gulpfile.js']) | ||
.pipe(concat('angular-restheart.js')) | ||
.pipe(gulp.dest('./dist')); | ||
gulp.task('concat-js', function() { | ||
return gulp.src(['./angular-restheart.module.js', './angular-restheart.config.js', './services/**/*.js', '!node_modules{,/**}', '!example/{,/**}', '!gulpfile.js']) | ||
.pipe(concat('angular-restheart.js')) | ||
.pipe(gulp.dest('./dist')); | ||
}); | ||
|
||
gulp.task('concat-min-js', function () { | ||
return gulp.src(['./angular-restheart.module.js','./angular-restheart.config.js','./services/**/*.js','!node_modules{,/**}','!example/{,/**}','!gulpfile.js']) | ||
.pipe(concat('angular-restheart.min.js')) | ||
.pipe(uglify()) | ||
.pipe(gulp.dest('./dist')); | ||
gulp.task('concat-min-js', function() { | ||
return gulp.src(['./angular-restheart.module.js', './angular-restheart.config.js', './services/**/*.js', '!node_modules{,/**}', '!example/{,/**}', '!gulpfile.js']) | ||
.pipe(concat('angular-restheart.min.js')) | ||
.pipe(uglify()) | ||
.pipe(gulp.dest('./dist')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters