Open Shinyaigeek opened 2 years ago
In my opinion all these command are a bit too high level for a nanojsx cli.
Everyone should use the style he prefers.
I can imagine adding simple low level elements like:
nano-jsx server --express6 --cjs /server/server.tsx
nano-jsx component /shared/components/button.tsx
nano-jsx page /shared/pages/home.tsx
nano-jsx router /shared/component/router.tsx
nano-jsx routes /shared/component/navigation.tsx
nano-jsx hydrate /client/hydrate/main.tsx
Well, I think it's a good idea to provide low layer functionality to help with initialization. It seems good that a third-party library uses it to provide some high layer functionality
If you still think about this, I would suggest only to provide starter templates and simple configurations. The problem that I have with CLIs like react-create-app is that beginners don't learn how to setup the project and then depend on that tools. Refactoring out the "hidden magic" of CLI tools to get a project configuration to an explicit, actual and custom configurable state can even for experienced devs be a pain. It also is a problem in case of flexibility. I for example use Microbundle (Libs and WebComponents) and Webpack (SPAs) depending on the context of the project.
Motivation :fire:
Currently, mastering
nano-jsx
is a difficult task for a beginner web developer (I am not going to offend you).To improve this situation, How about
nano-jsx
providing a cli?Cli’s feature (?)
nano-jsx create [APP]
nano-jsx create
should only handle a very simple setup. I think a more detailed setup to ask questions by dialog should be done withcreate-nano-jsx-app
nano-jsx serve
with express6nano-jsx build
nano-jsx start
ornano-jsx dev
nano-jsx deploy
with "Node.js & vercel" or "deno & Deno Deploy”How about do you think about this? If it looks good, I want to start to work on this little by little.