Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ndlano/editorial-frontend
CMS for NDLA
https://github.com/ndlano/editorial-frontend
Last synced: about 2 months ago
JSON representation
CMS for NDLA
- Host: GitHub
- URL: https://github.com/ndlano/editorial-frontend
- Owner: NDLANO
- License: gpl-3.0
- Created: 2017-04-28T10:47:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T09:29:50.000Z (about 2 months ago)
- Last Synced: 2024-10-29T09:43:05.024Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 41.1 MB
- Stars: 8
- Watchers: 5
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![CI](https://github.com/NDLANO/editorial-frontend/workflows/CI/badge.svg)
# ED
NDLA Editorial Frontend for producing content for NDLA
## Requirements
- Node.JS 20.13
- yarn v4
- Docker (optional)## Getting started
What's in the box?
- React
- Express
- Vite + Babel (ES6)### Dependencies
All dependencies are defined in `package.json` and are managed with npm/yarn. To
initially install all dependencies and when the list dependency has changed,
run `yarn install`.```
$ yarn install
```### Start development server
Start node server with hot reloading middleware listening on port 3000.
```
$ yarn start
```To use a different api set the `NDLA_ENVIRONMENT` environment variable.
### Unit tests
Test framework: Vitest with React Testing Library.
```
$ yarn test
```### e2e tests
[Playwright](https://playwright.dev/) is used for end to end testing.
```
$ yarn e2e
```To circumvent api call flakiness all request are mocked when the tests are run on ci. Use the following command to record new mocks when api-calls change:
```
$ yarn e2e:record
```Playwright tests can also be run in headless mode with mocked API calls.
```
$ yarn e2e:headless
```### Code style
_tl;dr_: Use prettier and eslint!
Format code with prettier to get uniform codestyle:
```
$ yarn format
```Lint code with [eslint](http://eslint.org/), including [eslint react plugin](https://github.com/yannickcr/eslint-plugin-react), [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import), [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y#readme).
Beside linting with globally installed eslint, eslint can be invoked with `yarn`:```
$ yarn lint
```Rules are configured in `./.eslintrc.js` and extends [eslint-config-react-app](https://github.com/facebook/create-react-app/tree/master/packages/eslint-config-react-app). If feeling brave, try `eslint --fix`.
## Other scripts
```
# Create minified production ready build with vite (rollup):
$ yarn build
``````
# Docker stuff
$ ./build.sh
```