UNPKG

create-widget-app

Version:

The create-widget-app command line tool makes it easy to generate a configured WP Elementor widget.

11 lines (9 loc) 346 B
const fs = require('fs'); const path = require('path'); module.exports = { render: function (widgetDir, options = {}) { const filePath = path.resolve(widgetDir, this.getFileName()); fs.writeFileSync(filePath, this.template(options), { flag: 'wx' }); console.log(`[create-widget-app] Created ${filePath}`); }, };