Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.6 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
    },
35
    compass: {
36
      dist: {
37
        options: {
38
          sassDir: 'sass',
39
          cssDir: 'stylesheets',
40
          outputStyle: 'expanded',
41
        }
42
      }
43
    },
44
    concat: {
45
      options: {
46
        separator: ';',
47
      },
48
      dist: {
49
        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'],
50
        dest: 'dist/vendor.js',
51
      },
52
      ember: {
53
        src: ['javascripts/ember/**/*.js'],
54
        dest: 'dist/ember.js',
55
      }
56
    },
57
  });
58

    
59
  grunt.loadNpmTasks('grunt-contrib-compass');
60
  grunt.loadNpmTasks('grunt-contrib-watch');
61
  grunt.loadNpmTasks('grunt-contrib-concat');
62
  grunt.loadNpmTasks('grunt-ember-templates');
63

    
64
  // Default task(s).
65
  grunt.registerTask('default', ['concat',  'emberTemplates','watch']);
66

    
67
};