Gruntfile.coffee

来源:互联网 发布:centos 启动php 编辑:程序博客网 时间:2024/05/22 13:35

Gruntfile.coffee配置文件

module.exports = (grunt) ->  # Project configuration.  grunt.initConfig    pkg: grunt.file.readJSON 'package.json'    coffeelint:      app: [        'coffee/**/*.coffee'        'coffee/*.coffee'        ]    coffee:      dist:        options:          sourceMap: false          bare: true        files: [          expand: true          cwd: 'coffee'          src: [            '**/*.coffee'            '*.coffee'          ]          dest: 'build/js'          ext: '.js'        ]    uglify:      options:        mangle: false      build:        files: [          expand: true          cwd: 'build'          src: [            '**/*.js'            '*.js'          ]          dest: 'asset'          ext: '.min.js'      ]    sass:      dist:        files: [          expand: true          cwd: 'scss'          src: [            '**/*.scss'            '*.scss'          ]          dest: 'build/css'          ext: '.css'      ]    cssmin:      build:        files: [          expand: true          cwd: 'build'          src: [            '**/*.css'            '*.js'          ]          dest: 'asset'          ext: '.min.css'      ]    clean: dist: 'build'    watch:      files: [        'coffee/**/*.*'        'coffee/*.*'        'scss/**/*.*'        'scss/*.*'      ]      tasks: ['coffee', 'uglify', 'sass', 'cssmin', 'clean']      options: spawn: false  grunt.loadNpmTasks 'grunt-coffeelint'  grunt.loadNpmTasks 'grunt-contrib-coffee'  grunt.loadNpmTasks 'grunt-contrib-uglify'  grunt.loadNpmTasks 'grunt-contrib-sass'  grunt.loadNpmTasks 'grunt-contrib-cssmin'  grunt.loadNpmTasks 'grunt-contrib-watch'  grunt.loadNpmTasks 'grunt-contrib-clean'  # Default task(s).  grunt.registerTask 'default', [    'coffeelint'    'coffee:dist'    'sass:dist'    'uglify'    'cssmin'    'clean:dist'    'watch'  ]  return
原创粉丝点击