README
polymd
The polymd
(polymer-module) is a module to easily create a Polymer web component element from the template.
It will create the following structure:
| - demo
| - index.html
| - tasks
| - lint-task.js
| - release.js
| - test
| - basic-test.html
| - index.html
| - .editorconfig
| - .gitattributes
| - .gitignore
| - .jsbeautifyrc
| - .jscsrc
| - .travis.yml
| - bower.json
| - CONTRIBUTING.md
| - gulpfile.js
| - index.html
| - LICENSE.md
| - my-element.html
| - package.json
| - README.md
- demo - Demo pages with predefined index file
- tasks - Gulp tasks directory
- lint-task.js - Call with
gulp lint
to run linters - release.js - Call with
gulp release
to publish the release. it uses conventional-github-releaser to release the update.
- lint-task.js - Call with
- test - Test cases directory. see web components tester for more information
- basic-test.html - A home for basic tests. it will contain a simple test case example
- index.html - A file where test cases files should be included.
- .editorconfig - Unified editor configuration
- .gitattributes, .gitignore - Git setup files
- .jsbeautifyrc, .jscsrc - Linters files with unified setup
- .travis.yml - Travis integration file
- bower.json - Bower definition for dependency management
- CONTRIBUTING.md - A file with description of how to contribute to the project. It will be automatically included into new issue page on github. TODO: It's currently ARC specific file. Should be more generic.
- gulpfile.js - Gulp definitions file. It only includes tasks form the
tasks
directory. - index.html - Documentation page for the component.
- LICENSE.md - The license file. TODO: It's Apache 2 only. Could be some option to choose between different licenses.
- my-element.html - Generated element. Name of the file depends on the component name.
- package.json - Node dependencies required in gulp tasks.
- README.md - Auto-generated readme file.
Install
sudo npm install polymd -g
It's better to install it as a global command since it doesn't have interface to include it into another node nodule.
Usage
polymd MODULE-NAME [ --description "the description"] [--author "the author"] [--version "1.0.0"] [--repository "my-org"] [--skip-tests] [--skip-demo]
MODULE-NAME
The name of the web component. It must be consisted with alphanumeric characters and a -
sign. All uppercase characters will be normalized to lowercase.
Options
Option | Shortcut | Description |
---|---|---|
--description |
-d |
Short description for the component used in bower and in the package file |
--author |
-a |
Author of the component. You can set up the POLYMD_AUTHOR env variable to automatically insert it into this field. If not, the USER variable will be used (if present). |
--version |
-v |
Version of the component. Use semantic version standard. |
--repository |
-r |
The repository of the element. It should be only a user or organization name and component name will be appended. Use the POLYMD_REPO env variable to automate this. |
--skip-tests |
-st |
Skip creation of the tests cases. |
--skip-demo |
-sd |
Skip creation of the demo page. |