Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the initial use of this function #374

Open
yuangu opened this issue Aug 17, 2020 · 3 comments
Open

Enhance the initial use of this function #374

yuangu opened this issue Aug 17, 2020 · 3 comments

Comments

@yuangu
Copy link

@yuangu yuangu commented Aug 17, 2020

I have a idea. Auto create a typescript project by run es4x init with --typescript or -t 。It's not manual copy file by sample.
And “mvnDependencies ” added to the package.json by default. Because a lot of people don't know about it。
If you agree, I can modify this code. ^_^

@pmlopes
Copy link
Contributor

@pmlopes pmlopes commented Aug 17, 2020

@yuangu I've been also thinking of something like this for a while. Currently I think the workflow is quite tedious and does not feel natural, a user needs to do:

npm init
es4x init
# manually add ts dependencies

I've read about npm init command a while ago here: https://www.stefanjudis.com/today-i-learned/npm-init-uses-npx-under-the-hood/

I was thinking back then that if we would have a create module (which I would host under the @es4x user) we could automate the whole thing as:

npm init @es4x --typescript

Where the last flag would be optional and when not present would just create a bare bones js project. As a starting point we could look how vue is doing it here:

https://github.com/vitejs/create-vite-app

As it already supports several templates. With this in place we could then remove the init command from es4x-pm as it would be useless.

Is this something you would be interested in contribute?

@pmlopes
Copy link
Contributor

@pmlopes pmlopes commented Aug 24, 2020

@yuangu I've added the following pull request:

#375

This will allow you later to start a project with:

npm init es4x-app -t ts

for TypeScript and without args for JavaScript.

Let me know if you want to improve the templates / add any interesting missing files...

@frank-dspeed
Copy link

@frank-dspeed frank-dspeed commented Sep 1, 2020

i am strong against all that for the following reasons.

  • We need to stop using npm as deployment option it is not a good fit for the project and it would not even exist on systems without graalvm or nodejs installed
  • When the npm from nodejs is used the nodejs version will not be used by this apps at all.
  • We should not need a additional nodejs installation or graalvm node which is slow to install es4x.

While i agree that scalfolding a project is a nice thing i am for maven only package management. and scalefolding via template skeleton dirs maybe but that needs to work with bash only or java out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.