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

查看:202
本文介绍了扩展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.

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

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天全站免登陆