showdown/docs/local-development.md
2022-05-14 01:15:43 +03:00

1.4 KiB

Prerequesites

Build

Building your clone of the repository is easy:

  1. run npm install.

  2. run npx grunt build (see Gruntfile.js). This command:

    1. Cleans the repo.
    2. Checks code quality (JSHint and ESLint).
    3. Runs tests.
    4. Creates the distributable and minified files in the dist folder.

Test

A suite of tests is available which require Node.js. Once Node is installed, run the following command from the project root to install the dependencies:

npm install

Once installed, run tests from the project root:

npm test

You can easily add new tests:

  1. Create a markdown file (ending in .md) that contains the markdown to test.
  2. Create a .html file with the same name as the markdown one from the previous step. This html file will automatically be tested when the tests are executed with mocha.