Merge tsconfigs

This patch moves all tsconfigs to the root level and set up a base file
(tsconfig.base.json), which the server (tsconfig.server.json) and client (tsconfig.json) are extending for there specific purposes.
7 files changed
tree: 5c5a5d330870b93428ce97c11f677a431589dbcb
  1. dist/
  2. public/
  3. src/
  4. tests/
  5. .env.example
  6. .gitignore
  7. .travis.yml
  8. babel.config.js
  9. docker-compose.yml
  10. Dockerfile
  11. jest.config.js
  12. jsduck.json
  13. LICENSE
  14. package-lock.json
  15. package.json
  16. postcss.config.js
  17. README.md
  18. tsconfig.all.json
  19. tsconfig.base.json
  20. tsconfig.json
  21. tsconfig.server.json
  22. tslint-wikimedia-eslint-rules-port.json
  23. tslint.json
  24. vue.config.js
README.md

wikibase-termbox

User interface for managing terms in Wikibase

Installation

# ensure the node user uses your user id, so you own generated files
docker-compose build --build-arg UID=$(id -u) --build-arg GID=$(id -g) node
# install npm dependencies
docker-compose run --rm node npm install

Configuring

  • set the server-specific environment variables: cp .env.example .env and modify .env accordingly
    • SSR_PORT is the port at which you can reach the node server performing server-side vue rendering
    • MEDIAWIKI_NETWORK_TO_JOIN is the (local docker) network the SSR service should also be attached to in order to make it available to wikibase. The SSR service can be reached inside of this network at http://node-ssr:<SSR_PORT from your .env file>. This can be used in conjunction with e.g. https://github.com/addshore/mediawiki-docker-dev/

      ⚠ Some versions of docker-compose insist this network exists. Make sure to set this value to an existing docker network (either created by another docker-compose project or you manually) - check via docker network ls

    • CSR_PORT is the port at which you can reach the development server
    • NODE_ENV is the environment to set for node.js

Building

  • docker-compose run --rm node npm run build builds the frontend code
  • docker-compose run --rm node npm run build-server builds the server-side manifest and the node entry point

Starting the server

  • docker-compose up starts two servers
    • the SSR server at http://localhost:<SSR_PORT from your .env file>
    • a development server for the frontend part in development mode reachable at http://localhost:<CSR_PORT from your .env file>

Development

  • docker-compose run --rm node npm run test runs all tests
  • docker-compose run --rm node npm run lint for linting, docker-compose run --rm node npm run fix for fixing fixable lint errors