makeswift

0.3.2 • Public • Published

Running a local version of the Makeswift CLI

  1. Modify the CLI so you know when you're running the local version

I like to add a console log to /your/local/makeswift/packages/makeswift/src/init.ts

export default async function wrappedInit(name: string | undefined, args: InitArgs) {
+ console.log(`\n\n\nRunning Local Version\n\n\n`)
  try {
    await init(name, args)
  } catch (err) {
    if (err instanceof MakeswiftError) {
      console.log(err.message)
      process.exit(0)
    } else {
      throw err
    }
  }
}
  1. Run the CLI in dev mode
pnpm i --ignore-scripts
pnpm -F makeswift dev
  1. Globally link the CLI
pnpm link --global --dir /your/local/makeswift/packages/makeswift
  1. Create a temp directory
cd $(mktemp -d)
  1. Test the app by running
makeswift init test-app
makeswift init test-app --with-bun
makeswift init test-app --with-pnpm

// etc...
  1. When you are done, remove the linked version of the CLI
pnpm uninstall --global makeswift

/makeswift/

    Package Sidebar

    Install

    npm i makeswift

    Weekly Downloads

    7

    Version

    0.3.2

    License

    MIT

    Unpacked Size

    79.1 kB

    Total Files

    32

    Last publish

    Collaborators

    • migueloller
    • joshuawootonn
    • alexhwoods