@valle/generator-valle-element-js
Version:
A generator for valle-elements - web components with Polymer 3
106 lines (69 loc) • 3.36 kB
Markdown
# <%= elementName %>
> <%= elementDesc %>
[](https://www.npmjs.com/package/@valle/<%= elementName %>)
[](https://www.webcomponents.org/element/@valle/<%= elementName %>)
## How to install and use:
1 - Install the element using [Yarn](http://yarn.io/):
```sh
$ yarn add @valle/<%= elementName %>
```
2 - Import the element:
```html
<script type="module" src="node_modules/@valle/<%= elementName %>/<%= elementName %>.js"></script>
```
or in your javascript file
```js
import "@valle/<%= elementName %>/<%= elementName %>.js";
```
3 - Start using it!
<!--
```
<custom-element-demo>
<template>
<script type="module" src="<%= elementName %>.js"></script>
<next-code-block></next-code-block>
</template>
</custom-element-demo>
```
-->
```html
<<%= elementName %>></<%= elementName %>>
```
## Properties
Property | Type | Default | Description
:--- |:--- |:--- |:---
`prop1` | *String* | `World` | Prop description
## Styling
The following custom properties and mixins are available for styling:
Custom property | Default | Description
:--- |:--- |:---
--<%= elementName %>-color | `#fff` | Text color
## Browser Support
Using the [webcomponents.js](https://github.com/WebComponents/webcomponentsjs):
 |  |  |  | |  |
:---: | :---: | :---: | :---: | :---: | :---: |
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11+ | Latest ✔
## Development
1 - Verify if you have [node](http://nodejs.org/) and [yarn](http://yarn.io/) installed.
2 - Install [Polymer-CLI](https://www.polymer-project.org/3.0/docs/tools/polymer-cli):
```sh
$ [sudo] yarn global add polymer-cli
```
3 - Install local dependencies:
```sh
$ yarn
```
4 - Start the development server:
```sh
$ yarn start
```
## Versioning
To keep better organization of releases we follow the [Semantic Versioning 2.0.0](http://semver.org/) guidelines.
## Contributing
Find on our [issues](https://github.com/<%= githubAccount %>/<%= elementGithubRepo %>/issues/) the next steps of the project ;)
<br>
Want to contribute? [Follow these recommendations](https://github.com/<%= githubAccount %>/<%= elementGithubRepo %>/blob/master/CONTRIBUTING.md).
## History
See [Releases](https://github.com/<%= githubAccount %>/<%= elementGithubRepo %>/releases) for detailed changelog.
## License
[MIT License](https://github.com/<%= githubAccount %>/<%= elementGithubRepo %>/blob/master/LICENSE.md) © [<%= githubAccount %>](https://github.com/orgs/<%= githubAccount %>/people)