<commit_before># How to publish math.js

This document describes the steps required to publish a new version of math.js.


## Update version number

Update the version number `package.json`.

Run `npm install` to also have this version number updated in `package-lock.json`


## Update history

Update the date and version number in the file `HISTORY.md`. Verify whether all
changes in the new version are described.


## Build and test

Build the distribution files in folders `dist` and `lib`, and test everything by running:

    npm run build-and-test

After the build is complete, verify if the files are created and contain the
correct date and version number in the header.

Check whether there are new markdown files generated in `./docs` and add if
so add them to git.


## Commit

- Commit the final code.
- Merge the develop branch into the master branch.
- Push to github.

Now go to travis-ci and verify if the tests run fine there as well:

  https://travis-ci.org/josdejong/mathjs

If everything is well, create a tag for the new version, like:

    git tag v1.2.4
    git push --tags


## Publish

Publish to npm:

    npm publish

or directly pass a valid one time password (two factor authentication):

    npm publish --otp 123456


## Test published libraries

Install the libraries locally and test whether they work correctly:

    cd tmp-folder
    npm install mathjs


## Update the website

Wait until the new version of math.js is available on cdnjs.org.

The website is located in the `gh-pages` branch of the project.
Follow the readme in the `gh-pages` branch on how to update the website.

## Update the REST API

Update the `mathjs-rest` project (served at http://api.mathjs.org).


## Back to develop

Switch to the develop branch


## Done

Time to drink a beer.
<commit_msg>Change link of api.mathjs.org to https<commit_after># How to publish math.js

This document describes the steps required to publish a new version of math.js.


## Update version number

Update the version number `package.json`.

Run `npm install` to also have this version number updated in `package-lock.json`


## Update history

Update the date and version number in the file `HISTORY.md`. Verify whether all
changes in the new version are described.


## Build and test

Build the distribution files in folders `dist` and `lib`, and test everything by running:

    npm run build-and-test

After the build is complete, verify if the files are created and contain the
correct date and version number in the header.

Check whether there are new markdown files generated in `./docs` and add if
so add them to git.


## Commit

- Commit the final code.
- Merge the develop branch into the master branch.
- Push to github.

Now go to travis-ci and verify if the tests run fine there as well:

  https://travis-ci.org/josdejong/mathjs

If everything is well, create a tag for the new version, like:

    git tag v1.2.4
    git push --tags


## Publish

Publish to npm:

    npm publish

or directly pass a valid one time password (two factor authentication):

    npm publish --otp 123456


## Test published libraries

Install the libraries locally and test whether they work correctly:

    cd tmp-folder
    npm install mathjs


## Update the website

Wait until the new version of math.js is available on cdnjs.org.

The website is located in the `gh-pages` branch of the project.
Follow the readme in the `gh-pages` branch on how to update the website.

## Update the REST API

Update the `mathjs-rest` project (served at https://api.mathjs.org).


## Back to develop

Switch to the develop branch


## Done

Time to drink a beer.

{'fraction_non_alphanumeric': 0.060955518945634266, 'fraction_numerical': 0.004942339373970346, 'mean_word_length': 3.431873479318735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2188877', 'n_tokens_mistral': 1049, 'n_tokens_neox': 994, 'n_words': 547}