var fsextra = require('fs-extra');
const path = require('path');
const packageConfig = require('../package.json');
const projectName = packageConfig.name == 'hi-vui-template' ? 'project' : packageConfig.name;
function resolve(dir){
    return path.resolve(__dirname,dir)
}
var fileList=[
   [resolve(`../assets_platform/eap`),resolve(`../dist/assets_platform/eap`)],
   [resolve(`../assets_platform/element-ui`),resolve(`../dist/assets_platform/element-ui`)],
   [resolve(`../assets_platform/vendor_dll`),resolve(`../dist/assets_platform/vendor_dll`)],
   [resolve(`../assets_platform/vue`),resolve(`../dist/assets_platform/vue`)],
   [resolve(`../assets_platform/vue-router`),resolve(`../dist/assets_platform/vue-router`)],
   [resolve(`../assets_platform/vuex`),resolve(`../dist/assets_platform/vuex`)],
//    [resolve(`../${projectName}/setting`),resolve(`../dist/${projectName}/setting`)],
//    [resolve(`../${projectName}/funclib`),resolve(`../dist/${projectName}/funclib`)],
]

for(var item of fileList){
   fsextra.copy(item[0],item[1], function (err) {
      if (err) return console.error(err) 
      // console.error('success!  setting')
   }) //拷贝目录
}


