Closed thegnuu closed 11 months ago
This will probably need ~more~ shenanigans to work. I think it's possible, will take a look when I can.
I was wondering if is possible also. it is not so much a work to rename the file after ng generate component have been used, but would be more integrated if the component pug file was directly a pug file. As it is the case for scss.
It's easy, you just need to do the following:
Update Angular Schematics to Generate .pug 1) Go to: node_modules/@schematics/angular/component/files/ 2) Rename name@dasherize.component.html.template => name@dasherize.component.pug.template 3) Update pug template to pug (p <%= dasherize(name) %> works!) 4) Update tsfile template to reference pug file: name@dasherize.component.ts.template (.component.html => .component.pug)
I've been too lazy to write a script to do this, but since other people are asking I'll try to find time in the next month to make a PR for this feature.
I have created a bash script that modifies the Angular Schematics to generate .pug
You can choose whether to replace the default command or create a separate one for the .pug (ng generate pug-component).
https://gist.github.com/jsalvans/449cc9e5acf69ffde937d10f2f02853e
This project is no longer maintained.
I want it too!