React Application for ordering food.
Tested with node 6.x and 7.x
$ npm install
$ npm start
Visit http://localhost:3000/
from your browser of choice.
Server is visible from the local network as well.
It is using webpack dashboard, so please note the following:
OS X Terminal.app users: Make sure that View → Allow Mouse Reporting is enabled, otherwise scrolling through logs and modules won't work. If your version of Terminal.app doesn't have this feature, you may want to check out an alternative such as iTerm2.
Build will be placed in the build
folder.
$ npm run build
If your app is not running on the server root you should change publicPath
at two places.
In webpack.config.js
(ATM line 147):
output: {
path: buildPath,
publicPath: '/your-app/',
filename: 'app-[hash].js',
},
and in source/js/routes
(ATM line 9):
const publicPath = '/your-app/';
This command will start webpack dev server, but with NODE_ENV
set to production
.
Everything will be minified and served.
Hot reload will not work, so you need to refresh the page manually after changing the code.
npm run preview
$ npm run lint
Linting pre-push hook is not enabled by default. It will prevent the push if lint task fails, but you need to add it manually by running:
npm run hook-add
To remove it, run this task:
npm run hook-remove