'use strict'module.export=function(grunt){ //加載插件 require('load-grunt-tasks')(grunt); require('time-grunt')(grunt); //配置項(xiàng)目路徑 var config={ app:'app', dist:'dist' }; //配置項(xiàng)目設(shè)置 grunt.initConfig({ config:config, //定義Task copy:{ dist_html:{ src:'<%=config.app%>/index.html', dest:'<%=config.dis%>/index.html' }, dist_js:{ src:'<%=config.app%>/js/index.js', dest:'<%=config.dis%>/js/index.js' } },? ? //另一種寫(xiě)法 //copy:{? ? // ?files:[? ? // ? ?{? ? // ? ? ?src:'<%=config.app%>/index.html',? ? // ? ? ?dest:'<%=config.dis%>/index.html'? ? // ? ?},? ? // ? ?{? ? // ? ? ?src:'<%=config.app%>/js/index.js',? ? // ? ? ?dest:'<%=config.dis%>/js/index.js'? ? // ? ?}? ? // ?]? ? //}, clean:{ dist:{ src:['<%=config.dis%>/index.html','<%=config.dis%>/js/index.js'] } } });}
Warning: Task "copy" not found. Use --force to continue.
qq_微笑面對(duì)明天_03333702
2016-05-15 20:24:22