Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Add Polymer.version
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed May 27, 2014
1 parent 5d17540 commit ef16cc9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
"../polymer-gestures/build.json",
"../polymer-expressions/build.json",
"src/polymer.js",
"build/polymer-versioned.js",
"src/boot.js",
"src/lib/lang.js",
"src/lib/job.js",
Expand Down
2 changes: 1 addition & 1 deletion build/polymer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

<link rel="import" href="layout.html">

<script src="polymer.js"></script>
<script src="build/polymer.js"></script>
18 changes: 17 additions & 1 deletion gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ module.exports = function(grunt) {
}
}
},
'string-replace': {
polymer: {
files: {
'build/polymer-versioned.js': 'src/polymer.js'
},
options: {
replacements: [
{
pattern: 'master',
replacement: '<%= buildversion %>'
}
]
}
}
},
pkg: grunt.file.readJSON('package.json')
});

Expand All @@ -83,6 +98,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-audit');
grunt.loadNpmTasks('grunt-string-replace');

grunt.registerTask('stash', 'prepare for testing build', function() {
grunt.option('force', true);
Expand All @@ -97,7 +113,7 @@ module.exports = function(grunt) {


grunt.registerTask('default', ['minify']);
grunt.registerTask('minify', ['version', 'uglify']);
grunt.registerTask('minify', ['version', 'string-replace', 'uglify']);
grunt.registerTask('docs', ['yuidoc']);
grunt.registerTask('test', ['override-chrome-launcher', 'karma:polymer']);
grunt.registerTask('test-build', ['minify', 'stash', 'test', 'restore']);
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-yuidoc": "*",
"grunt-karma": "^0.8.2",
"grunt-string-replace": "^0.2.7",
"karma": "^0.12.14",
"karma-crbot-reporter": "^0.0.4",
"karma-firefox-launcher": "^0.1.0",
Expand Down
4 changes: 3 additions & 1 deletion src/polymer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
Polymer = {};
Polymer = {
version: 'master'
};

0 comments on commit ef16cc9

Please sign in to comment.