README
Riot Tag (Npm Module) Generator
See Yeoman
Getting Started
Assume yo CLI is already avaliable on your system, to install generator-riot-tag-module from npm run:
npm install -g generator-riot-tag-module
Initiate the generator:
cd /my-source/module
yo riot-tag-module
What does this even do?
Handles the boilerplate required to create a riot-tag as a sharable NPM module by applying a number of templated vars throughout the generated files.
It's intended to reduce tedium when generating many reusable riot-tags, I guess it would save around 10 minutes per module.
Provide the name of the tag eg. mini-form
, and the generator will generate a UMD compatible module.
Build the module
npm run pub-build
the following files would be generated
mini-form.tag
mini-form.js
mini-form.min.js
Publish to NPM
npm run pub-npm
NPM would import mini-form.min.js
when it's being required
require('mini-form');
<mini-form>
...
</mini-form>
<script>
riot.mount('mini-form');
</script>
License
MIT