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

CLI tool ala create-react-app to scaffold HyperApp apps #41

Closed
jorgebucaran opened this issue Feb 6, 2017 · 29 comments
Closed

CLI tool ala create-react-app to scaffold HyperApp apps #41

jorgebucaran opened this issue Feb 6, 2017 · 29 comments
Labels
discussion meta News and communication

Comments

@jorgebucaran
Copy link
Owner

No description provided.

@jorgebucaran jorgebucaran added discussion meta News and communication labels Feb 6, 2017
@tunnckoCore
Copy link

I think it should be separate package, first. Second it can use the hyperapp-one boilerplate and also it would be good to promote it in the readme : )

@jorgebucaran
Copy link
Owner Author

We're thinking the same.

@tunnckoCore
Copy link

tunnckoCore commented Feb 7, 2017

Name, arguments order / commands, prefs? We can use @generate under the hood, but I think it can be small with low deps too.

@tunnckoCore
Copy link

Maybe the name should create-hyperapp? Or simply hyperapp-cli. I'm for the last. :)

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Feb 8, 2017

🤔 I like -cli because it's short, but I think the name depends on how the tool would work.

Let's discuss how and what the tool should be about, and later decide the name?

Should we follow the lead of create-react-app?

@liadbiz
Copy link

liadbiz commented Feb 11, 2017

@jbucaran agree. use hyperapp-cli for runing example code locally, create-hyper-app for getting boilerplate created by user.

@selfup
Copy link
Contributor

selfup commented Feb 11, 2017

Just a few thoughts

Since there are multiple options, it should be like:

create-hyperapp jsx my-new-project

create-hyperapp html my-new-project


jsx should use webpack

html should use browserify so that hyperxify can work (will use CJS by default)

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Feb 11, 2017

@selfup LGTM.

It would make rollup the default though, since that's what HyperApp itself uses and I've found produces the smallest bundles. Rollup pioneered tree-shaking so they deserve it.

Ideally, hyperapp-cli should be able to use other stuff too, as well as simpler, less specialized setups.

A beginner user doesn't need a powerful configuration, but a clear bird's eye view of all the moving parts and a simpler configuration is that.

@lukejacksonn
Copy link
Contributor

lukejacksonn commented Feb 18, 2017

The below links might be useful for anyone looking at creating anything create-hyperapp like (they came from @jbucaran on the slack channel). I think it's a great idea, create-react-app is a useful tool. Offering something similar feels fitting. Also here for convenience hyperapp-one.

Just thinking out loud here but, what about some options like the following, with some sensible defaults or flag similar to npm init --yes which says, just get on with it 💥:

-> create-hyperapp
--> Name: my-app
--> Markup: html|jsx
--> Bundler: rollup|webpack|browserify
--> Template: helloworld|counter|input|dragndrop|todo

I might look at it this weekend. @tunnckoCore mentions @generate I've never used it before.. how does it fair in comparison with yeoman? Definitely the way to go?

@jorgebucaran
Copy link
Owner Author

I am not familiar with generate, but I know yeoman.

I'd go with a standalone, dependency free mini tool instead. Something minimal, just like HyperApp.

I have nothing against yeoman, but IIRC, yeoman forces the user to install yo globally. Does @generate do the same thing?

@jorgebucaran
Copy link
Owner Author

I kinda like the direction choo went with choo-cli, what do you think @lukejacksonn?

@lukejacksonn
Copy link
Contributor

I see, so partial templates as well project scafolding.. I like!

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Feb 18, 2017

Yeah, nice, but still, even simpler that choo-cli. If you look at the excellent Youtube walkthrough of the tool, you might experience flashing deja-vus, that is, if you have any experience working with Rails. 😄

@lukejacksonn
Copy link
Contributor

lukejacksonn commented Feb 18, 2017

Yeh I checked that video out but have no rail experience so it was all quite new to me anyway 🚂🔥🔥🔥 Looked like a nice api.. it could have been a much less verbose process though yeh.

What does it need to do then hyperapp-cli what is the first command new perhaps? What does that do, presumably takes a project name and generates a project structure similar to that of hyperapp-one?

@jorgebucaran
Copy link
Owner Author

@lukejacksonn Yes, maybe. Depends on what features the generator has right? What do you think would be the best CLI? What should the generator be able to do?

Do we want something like choo generate to generate specific parts of the project, like just a directory with the model or views or effects. I personally find this overkill, but I could be wrong.

@lukejacksonn
Copy link
Contributor

Ima sleep on this!

@jorgebucaran
Copy link
Owner Author

@lukejacksonn Does it make sense to have a hyper-cli/hyperapp-cli?

@zaceno
Copy link
Contributor

zaceno commented Jun 25, 2017

@jbucaran, I know you asked @lukejacksonn, but I'm going to throw in my 2c here: One of the things I like best about hyperapp is how you can just start coding. I think we should have a CLI but we need to think about how we make sure people don't miss out on the pleasant simplicity of going bare-bones.

I mean people are so used to needing the CLI from other frameworks, they may never even consider trying without it.

My fear is, that if everyone is approaching hyperapp through a CLI, the differentiating factors become less apparent.

@lukejacksonn
Copy link
Contributor

This feels like a lonnng time ago now! I am in agreement really; people want a CLI because they don't want to have to type out a load of boilerplate / create big file structures.

HyperApp doesn't demand so much so why bother.. this is probably why one hasn't materialised.

Personally I've been working on a template that I just clone and then quickly go round renaming application specific keys things like names, descriptions, titles, icons, deployable domain etc. Nothing more has to change as I am satisfied with using rollup and JSX (or more recently just h). It works fine.

But every time I do this I think.. I wish there was an hyperapp-init <project_name> then just went and did a find/replace job on these variables and even create me a repo and push up an initial commit.

Not sure this is really hyperapp specific but it wouldn't be hard to create and would really help people jump straight into coding, like you say!

@rileytg
Copy link

rileytg commented Jun 25, 2017

rails templates are kinda like what you're describing. personalized starters that have basic find and replace type functionality

@jorgebucaran
Copy link
Owner Author

It would be fun if there was a service we could curl for the template in a tarball instead.

curl hyperapp.in/starter | tar -xzf

@andyrj
Copy link
Contributor

andyrj commented Jun 26, 2017

I really like the way vue-cli handles their templates in GitHub repos, simple handle bar esque syntax and the prompts we're fairly easy to modify. Personally I would be tempted to see if we could just fork and rebrand that client ;) just 2cents from the new guy

@rileytg
Copy link

rileytg commented Jun 29, 2017

^ yes those are very easy!

reminds me of kubernetes helm charts

@Pyrolistical
Copy link

good to see minimal boilerplate examples of hyperapp + jsx + webpack

I hate fully integrated production ready bbq templates. Those are just useless to me to understand how stuff works.

@jorgebucaran
Copy link
Owner Author

@Pyrolistical #41 (comment)

Those are just useless to me to understand how stuff works.

Oh, I know that feeling! 😏

@tunnckoCore
Copy link

tunnckoCore commented Jul 12, 2017

oh god, it seems you finally unblocked me.

@lukejacksonn
Copy link
Contributor

@tunnckoCore 👋 welcome back!

@jorgebucaran
Copy link
Owner Author

@tunnckoCore I never meant to block you forever, if you can have civilized discussions, I am ready to have them! 👋

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Jul 16, 2017

This issue has been open for the longest time now! 🎉

I'll cut to the chase. I am not interested on a CLI tool to scaffold hyperapp projects at this moment (but I could change my mind) and I agree with @lukejacksonn in that:

HyperApp doesn't demand so much so why bother.. this is probably why one hasn't materialised.

For a list of minimal boilerplates, see here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion meta News and communication
Projects
None yet
Development

No branches or pull requests

9 participants