summaryrefslogtreecommitdiff
path: root/Gruntfile.js
blob: 4993defc6fc569189fed94524a141ddd35b0ca79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    concat: {
      js: {
        src: [
          'www/js/dropzone.js',
          'www/js/apps.js',
          'www/js/auth.js',
          'www/js/clock.js',
          'www/js/importer.js',
          'www/js/jingles.js',
          'www/js/musicgrid.js',
          'www/js/musicpools.js',
          'www/js/rivendell.js',
          'www/js/rivendell.rh.js',
          'www/js/shows.js',
          'www/js/utils.js'
        ],
        dest: 'www/js/<%= pkg.name %>.js'
      },
      css: {
        src: [
          'www/styles/auth.css',
          'www/styles/jingles.css',
          'www/styles/main-style.css',
          'www/styles/musicgrid.css',
          'www/styles/shows.css'
        ],
        dest: 'www/styles/<%= pkg.name %>.css'
      }
    },
    uglify: {
      options: {
        banner: '/*! <%= pkg.name %> */\n'
      },
      build: {
        src: 'www/js/<%= pkg.name %>.js',
        dest: 'www/js/<%= pkg.name %>.min.js'
      }
    },
    cssmin: {
      target: {
        files: [{
          expand: true,
          cwd: 'www/styles',
          src: '<%= pkg.name %>.css',
          dest: 'www/styles',
          ext: '.min.css'
        }]
      }
    }
  });

  // Load the plugin that provides the "uglify" task.
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-cssmin');

  // Default task(s).
  grunt.registerTask('default', ['concat', 'uglify', 'cssmin']);
};