【发布时间】:2019-03-15 15:33:21
【问题描述】:
我正在使用 Angular 6 开发一个应用程序,希望安装在许多客户端上。
他们每个人都需要个性化,但他们会有很多共同的部分。
我想要的是有一个目录结构:
/src
/app
/components
/navbar
/navbar.component.html
/navbar.component.ts
/footer
/footer.component.html
/footer.component.ts
/store
/store.component.html
/store.component.ts
/home
/home.component.html
/home.component.ts
/customer1
/navbar
/navbar.component.html
/navbar.component.ts
/home
/home.component.html
/home.component.ts
/customer2
/home
/home.component.html
/home.component.ts
/customer3
/footer
/footer.component.html
/footer.component.ts
如您所见,customer1 已自定义导航栏和主页,2 仅主页和 3 页脚。
我想要的是在制作时
npm run build
我可以做类似的事情
npm run build customer1
如果存在,则获取目录下的文件,如果组件下不存在文件。
你觉得有可能吗?
【问题讨论】:
标签: angular npm angular-cli