Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / new_ui / ui / Gruntfile.js @ 86e9ef86

History | View | Annotate | Download (1.8 kB)

1
module.exports = function(grunt) {
2

    
3
  // Project configuration.
4
  grunt.initConfig({
5
    pkg: grunt.file.readJSON('package.json'),
6
    emberTemplates: {
7
      compile: {
8
        options: {
9
          templateBasePath: /javascripts\/templates\//
10
        },
11
        files: {
12
          'javascripts/templates.js': 'javascripts/templates/**/*.hbs'
13
        }
14
      }
15
    },
16
    watch: {
17
      css: {
18
        files: [
19
          'sass/*.scss',
20
        ],
21
        tasks: ['compass'],
22
      },
23
      js: {
24
        files: [
25
          'javascripts/vendor/*.js',
26
          'javascripts/ember/**/*.js',
27
        ],
28
        tasks: ['concat']
29
      },
30
      emberTemplates: {
31
        files: 'javascripts/templates/**/*.hbs',
32
        tasks: ['emberTemplates']
33
      },
34
      jshint: {
35
        files: ['javascripts/ember/**/*.js'],
36
        tasks: ['jshint'],
37
      }
38
    },
39
    compass: {
40
      dist: {
41
        options: {
42
          sassDir: 'sass',
43
          cssDir: 'stylesheets',
44
          outputStyle: 'expanded',
45
        }
46
      }
47
    },
48
    concat: {
49
      options: {
50
        separator: ';',
51
      },
52
      dist: {
53
        src: ['javascripts/vendor/custom.modernizer.js', 'javascripts/vendor/jquery.js','javascripts/vendor/handlebars.js','javascripts/vendor/ember.js','javascripts/vendor/ember-data.js','javascripts/vendor/underscore-min.js'],
54
        dest: 'dist/vendor.js',
55
      },
56
      ember: {
57
        src: ['javascripts/ember/**/*.js'],
58
        dest: 'dist/ember.js',
59
      }
60
    },
61
    jshint: {
62
      beforeconcat: ['javascripts/ember/**/*.js'],
63
    },
64
  });
65

    
66
  grunt.loadNpmTasks('grunt-contrib-compass');
67
  grunt.loadNpmTasks('grunt-contrib-watch');
68
  grunt.loadNpmTasks('grunt-contrib-concat');
69
  grunt.loadNpmTasks('grunt-ember-templates');
70
  grunt.loadNpmTasks('grunt-contrib-jshint');
71

    
72
  // Default task(s).
73
  grunt.registerTask('default', ['jshint','concat',  'emberTemplates','watch']);
74

    
75
};