UNPKG

@enjin/ionic1

Version:

A comprehensive build system for Ionic 1 apps by Madness Labs as part of the Madness Enjin

17 lines (15 loc) 552 B
const del = require('del'); module.exports = function(params, callback) { var modelPath = `${process.cwd()}/${params.dir ? params.dir : global.enjin.js.srcDir + 'model'}/${params.name}.ts`; console.log(`Removing model @ ${modelPath}`); del([modelPath]).then(() => { if (callback && typeof callback === 'function') { callback(); } }).catch((err) => { console.log('[ERROR] This happened: ' + err); if (callback && typeof callback === 'function') { callback(); } }); };