運行 grunt clean 報錯 為什么呢,求各位大俠解惑,謝謝
? 'use strict';
module.exports = function(grunt) {
? require('load-grunt-tasks')(grunt);
? require('time-grunt')(grunt);
? //配置項目路徑
? var config = {
??? app: 'app',
??? dist: 'dist'
? }
? //任務(wù)配置
? grunt.initConfig({
??? //引入config設(shè)置
??? config:config,
??? //配置copy命令
??? copy:{
????? dist_html:{
??????? //方法二:
??????? //**** files:[
??????? //?? {
??????? //???? src:'<%= config.app %>/index.html',
??????? //???? dest:'<%= config.dist %>/index.html'
??????? //?? },
??????? //?? {
??????? //???? src:'<%= config.app %>/js/index.js',
??????? //???? dest:'<%= config.dist %>/js/index.js'
??????? //?? }
??????? // ]********
??????? //方法三:鍵值對
??????? files:{
????????? '<%= config.dist %>/index.html':'<%= config.app %>/index.html',
????????? '<%= config.dist %>/js/index.js':'<%= config.app %>/js/index.js'
??????? }
??????? // src:'<%= config.app %>/index.html',
??????? // dest:'<%= config.dist %>/index.html'
????? },
????? //方法一 dist_js:{
????? //?? src:'<%= config.app %>/js/index.js',
????? //?? dest:'<%= config.dist %>/js/index.js'
????? // }
??? }
??? //配置清除目錄
??? // clean:{
??? //?? dist:{
??? //???? src:['<%= config.dis %>/**/*']
??? //?? }
??? // }
??? clean: {
??????? build: {
????????? src: ['<%= config.dist %>/**/*'],
????????? filter:'isFile'
??????? }
??? }
? });
};
2016-11-01
你這個clean為什么放在copy里面。。
2016-08-16