IO Docs cli tool
runs the Yeoman IO Docs (iodocs) Generators
The IO Docs application architecture will allow for plugin based items that can be used with the application. The core of the application is built upon the FlightJS framework. We have created a base structure for each of these FlightJS parts that are to be used within IO Docs. The goal is to have each part of IO Docs extensible by any developer. When adding a new IO Docs item, these generators will prove helpful to create the various stubs for these items.
Requirements
You should ensure the following is installed prior to using these generators.
- Node and NPM
- Navigate to http://nodejs.org and proceed with the download and install of node.js
Generators
To install the generators we can install the base generator which will include all possible items that can be generated.
Clone this repo, change to the clone directory and run the following command:
npm install -g
> If you have problems with permissions try: ```sudo npm install -g```
Basic usage will prompt you in a wizard like style if invoking the IO Docs generator.
-
Base
Usage::
iodocs
This will provide you with a prompt on what to generate (ie. page, plugin, theme, data, component or mixin) and additionally ask the name of what you want to generate.
-
Component
Will generate a stub Flight component and related files with a provided name which contains the necessary base files as well as the directory structure for IO Docs to read from. An empty Style, Template, Locale and Unit Testing file is included with the stub generation.
The generated base structure of a component will reside as follows: app/ components/ / main.js main.test.js resources/ en_us.json styles/ style.scss views/ view.mustache
Usage:
iodocs component <SOME COMPONENT NAME>
Example:
iodcos component foo
ORiodocs component 'my super component'
ORiodocs component some_custom_component
-
Data
Will generate a stub Flight component and Unit Testing file is included with the stub generation.
The generated base structure of a data component will reside as follows: app/ data/ / main.js main.test.js
Usage:
iodocs data <SOME DATA COMPONENT NAME>
Example:
iodocs data foo
ORiodocs data 'my super data component'
ORiodocs data some_custom_data_component
-
Mixin
Will generate a stub mixin with a provided name. An empty base mixin and Unit Testing file is included with the stub generation.
The generated base structure of a component will reside as follows: app/ mixins/ with_.js
Usage:
iodocs mixin <SOME MIXIN NAME>
Example:
iodocs mixin foo
ORiodocs mixin 'my super mixin'
ORiodocs mixin some_custom_mixin
-
Theme
Will generate a theme folder with a provided name, a manifest file and stub Flight component for each app component which contains the necessary base files as well as the directory structure for IO Docs to read from.
The generated base structure of a theme will reside as follows: themes/ / main.js main.test.js components/ ... component directories for existing app component containing their respective parts (see above Component structure) resources/ en_us.json styles/ _mixins.scss style.scss views/ style.mustache
Usage:
iodocs theme <SOME THEME NAME>
Example:
iodocs theme foo
ORiodocs theme 'my super theme'
ORiodocs theme some_custom_theme
-
Plugin
Will generate a stub plugin and related files with a provided type and name.
The generated base structure of a baic plugin will reside as follows: plugins/ / main.js
Usage:
iodocs plugin <SOME PLUGIN NAME> <SOME PLUGIN TYPE>
Example:
iodocs plugin foo sometype
ORiodocs plugin 'my super plugin' sometype
ORiodocs plugin some_custom_plugin sometype
The generated base structure of a view_lite plugin will reside as follows: plugins/ / main.js
Usage:
iodocs plugin <SOME PLUGIN NAME> view_lite
Example:
iodocs plugin foo view_lite
ORiodocs plugin 'my super plugin' view_lite
ORiodocs plugin some_custom_plugin view_lite
The generated base structure of a full view plugin will reside as follows: plugins/ / main.js resources/ en_us.json styles/ style.scss views/ view.mustache
Usage:
iodocs plugin <SOME PLUGIN NAME> view
Example:
iodocs plugin foo view
ORiodocs plugin 'my super plugin' view
ORiodocs plugin some_custom_plugin view
You should now be able to start building with IO Docs.
Enjoy!
- David