makeswift
v0.3.4
Published
The official Makeswift CLI
Readme
Running a local version of the Makeswift CLI
- 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
}
}
}- Run the CLI in dev mode
pnpm i --ignore-scripts
pnpm -F makeswift dev- Globally link the CLI
pnpm link --global --dir /your/local/makeswift/packages/makeswift- Create a temp directory
cd $(mktemp -d)- Test the app by running
makeswift init test-app
makeswift init test-app --with-bun
makeswift init test-app --with-pnpm
// etc...- When you are done, remove the linked version of the CLI
pnpm uninstall --global makeswift