Adds unit test framework and a first unit test.
[quanweb.git] / js / Gruntfile.js
1 module.exports = function(grunt) {
2
3     // Project configuration.
4     grunt.initConfig({
5         concat: {
6             all: {
7                 src: ['src/**/*.js', 'Main.js'],
8                 dest:  '../app/all.js',
9                 nonull: true
10             },
11             tests: {
12                 src: ['src/**/*.js', 'test/**/*.js'],
13                 dest: 'all_tests.js',
14                 nonull:  true
15             },
16         },
17
18         pkg: grunt.file.readJSON('package.json'),
19
20         uglify: {
21             options: {
22                 banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
23                 mangle: false
24             },
25             app: {
26                 files: {
27                   '../app/lib.min.js': ['src/**/*.js', 'Main.js']
28                 }
29             }
30         }
31     });
32
33     grunt.loadNpmTasks('grunt-contrib-concat');
34     grunt.loadNpmTasks('grunt-contrib-uglify');
35
36     // Default task(s).
37     grunt.registerTask('default', ['concat', 'uglify']);
38 };