Buslowicz / twc

TypeScript based, boilerplate-less, Polymer toolbox friendly Polymer Modules
32 stars 1 forks source link

Create a twc project generator for polymer-cli #101

Closed Buslowicz closed 6 years ago

Buslowicz commented 7 years ago

Create a project generator that would be visible from polymer init list.

mlisook commented 6 years ago

I created a generator based on the polymer-2-element generator - mlisook/generator-polymer-init-twc-element.

I haven't published it to npm yet, but it can be tested easily by cloning the repo, then do npm link from the root of the project. It will then show up in the polymer init list of templates.

Do you want generators (I could make one for an app also) to be in the twc project? Or???

Buslowicz commented 6 years ago

That looks good! I think they should live their own separate life to make twc lighter, but I am definitely for generators. They could also take some extra questions like where to put the template (separate file, decorator, template() method etc) but so far so good :). I'll give it a go this evening and put the info about it in the README or Wiki once it's on the npm if you like :).

mlisook commented 6 years ago

OK. As soon as I'm back in a spot with reliable internet connection, I'll add the template location option, publish it to NPM, then post back here. If you think of any other options that should be covered in the element generator just let me know - yeoman generators are really simple. I'll do one for the PWA lazy loading application after that.

Buslowicz commented 6 years ago

Yea, I wrote few yo generators myself, it's a great framework :). If I get some ideas for options I'll definitely let you know. Meanwhile do as you said, and myself I will put that in twc docs :).

mlisook commented 6 years ago

I've published a generator for a simple Polymer 2 app in addition to the generator for a custom element published last week.

generator-polymer-init-twc-app

generator-polymer-init-twc-element

Buslowicz commented 6 years ago

Nice! Once I am back in game I will battle test them and put in the docs :).