mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-23 09:26:51 -05:00
changed naming approach for prerelease versions
This commit is contained in:
parent
3883981097
commit
83ae546ad6
2 changed files with 13 additions and 6 deletions
17
Gulpfile.js
17
Gulpfile.js
|
@ -87,11 +87,11 @@ gulp.task('release:push:docs', function(callback) {
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build:dev', function() {
|
gulp.task('build:dev', function() {
|
||||||
return build(extend(extend({}, pkg), { version: 'dev' }));
|
return build(extend(extend({}, pkg), { version: pkg.version + '-dev' }));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build:edge', function() {
|
gulp.task('build:edge', function() {
|
||||||
return build(extend(extend({}, pkg), { version: 'master' }));
|
return build(extend(extend({}, pkg), { version: pkg.version + '-alpha' }));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build:release', function() {
|
gulp.task('build:release', function() {
|
||||||
|
@ -113,7 +113,14 @@ gulp.task('watch', function() {
|
||||||
|
|
||||||
var bundle = function() {
|
var bundle = function() {
|
||||||
gutil.log('Updated bundle build/matter-dev.js');
|
gutil.log('Updated bundle build/matter-dev.js');
|
||||||
b.bundle().pipe(fs.createWriteStream('build/matter-dev.js'));
|
b.bundle()
|
||||||
|
.pipe(through2({ objectMode: true }, function(chunk, encoding, callback) {
|
||||||
|
return callback(
|
||||||
|
null,
|
||||||
|
chunk.toString().replace(/@@VERSION@@/g, pkg.version + '-dev')
|
||||||
|
);
|
||||||
|
}))
|
||||||
|
.pipe(fs.createWriteStream('build/matter-dev.js'));
|
||||||
};
|
};
|
||||||
|
|
||||||
b.on('update', bundle);
|
b.on('update', bundle);
|
||||||
|
@ -243,7 +250,7 @@ var build = function(options) {
|
||||||
gutil.log('Building', filename, options.date);
|
gutil.log('Building', filename, options.date);
|
||||||
|
|
||||||
var compiled = gulp.src(['src/module/main.js'])
|
var compiled = gulp.src(['src/module/main.js'])
|
||||||
.pipe(replace("version = 'master'", "version = '" + options.version + "'"))
|
.pipe(replace('@@VERSION@@', options.version))
|
||||||
.pipe(through2.obj(function(file, enc, next){
|
.pipe(through2.obj(function(file, enc, next){
|
||||||
browserify(file.path, { standalone: 'Matter' })
|
browserify(file.path, { standalone: 'Matter' })
|
||||||
.bundle(function(err, res){
|
.bundle(function(err, res){
|
||||||
|
@ -252,7 +259,7 @@ var build = function(options) {
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (options.version !== 'dev') {
|
if (!options.version.includes('-')) {
|
||||||
compiled.pipe(preprocess({ context: { DEBUG: false } }));
|
compiled.pipe(preprocess({ context: { DEBUG: false } }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ var Plugin = require('./Plugin');
|
||||||
* @readOnly
|
* @readOnly
|
||||||
* @type {String}
|
* @type {String}
|
||||||
*/
|
*/
|
||||||
Matter.version = 'master';
|
Matter.version = '@@VERSION@@';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of plugin dependencies to be installed. These are normally set and installed through `Matter.use`.
|
* A list of plugin dependencies to be installed. These are normally set and installed through `Matter.use`.
|
||||||
|
|
Loading…
Reference in a new issue