The front-end code powering https://stier.ndla.no.
Norwegian Digital Learning Arena (NDLA) (Norwegian: Nasjonal digital læringsarena) is a joint county enterprise offering open digital learning assets for upper secondary education. In addition to being a compilation of open educational resources (OER), NDLA provides a range of other online tools for sharing and cooperation.
- Node.JS 20.13
- yarn ~1.15
- Docker (optional)
What's in the box?
- React
- Redux
- Express
- Webpack + Babel (ES6) via Razzle
All dependencies are defined in package.json
and are managed with yarn. To
initially install all dependencies and when the list dependency has changed,
run yarn
.
$ yarn
Start node server with hot reloading middleware listening on port 3000.
$ yarn start
To use a different api set the NDLA_ENVIRONMENT
environment variable.
Test framework: Jest with Enzyme
$ yarn test
Cypress is used for end to end testing.
$ yarn e2e
Prettier is used for automatic code formatting.
$ yarn format
$ yarn format-check
Eslint is used for linting javascript code.
$ yarn lint-es
Rules are configured in ./eslintrc
and extends esling-config-ndla.
j Check for errors with stylelint:
$ yarn lint-style
Rules are configured in ./.stylelintrc.js
and extends stylelint-config-standard.
# GTG? Checks code formating, linting and runs unit tests:
$ yarn check-all
# Create minified production ready build:
$ yarn build
# Start a production build:
$ yarn start-prod
# Do you TDD?
$ yarn tdd
# Docker stuff
$ ./build.sh