generator-riot-tag-module
v0.1.0
Published
Yeoman generator to generate riot tags that can be published as NPM modules
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-moduleInitiate the generator:
cd /my-source/module
yo riot-tag-moduleWhat 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-buildthe following files would be generated
mini-form.tag
mini-form.js
mini-form.min.jsPublish to NPM
npm run pub-npmNPM 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

