挂钩 angular-cli 构建手表 [英] Hook into angular-cli build watch

查看:33
本文介绍了挂钩 angular-cli 构建手表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以挂钩 angular-cli 的 build/watch 命令:

I'd like to to know if it is possible to hook into angular-cli's build/watch command:

ng build/w

它生成文件并将它们放到项目的 /dist 文件夹中

which generates files and drops them in the project's /dist folder

我只是想在构建完成后将dist文件夹复制到另一个目录,可以吗?

I just want after the build completes to copy the dist folder to another directory, is it possible?

推荐答案

如果您只想更改输出到的文件夹,可以在 angular-cli.json 文件中进行设置.有一个outdir"设置,您可以将其更改为您希望它输出到的文件夹.

If you just want to change the folder that it outputs to you can set that in the angular-cli.json file. There is an 'outdir' setting in that you can change to be the folder you want it to output to.

这篇关于挂钩 angular-cli 构建手表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆