Angular-cli: additional build tasks

Created on 30 Sep 2016  路  8Comments  路  Source: angular/angular-cli

I am using the latest angular-cli ("1.0.0-beta.15") and cannot find any information how to add additional tasks to build process.

What I try to achieve:

  • I am using ng2-translate and it requires 1 file with all translations
  • I have generic components
  • every component should have his own translation file, for example COMPONENT_NAME-local.json
  • I need a build task which will find all *-local.json files, merge them all, and generate en.json file which will be used by ng2-translate

Where can I add executable build tasks? + a watcher for *-local.json would be nice

All 8 comments

We do not have this feature at the moment, but are planning an addon system that would allow users to create addons to do such things.

It's been more than half a year since this was discussed here -- has there been any notable movement on this subject? I have exactly the same scenario as @dimitriy-k

@darkmyst it's something that we're looking for v2+, but not part of the planned features for v1.x.

hi, I am new to angular2 and I have encountered the similar scenatios: need to scan the local files and then generate some log files , I have searched a lot about 'how to custom angular-cli tasks', some answers refer to 'use the same way as the ember-cli does', i haven't used 'ember-cli' before, can anyone provide some more details on 'use ember-cli way to extend angular-cli tasks'? Thanks a lot! :)

@l770943527 you can try ng eject and customize your webpack

https://github.com/angular/angular-cli/wiki/eject

the feature is definitively needed

it's annoying how angular-cli is limited and unextendable
we are working on big project supporting most of backend and frontend frameworks and only angular2-6 can't be supported because of ng-serve limitations such as adding own tasks to handle output files in-fly
what the hell

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings