diff --git a/src/index.js b/src/index.js index 97b4473..aa777ee 100644 --- a/src/index.js +++ b/src/index.js @@ -44,12 +44,12 @@ module.exports = () => { .option('-b, --bin [bin]', 'path to the maizzle executable') .description('compile email templates and output them to disk') .action(async (env, options) => { - const bin = options.bin || require.resolve('@maizzle/framework/src') + const bin = options.bin || './node_modules/@maizzle/framework/src' await importCwd(bin).build(env) updateNotifier({ - pkg: importCwd(require.resolve('@maizzle/framework/package.json')), + pkg: importCwd('./node_modules/@maizzle/framework/package.json'), shouldNotifyInNpmScript: true, }).notify() }) @@ -60,7 +60,7 @@ module.exports = () => { .option('-nc, --noclear [noclear]', 'do not clear the console log') .description('start a local development server and watch for file changes') .action((env, options) => { - const bin = options.bin || require.resolve('@maizzle/framework/src') + const bin = options.bin || './node_modules/@maizzle/framework/src' importCwd(bin).serve(env, { build: { @@ -80,7 +80,7 @@ module.exports = () => { const pkg = require('../package.json') try { - const maizzle = importCwd(require.resolve('@maizzle/framework/package.json')) + const maizzle = importCwd('./node_modules/@maizzle/framework/package.json') console.log(`Framework v${maizzle.version}\nCLI v${pkg.version}`) } catch { console.log(`CLI v${pkg.version}\nTo see your Framework version, run this command in the root directory of a Maizzle project.`)