Skip to content

Commit

Permalink
Fix #189
Browse files Browse the repository at this point in the history
  • Loading branch information
joelthorner committed Sep 9, 2019
1 parent 56cca11 commit c914f35
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
18 changes: 16 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const VERSION = "2.3.15";

var gulp = require('gulp');
var replace = require('gulp-replace');

const libsJs = [
'node_modules/jquery/dist/jquery.min.js',
Expand All @@ -21,7 +24,7 @@ const libsCss = [
'node_modules/node-snackbar/dist/snackbar.min.css',
]

gulp.task('default', function () {
gulp.task('update-libs', function () {
libsJs.forEach(libJs => {
gulp.src(libJs).pipe(gulp.dest('js/libs'));
});
Expand All @@ -33,7 +36,18 @@ gulp.task('default', function () {
});
});


gulp.task('version', function(){
gulp.src(['package.json', 'package-lock.json'])
.pipe(replace(/"version":\s"\d{1,3}.\d{1,3}.\d{1,3}"/, `"version": "${VERSION}"`))
.pipe(gulp.dest('.'));

gulp.src(['manifest.json'])
.pipe(replace(/"version":\s"\d{1,3}.\d{1,3}.\d{1,3}"/, `"version": "${VERSION}"`))
.pipe(gulp.dest('.'));
});

// execute for update dependencies:
// $ npm update
// $ gulp
// $ gulp update-libs
// Execute any scss compiler (pending to do in gulp)
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tlmanager",
"version": "2.3.14",
"version": "2.3.15",
"description": "Development tool",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand All @@ -27,6 +27,7 @@
"sweetalert2": "^8.17.1"
},
"devDependencies": {
"gulp": "^4.0.2"
"gulp": "^4.0.2",
"gulp-replace": "^1.0.0"
}
}

0 comments on commit c914f35

Please sign in to comment.