summaryrefslogtreecommitdiffstats
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorTrent Richardson <trentdrichardson@gmail.com>2014-05-08 14:21:26 -0400
committerTrent Richardson <trentdrichardson@gmail.com>2014-05-08 14:21:26 -0400
commit08b50b31867141bf4875a9cb282039f232ceb13d (patch)
tree488c0ae779f2c539f3d62593a00852c246945d52 /Gruntfile.js
parent9a28b917055f988bcdf3c7d030087dc7eab1a05b (diff)
downloadjQuery-Timepicker-Addon-08b50b31867141bf4875a9cb282039f232ceb13d.zip
jQuery-Timepicker-Addon-08b50b31867141bf4875a9cb282039f232ceb13d.tar.gz
jQuery-Timepicker-Addon-08b50b31867141bf4875a9cb282039f232ceb13d.tar.bz2
Fixes #723 - Adds build process for i18n into one file
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 9b69bf7..65453e4 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -46,6 +46,22 @@ module.exports = function(grunt) {
'src/docs/footer.html'
],
dest: 'dist/index.html'
+ },
+ i18n: {
+ options: {
+ //stripBanners: true,
+ banner: '<%=banner %>\n(function($){\n\n',
+ footer: '\n})(jQuery);\n',
+ process: function(src, filepath){
+ return '// source: '+ filepath + '\n' +
+ src.replace(/\(function\s*\(\$\)\s*\{/g, '')
+ .replace(/\}\)\(jQuery\)\;/g, '')
+ .replace(/\$\.timepicker\.setDefaults\(\$\.timepicker\.regional\[[a-z\-\'\"]+\]\)\;/gi, '')
+ .trim() +'\n';
+ }
+ },
+ src: [ 'src/i18n/jquery-ui-timepicker-*.js' ],
+ dest: 'dist/i18n/<%=pkg.name %>-i18n.js'
}
},
uglify: {
@@ -55,6 +71,10 @@ module.exports = function(grunt) {
dist: {
src: '<%= concat.dist.dest %>',
dest: 'dist/<%= pkg.name %>.min.js'
+ },
+ i18n: {
+ src: 'dist/i18n/<%=pkg.name %>-i18n.js',
+ dest: 'dist/i18n/<%=pkg.name %>-i18n.min.js'
}
},
cssmin: {