Replies: 3 comments 2 replies
-
Hey! Yeah we could add a Currently the best way is to write Typescript scripts that you run via ts-node via package.json scripts. Check out this comment on how to make it work with absolute paths. |
Beta Was this translation helpful? Give feedback.
-
I also use blitz console for this kind of stuff, and would create a "scripts" folder with service functions that are easy to import and invoke. // blitz console
await require('scripts/devUserCreator').create() It's a little more clunky than a pure CLI solution, but you get type safety on the function arguments. |
Beta Was this translation helpful? Give feedback.
-
For the same needs i created (need some time to finish the recipe) https://github.com/anolilab/blitzjs-cli-recipe/tree/feature/cli and https://github.com/anolilab/cerebro/tree/alpha Im using a custom webpack config to search the commands like blitz for pages (preview https://discord.com/channels/802917734999523368/843912213399601192/875063361115656212) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I very often see myself creating the first user (or other db objects) using the
blitz console
. It would be pretty cool if we could create custom cli commands to do activities that are repeated often. I see this pattern being used extensively in laravel.PS: apologies if this has already been discussed before, couldn't find that discussion.
Beta Was this translation helpful? Give feedback.
All reactions