UNPKG

ring-websites-toolbelt

Version:

Ring Publishing Platform tool to work with Ring Websites

31 lines (24 loc) 846 B
const ucsthemebuilder = require('ring-ucs-theme-builder'); const ThemeScriptAbstract = require('./../../ThemeScriptAbstract'); class Install extends ThemeScriptAbstract { constructor(options) { super(options); } async execute() { this.validateThemeJson(); await this.installTheme(); } async installTheme() { console.info('Installing theme'); await new Promise((resolve, reject) => { ucsthemebuilder.download(this.paths.theme, this.paths.modules, function (err, modules) { if (err) { reject(err); } resolve(modules); }); }); console.info('Theme has been installed. Use "website start" to run your website.'); } } module.exports = Install;