Skip to content

Commit ffa2f26

Browse files
committed
Add aeq.version and keep it in sync with package
1 parent bdbadb1 commit ffa2f26

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

gulpfile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,14 @@ gulp.task('package:all', function () {
267267
.pipe(gulp.dest('./dist'));
268268
});
269269

270+
gulp.task('update-version', ['update-version:aeq', 'build:docs'] )
271+
272+
gulp.task('update-version:aeq', function() {
273+
return gulp.src(['lib/main.js'])
274+
.pipe(replace( /^(aeq\.version = ")\d+\.\d+\.\d+(")/m, `$1${pkg.version}$2`))
275+
.pipe(gulp.dest('lib/'))
276+
})
277+
270278

271279
function now() {
272280
var div = "";

lib/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ var aeq = function(selector, context) {
6464
return result;
6565
};
6666

67+
aeq.version = "0.1.1"
68+
6769
aeq.thisObj = this;
6870

6971
if ( typeof module === 'object' ) {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"deploy-bitbucket": "gulp deploy:bitbucket",
9+
"version": "gulp update-version && git add docs lib/main.js",
910
"prepublish": "gulp build-aequery"
1011
},
1112
"files": [

0 commit comments

Comments
 (0)