I'm trying to extend the default Angular CLI tasks, but I'm running into some roadblocks. At this point, I'm trying to extend it to add two additional tasks:
I have tried a few things so far, however none of them seem to work. I've also taken a look at the material-2 angular-cli-build.js file, and have been able to get doiuse to work in a modified version of it, however it's still problematic and not properly catching errors when it finds invalid CSS.
Has anybody had any luck or have any tips they can suggest for extending the Angular CLI tasks?
Let's get started! To use the angular-cli, we need to install it first. Installing the angular-cli is quite easy. All you need to do, is to paste the following command into a terminal window. For this to work, you need to have node.js with npm installed on your machine. The installation may take a while.
Tasks will be added to the to-do list by clicking the Add button or by pressing the Enter key. Let’s see what happens under the hood, since the Add button and the input box are in a form element, we handle them using the Angular FormGroup property. To use the FormGroup property, we first import it in the app.module.ts file as shown below:
Over the past year, the angular-cli has become more and more flexible. But there might be still some scenarios that are not achievable with the CLI. command.
That is why the angular-cli can create these files for you. To do this, you can use the ng generate command. For example, if you need a new component, you could open a terminal at the desired location and use the command to generate all the files you need to create a new component. The CLI will generate a new folder for you, as well.
As stated here, you can extend the build script as ember-cli.
You can also look at the ember-cli user guide for built in configurations that you can use without making any extension first
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With