This has some basic tools and dependencies which can be used when creating a React app. Feel free to contact Tobias Tykvart with any questions when creating a new repository from this template
- Create a new repository with this one as a template.
- Clone the repository.
- Install Node JS. The Node Package Manager
npm
is used to install all dependencies and runs the development server to display checkit locally in the browser. npm install
within the repository folder. This installs all dependencies.- Use Emotion for styling, it is already installed and ready to go. Use the css prop to style elements.
- Run
npm start:dev
to start the json-server and dev web server and visitlocalhost:4000
in your browser to see the app. - Recommended code editor and useful plugins:
- Visual Studio Code
- ESLint extension shows ESLint warning within VS Code.
- npm
- Prettier - Code formatter
- Better Comments for more human-friendly comments.
- Bracket Pair Colorizer
- ES7 React/Redux/GraphQL/React-Native snippets
- Guides
- indent-rainbow
- Reindent on Save
- npm Intellisense
Check package.md for explanations of all the packages we are using. These are installed automatically (see "Getting Started": step 4).
- Material UI provides template React components (@material-ui/icons).
npm start:dev
runs all commands necessary for development, or you can run them individually:npm start
to start the development server locally. It should show 'Hello World' in the browser.npm run server
servesserver/db.json
locally to mock APIs
npm test
to run all tests (should pass HelloWorld.test). Or usenpm run test:watch
to run tests continually on any file change.npm run deploy
produces an optimized production build in the branch "gh-pages" and publishes the website on GitHub Pages.npm run build
produces an optimized production build in the folder "build" which can be published in other ways.
- Tobias Tykvart - Front End