Comments (29)
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
from hyperapp.
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 : )
from hyperapp.
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.
from hyperapp.
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)
from hyperapp.
@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.
from hyperapp.
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.
- hyperapp + jsx + rollup + buble minimal boilerplate
- hyperapp + jsx + rollup minimal boilerplate
- hyperapp + jsx + webpack minimal boilerplate
- hyperapp + hyperx + browserify minimal boilerplate
- hyperapp + jsx + browserify minimal boilerplate
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?
from hyperapp.
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
from hyperapp.
Ima sleep on this!
from hyperapp.
@tunnckoCore 👋 welcome back!
from hyperapp.
We're thinking the same.
from hyperapp.
Name, arguments order / commands, prefs? We can use @generate under the hood, but I think it can be small with low deps too.
from hyperapp.
Maybe the name should create-hyperapp
? Or simply hyperapp-cli
. I'm for the last. :)
from hyperapp.
🤔 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?
from hyperapp.
@jbucaran agree. use hyperapp-cli for runing example code locally, create-hyper-app for getting boilerplate created by user.
from hyperapp.
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?
from hyperapp.
I kinda like the direction choo went with choo-cli, what do you think @lukejacksonn?
from hyperapp.
I see, so partial templates as well project scafolding.. I like!
from hyperapp.
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. 😄
from hyperapp.
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
?
from hyperapp.
@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.
from hyperapp.
@lukejacksonn Does it make sense to have a hyper-cli/hyperapp-cli?
from hyperapp.
@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.
from hyperapp.
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!
from hyperapp.
rails templates are kinda like what you're describing. personalized starters that have basic find and replace type functionality
from hyperapp.
^ yes those are very easy!
reminds me of kubernetes helm charts
from hyperapp.
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.
from hyperapp.
Those are just useless to me to understand how stuff works.
Oh, I know that feeling! 😏
from hyperapp.
oh god, it seems you finally unblocked me.
from hyperapp.
@tunnckoCore I never meant to block you forever, if you can have civilized discussions, I am ready to have them! 👋
from hyperapp.
Related Issues (20)
- JSX fails if no props are given HOT 6
- A way to insert raw Html HOT 1
- TypeError: can't access property 0, newSubs is null, when setting the state to undefined. HOT 4
- Issue with null-vnodes HOT 1
- prevent rerender node HOT 2
- The dispatch initializer ends in an endless loop on init when dispatching any action HOT 7
- Injected classes gets removed when using object/array to define class props HOT 1
- hyperapp version HOT 3
- Memo Data Gotcha HOT 5
- Confusing doc for actions -> wrapped actions HOT 5
- Passing arguments to init HOT 4
- [Question] Headless mode is still possible? HOT 1
- Destroying a child app HOT 8
- @hyperapp/html: use a Proxy? HOT 9
- Actions returning other Actions HOT 5
- Compile template tag to hyperscript HOT 17
- A challenge to hyperapp community HOT 1
- Has 2.0 been dropped from development? HOT 3
- oldSub[2] is not a function HOT 3
- Cannot read properties of null (reading 'length') HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperapp.