Skip to content

Commit

Permalink
Added VERSION to the build preprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Boyle committed May 17, 2016
1 parent 619e875 commit 3886f18
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pixi-animate",
"version": "0.5.0",
"version": "0.5.1",
"main": "dist/pixi-animate.min.js",
"dependencies":
{
Expand All @@ -18,4 +18,4 @@
"package.json",
".gitignore"
]
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pixi-animate",
"description": "PIXI plugin for the PixiAnimate Extension",
"version": "0.5.0",
"version": "0.5.1",
"main": "dist/pixi-animate.min.js",
"author": "Matt Karl <[email protected]>",
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (typeof module !== 'undefined' && module.exports) {
// Export the module
module.exports = require('./animate').default;
}
// If we're in the browser make sure PIXI is available
// If we're in the browser make sure PIXI is available
else if (typeof PIXI === 'undefined') {
throw "Requires PIXI";
}
Expand All @@ -32,4 +32,5 @@ else if (typeof PIXI === 'undefined') {
require('./mixins');

// Assign to global namespace
PIXI.animate = require('./animate').default;
PIXI.animate = require('./animate').default;
PIXI.animate.VERSION = '/* @echo VERSION */' || '';
7 changes: 4 additions & 3 deletions tasks/common/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = function(gulp, options, plugins, debug) {
function header() {
return plugins.header(
plugins.fs.readFileSync(__dirname + '/header.txt', 'utf8'), {
pkg: options.pkg
pkg: options.pkg
}
);
}
Expand Down Expand Up @@ -46,7 +46,8 @@ module.exports = function(gulp, options, plugins, debug) {
.pipe(plugins.preprocess({
context: {
DEBUG: debug,
RELEASE: !debug
RELEASE: !debug,
VERSION: options.pkg.version
}
}));

Expand All @@ -58,4 +59,4 @@ module.exports = function(gulp, options, plugins, debug) {
.pipe(header())
.pipe(gulp.dest(options.dest));
}
};
};

0 comments on commit 3886f18

Please sign in to comment.