Skip to content

Commit

Permalink
Revert "fix: resolving of maizzle framework"
Browse files Browse the repository at this point in the history
This reverts commit d83ba2f.
  • Loading branch information
cossssmin committed Apr 6, 2023
1 parent bb8f680 commit f8c6891
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand All @@ -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: {
Expand All @@ -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.`)
Expand Down

0 comments on commit f8c6891

Please sign in to comment.