"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var path_1=require("path"),utils_1=require("../../../../lib/utils");function default_1(e){var t,r=e.params||{},a=utils_1.getEnvironment(),s=a.workspaceRoot,o=a.frontendRoot,i=a.frontendType,e=a.libraryRoot;if(!s)throw Error("请在 NgCortex 工程目录中操作！");if(!o)throw new Error("请在前端项目目录中操作！");if("frontend"===i)t=path_1.join(o,"src/app");else{if(!e)throw new Error("请在库项目目录中操作！");t=path_1.join(e,"src")}r={getPascalCase:utils_1.getPascalCase,getSeparatorCase:utils_1.getSeparatorCase,name:r.name};process.chdir(__dirname),utils_1.src("./**/*",{base:"./files"}).pipe(utils_1.ejs(r)).pipe(utils_1.dest(t,{workspaceRoot:s,log:!0})).subscribe(function(e){e=e.filter(function(e){return".ts"===e.extname}).map(function(e){return e.fullPath});utils_1.appendLibraryExports(a,e)})}exports.default=default_1;
