Starting project with necessary tools to create Polymer-based component.
The component is implemented in ES6 code separated logic code from its template. Thus it has one .js
file with .html
file.
It has the following tools working together
karma
+jasmine
as the testing suite (viakarma-polymer
)babel-cli
based on Babel 6 as converter ES6 to ES2015 codeuglify-js
as uglifier to mainly mangle function's parameters.http-server
as local http server when testing and reviewing the resultbrowserify
as a tool to be able to userequire()
and include all those required in browser environmentvulcanize
+cripser
as a tool to manage HTML import dependency into a single file, and JS code separator from HTML file into a separate file with compliant ensurer. This is specifically use with Polymer-based component
Commands are centralize to NPM. You can do the following
npm start
- to build and start local http servernpm test
- to startkarma
withjasmine
-based test suitenpm run server
- to start local http servernpm run build
- to build the project, output will be in./dist
directorynpm run clean
- to remove all distributed and auto-generated files in./dist
directory. But it doesn't remove directory itself.
index.html
is the demo page. It imports built component as seen inside./dist
directory../scripts/build.sh
contains build commands to build the project, you shouldnpm install
first before using it vianpm build
ornpm start
.
Use basepolymerit-cli to help creating a starting project.
It's based on MIT license.
See LICENSE for more information.