mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(build): fix version.json
This commit is contained in:
27
gulpfile.js
27
gulpfile.js
@@ -46,11 +46,14 @@ gulp.task('watch', function() {
|
||||
gulp.watch('scss/**/*.scss', ['sass']);
|
||||
});
|
||||
|
||||
gulp.task('changelog', function() {
|
||||
gutil.log(gutil.colors.red('TODO: Add working changelog task'));
|
||||
});
|
||||
|
||||
gulp.task('bundle', [
|
||||
'scripts',
|
||||
'scripts-ng',
|
||||
'vendor',
|
||||
'version',
|
||||
], function() {
|
||||
IS_RELEASE_BUILD && gulp.src(buildConfig.ionicBundleFiles.map(function(src) {
|
||||
return src.replace(/.js$/, '.min.js');
|
||||
@@ -59,6 +62,16 @@ gulp.task('bundle', [
|
||||
.pipe(concat('ionic.bundle.min.js'))
|
||||
.pipe(gulp.dest(buildConfig.distJs));
|
||||
|
||||
var d = new Date();
|
||||
fs.writeFileSync('dist/version.json', JSON.stringify({
|
||||
version: pkg.version,
|
||||
codename: pkg.codename,
|
||||
date: d.toISOString().substring(0,10),
|
||||
time: pad(d.getUTCHours()) +
|
||||
':' + pad(d.getUTCMinutes()) +
|
||||
':' + pad(d.getUTCSeconds())
|
||||
}, null, 2));
|
||||
|
||||
return gulp.src(buildConfig.ionicBundleFiles)
|
||||
.pipe(header(buildConfig.bundleBanner))
|
||||
.pipe(concat('ionic.bundle.js'))
|
||||
@@ -81,18 +94,6 @@ gulp.task('ddescribe-iit', function() {
|
||||
]));
|
||||
});
|
||||
|
||||
gulp.task('version', function(done) {
|
||||
var d = new Date();
|
||||
fs.writeFile('dist/version.json', JSON.stringify({
|
||||
version: pkg.version,
|
||||
codename: pkg.codename,
|
||||
date: d.toISOString().substring(0,10),
|
||||
time: pad(d.getUTCHours()) +
|
||||
':' + pad(d.getUTCMinutes()) +
|
||||
':' + pad(d.getUTCSeconds())
|
||||
}, null, 2), done);
|
||||
});
|
||||
|
||||
gulp.task('vendor', function() {
|
||||
return gulp.src(buildConfig.vendorFiles, {
|
||||
cwd: 'config/lib/',
|
||||
|
||||
Reference in New Issue
Block a user