Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (2 kB)

1
module.exports = function(grunt) {
2

    
3
  // Project configuration.
4
  grunt.initConfig({
5
    pkg: grunt.file.readJSON('package.json'),
6
     watch: {
7
      css: {
8
        files: [
9
          'sass/*.scss',
10
        ],
11
        tasks: ['compass']
12
      },
13
      js: {
14
        files: [
15
          'javascripts/vendor/*.js',
16
          'javascripts/okeanos-ember/*.js',
17
          'javascripts/okeanos-scripts/*.js'
18
        ],
19
        tasks: ['concat']
20
      },
21
      templates: {
22
        files: ['javascripts/templates/*.hbs', 'javascripts/templates/components/*.hbs'],
23
        tasks: ['emberTemplates']
24
      }
25
  },
26
      compass: {
27
              dist: {
28
                options: {
29
                  sassDir: 'sass',
30
                  cssDir: 'stylesheets',
31
                  outputStyle: 'expanded',
32
                }
33
              }
34
      },
35
      concat: {
36
              options: {
37
                separator: ';',
38
              },
39
              dist: {
40
               files: {
41
          'javascripts/okeanos.js': ['javascripts/okeanos-scripts/common.js', 'javascripts/okeanos-scripts/checkboxes-radiobuttons.js', 'javascripts/okeanos-scripts/wizard.js', 'javascripts/okeanos-scripts/sshkeys-wizard.js'],
42
          'javascripts/okeanos-ember.js': ['javascripts/okeanos-ember/app.js', 'javascripts/okeanos-ember/obj.js', 'javascripts/okeanos-ember/ember-all.js'],
43
        }
44
              },
45
    },
46
        emberTemplates: {
47
      compile: {
48
        options: {
49
          templateBasePath: /javascripts\/templates\//
50
        },
51
        files: {
52
          'javascripts/templates.js': ['javascripts/templates/*.hbs', 'javascripts/templates/components/*.hbs']
53
        }
54
      },
55
          files: 'templates/*',
56
          tasks: ['emberTemplates']
57
   }
58

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

    
65
  // concat, ember-templates is necessary only the 1st time that I run it to create the the destination files that include the concatenated 
66
  grunt.registerTask('default', ['concat', 'emberTemplates', 'compass', 'watch']);
67

    
68
};