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

Create inferno-create-app #410

Closed
trueadm opened this issue Sep 27, 2016 · 9 comments
Closed

Create inferno-create-app #410

trueadm opened this issue Sep 27, 2016 · 9 comments
Assignees
Milestone

Comments

@trueadm
Copy link
Member

trueadm commented Sep 27, 2016

As per title, this would help newcomers majorly. Could we however deal with this differently?

  • can we use Rollup instead of Webpack and get all the same features – @Rich-Harris?
  • what do we use as the standard test framework? Jest works great with React, but no work has been done around it with Inferno
  • can we use Bublé rather than Babel? Given the JSX plugin is in Babel, probably not right now, but might be another interesting point for @Rich-Harris. Given Inferno's reputation as the "performance library/framework" it would be interesting if we can take advantage of this position by pushing Bublé.

Food for thought.

@trueadm trueadm added this to the 1.0 milestone Sep 27, 2016
@trueadm trueadm self-assigned this Sep 27, 2016
@Rich-Harris
Copy link

can we use Rollup instead of Webpack and get all the same features

depends on which specific features you mean. we're probably going to investigate code-splitting in the near future, but we haven't thought too seriously about what that means.

can we use Bublé rather than Babel?

I'm not too familiar with Inferno's Babel plugin – right now Bublé has out-of-the-box support for JSX but it's naive. I'm probably not going to get much time to work on Bublé in the near future but I'm in favour of smarter JSX transformation and would welcome any help... Are there Inferno-specific things or are we talking about doing a better job of transpiling JSX across the board?

@trueadm
Copy link
Member Author

trueadm commented Sep 27, 2016

Just quickly replying as I'm in bed: regarding JSX, Inferno JSX is nothing like React JSX. Rather than create virtual DOM per each JSXElement, Inferno creates optimised elements that rip out static content and hoists them as blueprints. It's a bit difficult to describe, so if you have time, I'd check this for context: https://github.com/trueadm/inferno/blob/dev/examples/dbmonster/app.js

There are various settings that can be passed the Inferno JSX plugin: such as line object literals vs factories and optimising object references by hoisting them (e.g rather than Inferno.NodeTypes.OptVElement it creates a var NodeTypes = Inferno.NodeTypes and references OptVElement from that). There's quite a lot to it and inferno stores hashes to common nested JSX Elements so it can attempt to re-use hoisted blueprints where possible.

@buzinas
Copy link
Contributor

buzinas commented Sep 29, 2016

I would love to use Rollup instead of Webpack, and the only reason I don't is the lack of HMR, which comes in handy for development productivity.

A couple of weeks ago, I was thinking about using Webpack for development and Rollup for production, but I got afraid of having two different codes - and then a possibility of two different behaviors.

Another concern I had was: I couldn't find any way to lazy load stuff with Rollup without introducing System.JS. Is there any way to do that?

@cmnstmntmn
Copy link

@buzinas you may consider @porsager 's https://github.com/porsager/Wright - very neat any easy to plug with any kind of project.

@gaspard
Copy link
Contributor

gaspard commented Oct 9, 2016

Maybe a short video on how to do the transition from a newly created react app to inferno would help a lot already (something like what Christian did for Cerebral2: https://www.youtube.com/watch?v=9DrMC20tkQg):

> create-react-app foo
> cd foo
> npm run eject
> ... edit config, etc to use inferno
> npm start

@nightwolfz
Copy link
Member

FYI Bublé doesn't support generators and a bunch of other features.

@trueadm
Copy link
Member Author

trueadm commented Oct 26, 2016

@nightwolfz Nope: https://gitlab.com/Rich-Harris/buble/issues/71

Let's stick with Babel for now then. Plus people will be using Stage 0 coming from react-create-app and expect the same features.

@trueadm
Copy link
Member Author

trueadm commented Dec 7, 2016

This has been done!

@trueadm trueadm closed this as completed Dec 7, 2016
@gaspard
Copy link
Contributor

gaspard commented Dec 8, 2016

BTW, the link is: https://github.com/infernojs/create-inferno-app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants