Mr. Doc Theme Install (Sync)
by iwatakeshi
Babel + JSX
/** ES5 */
var Theme = require('mr-doc/src/theme');
/** ES6 */
import Theme from 'mr-doc/lib/theme';
/*Example options*/
var options = {
theme: {
// Name of theme to install
name: 'mr-doc-theme-cayman'
},
template: {
name: 'name of the package or of your choice',
// Use only if a theme
// is not going to be installed
path: undefined,
// Let's Theme know that a template is used
isEnabled: function(){/* Returns a Boolean */},
// Let's Theme know that the template
// is a starter kit
isKit: function(){/* Returns a Boolean */}
},
output: {
path: '...wherever the docs will be installed'
}
};
// Install the theme
var template = (new Theme(options)).installSync();