Created
May 30, 2016 11:13
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ #!/usr/bin/env sh mkdir $1 cd $1 npm init -y npm install -D babelify watchify babel-preset-es2015 babel-preset-react babel-plugin-syntax-flow babel-plugin-transform-flow-strip-types react react-dom echo '{"presets": ["es2015", "react"], "plugins": ["transform-flow-strip-types", "syntax-flow"]}' > .babelrc gibo Node OSX > .gitignore cat <<EOF > .flowconfig [ignore] .*/node_modules/.* [include] [libs] ./interfaces [options] EOF mkdir src touch src/index.js cat <<EOF > src/index.js import ReactDOM from "react-dom"; import React from "react"; const el = document.querySelector(".main"); ReactDOM.render(<h1>Hello</h1>, el) EOF mkdir interfaces touch interfaces/externs.js touch interfaces/globals.js mkdir public cat <<EOF > public/index.html <html> <head> <title>app</title> <meta charset="utf8" > </head> <body> <div class="main"></div> <script src="bundle.js"></script> </body> </html> EOF echo "public/bundle.js" >> .gitignore git init git add . git commit -m "Initial commit"