Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export class ModuleUtils {
static mixin(target) {
for (const member of Object.getOwnPropertyNames(ModuleUtils.prototype)) {
target[member] = ModuleUtils.prototype[member].bind(target)
}
}
resolvePath(...args) {
return resolve(process.cwd(), ...args)
}
getManifestFiles() {
const manifestPath = this.resolvePath('core/manifest')
return readFileSync(manifestPath).toString().trim().split(/\r?\n/)
}
addPlugin2(path, options = {}) {
this.addPlugin({
src: this.resolvePath('core/templates', ...path.split('/')),
fileName: join('core', ...path.split('/')),
options
})
}
addTemplate2(path, options = {}) {
this.addTemplate({
src: this.resolvePath('core/templates', ...path.split('/')),
fileName: join('core', ...path.split('/')),
options
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.