From 4e2c7cc91b273c6d822ecf6f3316c7d25cbad65c Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Tue, 21 Oct 2014 11:51:47 -0700 Subject: [PATCH] add build_id.txt (v0.5.9) --- bower.json | 2 +- dist/gulp/main.js | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index c4bd3ab..65f635e 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "author": "Mozilla", "name": "commonplace", "description": "Reusable components for the Firefox Marketplace", - "version": "0.5.8", + "version": "0.5.9", "ignore": [ "bin", "example", diff --git a/dist/gulp/main.js b/dist/gulp/main.js index ef13270..400eb15 100644 --- a/dist/gulp/main.js +++ b/dist/gulp/main.js @@ -5,8 +5,7 @@ var gulp = require('gulp'); var clean = require('gulp-clean'); var concat = require('gulp-concat'); var eventStream = require('event-stream'); -var uglify = require('gulp-uglify'); -var gulpUtil = require('gulp-util'); +var gulpFile = require('gulp-file'); var ignore = require('gulp-ignore'); var insert = require("gulp-insert"); var install = require("gulp-install"); @@ -14,6 +13,8 @@ var order = require('gulp-order'); var minifyCSS = require('gulp-minify-css'); var rename = require('gulp-rename'); var stylus = require('gulp-stylus'); +var uglify = require('gulp-uglify'); +var gulpUtil = require('gulp-util'); var webserver = require('gulp-webserver'); var mergeStream = require('merge-stream'); var path = require('path'); @@ -161,6 +162,14 @@ gulp.task('imgurls_write', ['css_build'], function() { }); +gulp.task('buildID_write', function() { + // Writes build ID to src/media/build_id.txt. + var buildID = new Date().getTime().toString(); + return gulpFile('build_id.txt', buildID) + .pipe(gulp.dest('src/media')); +}); + + gulp.task('js_build', ['templates_build'], function() { // Uses the AMD optimizer to bundle our JS modules. // Will read our RequireJS config to handle shims, paths, and name @@ -228,8 +237,8 @@ gulp.task('watch', function() { gulp.task('default', ['watch', 'serve']); gulp.task('update', ['bower_copy', 'require_config']); -gulp.task('build', ['css_build', 'js_build', 'templates_build', - 'imgurls_write']); +gulp.task('build', ['buildID_write', 'css_build', 'js_build', + 'templates_build', 'imgurls_write']); module.exports = {