Skip to content

Latest commit

 

History

History
110 lines (79 loc) · 3.19 KB

CONTRIBUTING.md

File metadata and controls

110 lines (79 loc) · 3.19 KB

How to contribute to ng-mocks

The best way would be to discuss an issue or an improvement first:

Update docs

To update docs, simply go to the page you want to edit on https://ng-mocks.sudo.eu/ and click on the "Edit this page" link at the bottom of the page.

Prerequisites for development

Requirements on Mac

Requirements on Linux

Requirements on Windows

Development

To develop ng-mocks you need to use bash and WSL in case if you are on Windows.

How to install dependencies

  • start docker and ensure it's running

  • open a bash session in a terminal (Git BASH on Windows)

  • execute

    sh ./docker-compose.sh
  • it will take a while, but afterwards you have all dependencies installed

How to run unit tests locally

nvm use
npm run test

How to debug unit tests locally

nvm use
npm run test:debug

How to run tests in IE locally

How to release ng-mocks

  • You need to create a .env file with the next content:

    GH_TOKEN=<GITHUB_TOKEN>
    NPM_TOKEN=<NPM_TOKEN>
    GIT_AUTHOR_NAME=<YOUR_NAME>
    GIT_AUTHOR_EMAIL=<YOUR_EMAIL>
    GIT_COMMITTER_NAME=<YOUR_NAME>
    GIT_COMMITTER_EMAIL=<YOUR_EMAIL>

    An example of it is:

    GH_TOKEN=123123123
    NPM_TOKEN=123123123
    GIT_AUTHOR_NAME="Best Coder"
    GIT_AUTHOR_EMAIL=best@coder.com
    GIT_COMMITTER_NAME="Best Coder"
    GIT_COMMITTER_EMAIL=best@coder.com
  • execute npm run release -- --no-ci - to generate a release and publish it on github.com

  • execute npm publish ./tmp/ng-mocks-N.N.N.tgz - to publish it on npmjs.com

  • profit