baniol
6/5/2013 - 10:01 PM

grunt file for development: coffescript, sass, connect

grunt file for development: coffescript, sass, connect

module.exports = function(grunt) {
  // 'use strict'

  grunt.initConfig({
    sass: {
      dist: {
        files: {
          'css/prezenter.css': 'sass/prezenter.scss'
        }
      },
      options: {
        'compass': true
      }
    },


    coffee: {
      compile: {
        files: {
          'js/prezenter.js': 'coffee/prezenter.coffee'
        }
      }
    },

    connect: {
      server: {
        options: {
          port: 8000,
          base: ''
          // keepalive:true
        }
      }
    },


    watch: {
      coffee: {
        files: ['coffee/prezenter.coffee'],
        tasks: 'coffee'
      },
      sass: {
        files: ['sass/prezenter.scss'],
        tasks: 'sass'
      }
    }
  });

  // Load necessary plugins
  grunt.loadNpmTasks('grunt-contrib-sass');
  grunt.loadNpmTasks('grunt-contrib-coffee');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-connect');

  // grunt.registerTask('default', 'watch');
  grunt.registerTask('dev', ['connect','watch']);

};