Permalink
Browse files

Core: Support jsGrid.vesion property

  • Loading branch information...
1 parent 9bec224 commit 600dc21adb6658c20e3fdb3ffdbd73ad84592d02 @tabalinas committed Jul 8, 2016
Showing with 21 additions and 3 deletions.
  1. +17 −1 Gruntfile.js
  2. +2 −1 package.json
  3. +2 −1 src/jsgrid.core.js
View
@@ -61,6 +61,21 @@
}
},
+ "string-replace": {
+ version: {
+ files: [{
+ src: "<%= concat.js.dest %>",
+ dest: "<%= concat.js.dest %>"
+ }],
+ options: {
+ replacements: [{
+ pattern: /"@VERSION"/g,
+ replacement: "'<%= pkg.version %>'"
+ }]
+ }
+ }
+ },
+
imageEmbed: {
options: {
deleteAfterEncoding : true
@@ -107,8 +122,9 @@
grunt.loadNpmTasks("grunt-image-embed");
grunt.loadNpmTasks("grunt-contrib-cssmin");
grunt.loadNpmTasks("grunt-contrib-qunit");
+ grunt.loadNpmTasks('grunt-string-replace');
- grunt.registerTask("default", ["copy", "concat", "imageEmbed", "uglify", "cssmin"]);
+ grunt.registerTask("default", ["copy", "concat", "string-replace", "imageEmbed", "uglify", "cssmin"]);
grunt.registerTask("test", "qunit");
};
View
@@ -36,6 +36,7 @@
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-qunit": "^0.5.2",
"grunt-contrib-uglify": "^0.4.0",
- "grunt-image-embed": "^0.3.1"
+ "grunt-image-embed": "^0.3.1",
+ "grunt-string-replace": "^1.2.1"
}
}
View
@@ -1450,7 +1450,8 @@
fields: fields,
setDefaults: setDefaults,
locales: locales,
- locale: locale
+ locale: locale,
+ version: "@VERSION"
};
}(window, jQuery));

0 comments on commit 600dc21

Please sign in to comment.