Skip to content

Instantly share code, notes, and snippets.

@jonathanconway
Last active May 13, 2018 13:47
Show Gist options
  • Save jonathanconway/15271dda82b1de39e12eb938ac4a6e8d to your computer and use it in GitHub Desktop.
Save jonathanconway/15271dda82b1de39e12eb938ac4a6e8d to your computer and use it in GitHub Desktop.
Minimalist create-react-app. Just enough to write a failing unit-test. πŸ”΄ βœ…
################################################################################
#
# 1. Save this file to /usr/local/bin
#
# 2. To make it executable: chmod u+x /usr/local/bin/create-react-app-minimal.sh
#
# 3. To create your app: create-react-app-minimal {app-name}
#
# 4. In your package.json, change this line:
# "test": ...
# to this:
# "test": "jest"
#
# 5. And append this block:
# ,
# "babel": {
# "presets": [
# "env",
# "react"
# ],
# "plugins": [
# "transform-class-properties",
# "transform-object-rest-spread",
# "transform-runtime"
# ]
# }
#
################################################################################
mkdir $1
cd $1
npm init -y
npm install \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
babel-preset-react6.24.1 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
--save-dev
npm install \
[email protected] \
[email protected] \
--save
@MichaelDimmitt
Copy link

MichaelDimmitt commented Apr 15, 2018

thank you for posting a minimalist version.
I am spending my day playing around with this as a base.

I think you have a typo. @jonathanconway

not working: babel-preset-react6.24.1
npm ERR! 404 Not Found: babel-preset-react6.24.1@latest

working: [email protected]

Thoughts?

@jonathanconway
Copy link
Author

Thanks for your feedback, @MichaelDimmitt. I'll see if I can resolve this. I also want to try and avoid spelling out the version numbers if possible, so that it picks up the latest version instead. Will work on a fix.

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