Dead simple Marko component file generator
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
yo marko
Note: Make sure you are in the directory that you want the newly generated component folder to be in!
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"
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.
MIT © Patrick Canella