PatrickJS / NG6-starter

:ng: An AngularJS Starter repo for AngularJS + ES6 + Webpack
https://angularclass.github.io/NG6-starter
Apache License 2.0
1.91k stars 1.35k forks source link

Use plop for components scaffolding #191

Closed fesor closed 7 years ago

fesor commented 7 years ago

What this for:

Waiting for any feedback.

fesor commented 7 years ago

Blocked by https://github.com/amwmedia/node-plop/issues/25

fesor commented 7 years ago

@gdi2290 @Hendrixer Could you take a look?

p.s. Maybe I should also ping someone else since you guys are always busy?

joshwiens commented 7 years ago

screen shot 2016-11-28 at 1 58 12 pm

I would personally question the wisdom in replacing an extremely stable tool gulp with an alpha release of a less known, limited adoption tool.

joshwiens commented 7 years ago

I'm all for adopting and supporting emerging technologies. I am also always up from being able to remove gulp from any workflow.

Given this is a starter project, people may have very well extended the base gulp configuration and it's removal would be detrimental.

The feedback you really need is from the people depending on / working with this starter. That or you could run the two in parallel for the time being, deprecate the gulp workflow and then see how the potential change is received by the community prior to removing gulp.

fesor commented 7 years ago

node-plop is just inner dependency of plop. Plop itself has 1.7.2 version and it pretty much stable.

replacing an extremely stable tool gulp with an alpha release of a less known, limited adoption tool.

This PR aims to replace gulp-rename + gulp-template (which uses limited lodash templates) on specialized tool for code generation, which uses highly stable handlebars for templates and pretty much popular Inquirer.js for wizards. This allows to simplify boilerplate process (for example you could use component name "my card" instead of only "myCard". Plop will use proper case. So files would be named like "my-card.component.js" and module name will be "ng6Starter.myCard". Also it is pretty much easy to add your own templates of some other stuff.

My team working with plop for about 3 month and they find it much more flexible than just gulp-template + gulp-rename.

deprecate the gulp workflow

This PR doesn't removes gulp or gulp workflow, it just replaces gulp component command to more appropriate and flexible way of boilerplate generation. It has proper documentation and examples on how to make your own templates to reduce routine.

Right now gulpfile is bloated with unneeded stuff which just confuses users. It only used to start webpack and browserify. And as for e2e tests gulp brings more problem than it solves. But removing gulp is another story and should not be discussed in context of this PR. I will create separate issue for that discussion.

Thanks.

fesor commented 7 years ago

@d3viant0ne I will be very appreciated if you could put some more input on this. With this PR I tried to solve this issues:

thematho commented 7 years ago

@fesor I added a pull request for the plop branch adding the rest of the elements for scaffolding: Added Service/Factory/Directive/Filter Generators

fesor commented 7 years ago

Closing in favor of #224