A simple journal app used in John Arnold's talk given about JavaScript.
To install the packages run
npm install
Then to run the server, run
npm run dev
and open a browser to http://localhost:8080
- React
- Webpack, along with webpack-dev-server
- ESlint, using Airbnb's eslintrc
- Babel enabling ES2015, also see ES6Fiddle
To re-create the initial environment from scratch, run these commands:
npm init
npm install --save react react-dom
npm install --save-dev babel-core babel-eslint babel-loader babel-preset-es2015 babel-preset-react babel-preset-stage-0 eslint eslint-config-airbnb eslint-plugin-react webpack webpack-dev-server
Then refer to/copy from these files in this project:
- webpack.config.js
- .babelrc
- .eslintrc
- public/index.html
- src/app.js
If you would like to take advantage of linting in your editor (and enable ES2015 syntax highlighting), here are the steps to configure SublimeText
- Ensure you have SublimeText Package Control installed
- Install the package 'Babel'
- Install the package 'SublimeLinter'
- Install the package 'SublimeLinter-contrib-eslint'
- Open a .js file, and in Sublime go through the menus -> View -> Syntax -> Open all with current extension as... -> Babel -> JavaScript (Babel)
- Do the same with a .jsx file
- (Optional) Install the package 'Oceanic Next Color Scheme' and enable it through Preferences -> Color Scheme -> Oceanic Next Color Scheme