diff --git a/gulpfile.js b/gulpfile.js index 89e93053..19c3caa5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -51,6 +51,9 @@ var createBuildFormatTask = function(type){ cwd:pkg.sources.dir, base:pkg.sources.dir }) + .pipe(gulpif(function(file){ + return file.path.indexOf('Hilo.js') > -1; + }, replace('{{$version}}', pkg.version))) .pipe(replace(licenseCommentReg, '')) .pipe(replace(apiCommentReg, '$1')) .pipe(transformModule(type)) diff --git a/src/core/Hilo.js b/src/core/Hilo.js index 7a57429f..7ea4426d 100644 --- a/src/core/Hilo.js +++ b/src/core/Hilo.js @@ -23,6 +23,11 @@ var win = window, doc = document, docElem = doc.documentElement, uid = 0; return { + /** + * Hilo version + * @type String + */ + version:'{{$version}}', /** * @language=en * Gets a globally unique id. Such as Stage1, Bitmap2 etc.