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

Give example of production ready workflow with React JS #2046

Closed
christianalfoni opened this issue Aug 15, 2014 · 8 comments
Closed

Give example of production ready workflow with React JS #2046

christianalfoni opened this issue Aug 15, 2014 · 8 comments

Comments

@christianalfoni
Copy link
Contributor

Hi!

I've had a great time working with React JS, but I had big issues with setting up a good workflow for it. As with most library/framework sites the examples of "getting started" is too simple. Developers considering React JS will need to put it in their workflow and it is currently, to my experience, difficult to figure out how.

I wrote a post on how I experienced getting React JS up and running with a workflow, ending up with browserify: React JS and browserify workflow. It points out how difficult it is and suggests a solution I hope will help people out.

So the request here is really to put an example of a workflow setup on the React JS site. It would make it a lot easier for developers to adopt the library.

Thanks for this great contribution to the world of JavaScript :-)

@syranide
Copy link
Contributor

As with most library/framework sites the examples of "getting started" is too simple

Amen 👍

Personally I use webpack + a custom resolver to avoid having to specify paths, I also use a slightly tweaked uglifyjs which allows me to mirror the original line-breaks as closely as possible, which is awesome for production errors.

But yeah, even setting up the config for webpack for the first time isn't that simple.

@sophiebits
Copy link
Collaborator

Both of these are reasonable starting places:

https://github.com/rackt/react-boilerplate
https://github.com/petehunt/react-boilerplate

Maybe we can link to them in the docs somewhere.

@madebyherzblut
Copy link

@syranide Is your webpack.config.js and uglifyjs config available somewhere? Right now I am using browerify as well but I have been bitten by it too much…

@christianalfoni
Copy link
Contributor Author

@spicyj That sounds like a great idea :-) I would be happy to build one for browserify? Would that be of help?

@syranide
Copy link
Contributor

@madebyherzblut https://gist.github.com/syranide/07c6897c005fa9bc70e4

Beware though, unless you run my branch of uglifyjs, you explicitly do not want to use preserve_line: true (it's broken, and no_empty_line: true is not standard).

@madebyherzblut
Copy link

Thank you, @syranide!

@christianalfoni
Copy link
Contributor Author

@spicyj Created a boilerplate that uses browserify and karma for testing (To get a fast workflow). Have a looksy at https://github.com/christianalfoni/react-app-boilerplate . Please use if you think it will contribute

@zpao
Copy link
Member

zpao commented Feb 16, 2016

Going to close and track as a part of #5679

@zpao zpao closed this as completed Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants