Last active
April 26, 2020 14:48
-
-
Save nnance/e9a7e62dd0b19b2524ca166c11e5e21b to your computer and use it in GitHub Desktop.
React TypeScript Bootstrap Parcel prototype template
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 characters
{ | |
"root": true, | |
"parser": "@typescript-eslint/parser", | |
"plugins": ["@typescript-eslint"], | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/eslint-recommended", | |
"plugin:@typescript-eslint/recommended", | |
"prettier/@typescript-eslint" | |
] | |
} |
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 characters
/node_modules | |
/dist | |
/coverage | |
/.cache |
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 characters
git init && npm init -y | |
npm i -D @types/react @types/react-dom react react-dom typescript parcel-bundler react-bootstrap bootstrap @types/react-bootstrap eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser prettier eslint-plugin-prettier | |
./node_modules/.bin/tsc --init --jsx react --sourceMap --esModuleInterop --lib es6,dom | |
curl -fsSL https://gist.githubusercontent.com/nnance/e9a7e62dd0b19b2524ca166c11e5e21b/raw/.gitignore > .gitignore | |
curl -fsSL https://gist.githubusercontent.com/nnance/e9a7e62dd0b19b2524ca166c11e5e21b/raw/.eslint.json > .eslint.json | |
curl -fsSL https://gist.githubusercontent.com/nnance/e9a7e62dd0b19b2524ca166c11e5e21b/raw/index.html > index.html | |
curl -fsSL https://gist.githubusercontent.com/nnance/e9a7e62dd0b19b2524ca166c11e5e21b/raw/index.tsx > index.tsx |
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 characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="theme-color" content="#000000" /> | |
<title>React TypeScript Bootstrap</title> | |
</head> | |
<body> | |
<noscript>You need to enable JavaScript to run this app.</noscript> | |
<div id="root"></div> | |
<script src="./index.tsx"></script> | |
<!-- | |
This HTML file is a template. | |
If you open it directly in the browser, you will see an empty page. | |
To begin the development, run `npm start` or `yarn start`. | |
To create a production bundle, use `npm run build` or `yarn build`. | |
--> | |
</body> | |
</html> |
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 characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
const App = () => <div>Hello World!</div>; | |
ReactDOM.render(<App />, document.querySelector("#root")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use to quickly create a react app for prototyping by running the following command
/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/nnance/e9a7e62dd0b19b2524ca166c11e5e21b/raw/create-react-ts.sh)"