Closed kon-pas closed 11 months ago
Hey. Looks like we were working simultaneously! I basically rewrote everything under the scripts directory. Please check that out!
Hey. Looks like we were working simultaneously!
Ouch!
I think we should differ the CLI from create-nue
. I think create-nue
should only scaffold the project, while the other scripts should be somewhere else.
The original purpose of this repository is to show how Nue JS compilation and server-side rendering works. Maybe the project names is misleading? I'm happy to do the npm create
flow later since it feels so buggy with so many moving parts.
Right, I must have missed that out. I was more trying to make a scaffolding tool for nue
, where you get a project template comfortably, like create-vue
for vue
, create-svelte
for svelte
, etc.
I was trying to differ the nue
-related stuff only to be in the /template
, and thought that /scripts
are not related to nue
.
to show how Nue JS compilation and server-side rendering works
With that in mind, having a CLI isn't a good call π
@tipiirai After reflection, the name create-nue
is indeed misleading π
If we ditch npm create
for now, I think having the cli.js
and basically the whole PR #16 is unnecessary, since that was the point of it. If we don't need an entry point for CLI, nor pass any inline arguments, it's better to just call ./<script>
than ./cli.js <script>
If you can start from scratch βΒ In your opinion, what would be the best "starter kit" for Nue?
Closing this one because of breaking changes and particularly because of this: #27
Features
It is now possible to scaffold the template via package binaries:
If the package is installed globally, the following also works:
Or via calling an exported function:
All of the above worked for me on Linux, but I didn't test them all on Windows. I'm afraid there may be some path resolving problems.
Also, I have made a simple CLI and published it as
nuekit-cli
.nue-cli
wasn't available for some reason, even though I couldn't find a package with that name.nuekit-cli
is just a temporary package, its code may become a part ofnuekit
in the future. I will unpublish it, if you wish. It uses scripts from/scripts
with minor updates.create-nue
usesnuekit-cli
because I didn't want to pollute the template with code non-related to the person's project. The other reasonable option is to put them in.nue
, or similar, hidden to the end user directory. It is a topic to discuss.And finally, I have implemented simple prompts and user messages. I will finish this later.
Changes
I have updated the directory structure - now the code related to
create-nue
itself is in/src
and the code related to the template is in/src/template
. This is a change that I thought may improve readability, but is invasive to the project. I will undo this, if you wish.nuekit-cli
is based on this project's scripts and the code from PR #16. Those scripts are no longer used bycreate-nue
, but I didn't delete them.I have cleaned-up the template's
package.json
- it is no longercreate-nue
'spackage.json
.