:david-project: https://david-dm.org/kiegroup/optaweb-employee-rostering
:david-path: path=optaweb-employee-rostering-frontend
:david-deps: {david-project}/status.svg?{david-path}
:david-devDeps: {david-project}/dev-status.svg?{david-path}
:david-link: {david-project}?{david-path}

[[optaweb-employee-rostering-frontend]]
= OptaWeb Employee Rostering Frontend

image:{david-deps}["dependencies Status", link="{david-link}"]
image:{david-devDeps}["devDependencies Status", link="{david-link}&type=dev"]

[[available-scripts]]
== Available Scripts

In the project directory, you can run:

[[npm-install]]
=== `npm install`

Downloads all of the needed node dependencies.

This will create the `node_modules` directory.

[[npm-start]]
=== `npm start`

Runs the app in the development mode. Open http://localhost:3000 to view
it in the browser.

The page will reload if you make edits. You will also see any lint
errors in the console.

[[npm-test]]
=== `npm test`

Launches the test runner in the interactive watch mode. See the section
about
https://facebook.github.io/create-react-app/docs/running-tests[running
tests] for more information.

[[npm-run-lint]]
=== `npm run lint`

Check the whole `src/` directory for linter errors. Some IDEs are
difficult to be configured to be 100% compliant with the project linter
configuration. Use `npm run lint:fix` to resolve the edge cases that
your IDE cannot handle.

[[npm-run-build]]
=== `npm run build`

Builds the app for production to the `build` folder. It correctly
bundles React in production mode and optimizes the build for the best
performance.

The build is minified and the filenames include the hashes. Your app is
ready to be deployed!

See the section about
https://facebook.github.io/create-react-app/docs/deployment[deployment]
for more information.

[[npm-run-eject]]
=== `npm run eject`

*Note: this is a one-way operation. Once you `eject`, you can’t go
back!*

If you aren’t satisfied with the build tool and configuration choices,
you can `eject` at any time. This command will remove the single build
dependency from your project.

Instead, it will copy all the configuration files and the transitive
dependencies (Webpack, Babel, ESLint, etc) right into your project so
you have full control over them. All of the commands except `eject` will
still work, but they will point to the copied scripts so you can tweak
them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable
for small and middle deployments, and you shouldn’t feel obligated to
use this feature. However we understand that this tool wouldn’t be
useful if you couldn’t customize it when you are ready for it.

== Change Backend Location
Use an environment variable called `REACT_APP_BACKEND_URL` to change backend URL
when running `npm start` or `npm run build`. For example:

[literal]
....
REACT_APP_BACKEND_URL=http://10.0.0.123:8081
....

Note that environment variables will be "baked" inside the JS bundle during npm build,
so you'll need to know backend location before building and deploying frontend.

Learn more about React environment variables in
https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables[
Adding Custom Environment Variables].

[[browserslist-support]]
== Browserslist Support

Developers set versions list in queries like `last 2 version` to be free
from updating versions manually. Browserslist will use
http://caniuse.com/[Can I Use] data for this queries.

Check the project current browser query on
https://browserl.ist/?q=%3E0.2%25%2C+not+dead%2C+not+ie%3C%3D11%2Cnot+op_mini+all[browserl.ist]
or by running `npx browserslist`.

Example:

[source,json]
----
{
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}
----

[[learn-more]]
== Learn More

You can learn more in the
https://github.com/Microsoft/TypeScript-React-Starter[TypeScript React
Starter].

To learn React, check out the https://reactjs.org/[React documentation].

This project was bootstrapped with
https://github.com/facebook/create-react-app[Create React App].

Learn more on
https://github.com/browserslist/browserslist#readme[Browserslist].
