Skip to content

Commit

Permalink
chore(build): add version name to window.ionic
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Mar 19, 2014
1 parent b70543b commit 11c96a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ gulp.task('docs-index', function() {
this.field('path');
this.field('title', {boost: 10});
this.field('body');
this.ref('path')
this.ref('path');
});
var ref = {};

Expand Down Expand Up @@ -100,7 +100,10 @@ gulp.task('docs-index', function() {
})).on('end', function() {
// Write out as one json file
mkdirp.sync('tmp/ionic-site/data');
fs.writeFileSync('tmp/ionic-site/data/index.json', JSON.stringify({'ref': ref, 'index': idx.toJSON()}));
fs.writeFileSync(
'tmp/ionic-site/data/index.json',
JSON.stringify({'ref': ref, 'index': idx.toJSON()})
);
});
});

Expand Down Expand Up @@ -180,6 +183,7 @@ gulp.task('vendor', function() {
gulp.task('scripts', function() {
return gulp.src(buildConfig.ionicFiles)
.pipe(gulpif(IS_RELEASE_BUILD, stripDebug()))
.pipe(template({ pkg: pkg }))
.pipe(concat('ionic.js'))
.pipe(header(banner))
.pipe(gulp.dest(buildConfig.distJs))
Expand All @@ -191,7 +195,7 @@ gulp.task('scripts', function() {

gulp.task('scripts-ng', function() {
return gulp.src(buildConfig.angularIonicFiles)
// .pipe(gulpif(IS_RELEASE_BUILD, stripDebug()))
.pipe(gulpif(IS_RELEASE_BUILD, stripDebug()))
.pipe(concat('ionic-angular.js'))
.pipe(header(banner))
.pipe(gulp.dest(buildConfig.distJs))
Expand Down
2 changes: 1 addition & 1 deletion js/ionic.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
window.ionic = {
controllers: {},
views: {},
version: '{{ VERSION }}'
version: '<%= pkg.version %>'
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"gulp-template": "^0.1.1",
"gulp-concat": "^2.1.7",
"gulp-jshint": "^1.5.0",
"gulp-strip-debug": "0.2.0",
"gulp-sass": "^0.7.1",
"gulp-util": "^2.2.14",
"gulp-uglify": "^0.2.1",
Expand All @@ -43,7 +42,8 @@
"lunr": "0.4.5",
"htmlparser2": "3.7.0",
"js-yaml": "3.0.2",
"event-stream": "3.1.0"
"event-stream": "3.1.0",
"gulp-strip-debug": "^0.3.0"
},
"licenses": [
{
Expand Down

0 comments on commit 11c96a6

Please sign in to comment.