Skip to content

pcanella/marko-generator

Repository files navigation

generator-marko

Dead simple Marko component file generator

Installation

First, install Yeoman and generator-marko using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-marko

How to run

yo marko

Note: Make sure you are in the directory that you want the newly generated component folder to be in!

Choices

When you run yo marko you'll have two choices:

 * What would you like to name this component? # default is marko-component
 * Would you like namespaced scaffolding?
   If you type "no", all files will be blank and not namespaced, including browser.json # Default is "yes"

What it generates

yo marko generates the following files:

index.js
renderer.js
widget.js
template.marko
style.less
browser.json
mock-data/index.js
unit-tests/renderer.js

FYI: check out the generated file contents

If you choose Y at the namespaced scaffolding step, it will generate .your-component{} in your .less file and

<div class="your-component" widget="./widget"></div>

in your template.marko file.

If you choose N, then every file will be blank.

License

MIT © Patrick Canella

About

A Yeoman generator for marko

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published