Generator for simple Polymer 2.0 app using Typescript and TWC
TWC (Typed Web Components - see Draccoz/twc for details) allows developers to use Typescript and decorators to create Polymer custom elements.
TWC acts as a compiler, translating the Typescript into Polymer ES6 class based elements. There is no runtime library - everything happens in the build step.
This generator is based on the Polymer init simple application generator, of course.
First ensure you have the Polymer CLI installed. If not use:
npm i -g polymer-cli
Then install this package:
npm i -g generator-polymer-init-twc-app
Create a new folder for your Polymer 2.0 project, cd into that folder and run
mkdir my-new-app-name cd my-new-app-name polymer init
Choose the twc-app option from the list.
Compile typescript classes to ES6 class based Polymer 2.0 dom modules by running the
twc script from the project's root folder.
npm run twc
Serve Your App
Review the TWC Wiki
Documentation on TWC can be found in the Draccoz/twc Wiki.
Please submit issues through github at mlisook generator-polymer-init-twc-element issues.
Contributions are welcome and appreciated.