扩展 angular-cli 的构建管道 [英] extend build-pipeline of angular-cli

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

问题描述

我可以在不重写 angular-cli 本身的情况下扩展 angular-cli 的构建过程吗?就像过去一样,当我为构建过程编写 gulp/grunt 任务时,我可以改变我想要的一切.

Can i extend the build-process of angular-cli without rewriting angular-cli itself? Like in the old days, when i wrote my gulp/grunt tasks for the build-process and i could change everything i wanted.

我想更改 angular-cli 的默认构建系统.在生产版本中内联样式和 html 模板,更改文件的编译顺序、连接顺序……防止编译带有_"前缀的 sass 文件,例如 _home、_about.将一些参数/配置传递给构建命令.

I want to change the default build-system of the angular-cli. Inline the styles and html templates in production build, change the order in which the files are compiled, concatenated,.... Prevent compiling of sass files having "_"-prefix, like _home, _about. Pass some arguments/config to the build command.

推荐答案

构建过程和 ember-cli 一样是可扩展的,你可以参考他们的 文档.

The build process is extendable in the same way the ember-cli is, you can refer to their documentation.

通过这种方法,您将能够覆盖现有的构建命令和任务,并将其替换为您想要的.

By this method you will be able to override the existing build command and task and replace it with what you'd like.

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

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