Refactor JS into modules, and add basic MVC.
[quanweb.git] / js / Gruntfile.js
diff --git a/js/Gruntfile.js b/js/Gruntfile.js
new file mode 100644 (file)
index 0000000..690a130
--- /dev/null
@@ -0,0 +1,25 @@
+module.exports = function(grunt) {
+
+  // Project configuration.
+  grunt.initConfig({
+    pkg: grunt.file.readJSON('package.json'),
+    uglify: {
+      options: {
+        banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
+        mangle: false
+      },
+      app: {
+        files: {
+          '../app/lib.min.js': ['BooksModel.js', 'BooksView.js', 'PagingController.js', 'ToolTip.js', 'Main.js']
+        }
+      }
+    }
+  });
+
+  // Load the plugin that provides the "uglify" task.
+  grunt.loadNpmTasks('grunt-contrib-uglify');
+
+  // Default task(s).
+  grunt.registerTask('default', ['uglify']);
+
+};