]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Working on minification grunt tasks
authorTim Wood <washwithcare@gmail.com>
Wed, 29 Aug 2012 01:48:00 +0000 (18:48 -0700)
committerTim Wood <washwithcare@gmail.com>
Wed, 29 Aug 2012 01:48:00 +0000 (18:48 -0700)
grunt.js

index 4d1b9efd266a9820ee3588e7741c1761392fe61d..8a737b50c9c07831499d4dfe7f9fff472ca88cfa 100644 (file)
--- a/grunt.js
+++ b/grunt.js
@@ -1,6 +1,30 @@
+var fs = require('fs');
+
 module.exports = function(grunt) {
 
+    var min = {
+        langs: {
+            src: ['min/lang-all.js'],
+            dest: 'min/lang-all.min.js'
+        }
+    };
+
+    // all the lang files need to be added manually
+    fs.readdirSync('./lang').forEach(function (path) {
+        min[path] = {
+            src: ['lang/' + path],
+            dest: 'min/lang/' + path
+        };
+    });
+
     grunt.initConfig({
+        concat : {
+            langs: {
+                src: ['lang/*.js'],
+                dest: 'min/lang-all.js'
+            }
+        },
+        min : min,
         test : {
             files : ["test/**/*.js"]
         },
@@ -29,4 +53,5 @@ module.exports = function(grunt) {
 
     // Default task.
     grunt.registerTask('default', 'test');
+    grunt.registerTask('release', 'lint test concat ');
 };
\ No newline at end of file