diff --git a/.gitattributes b/.gitattributes index 8f2d8c3587..3d7e847130 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ +* eol=lf test/* linguist-vendored diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 48c71ebbaf..762b536118 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,8 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]')" strategy: matrix: - node_version: ['lts/*', 'node'] + # lowest verison here should also be in `engines` field + node_version: [12, 'lts/*', 'node'] runs-on: ubuntu-latest steps: - name: Checkout Code @@ -46,6 +47,10 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v2 + - name: Install Node + uses: dcodeIO/setup-node-nvm@master + with: + node-version: 'lts/*' - name: Install Dependencies run: npm ci - name: Build 🗜️ diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000000..83b6c07f89 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,9 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/npm", + "@semantic-release/github", + "@semantic-release/git" + ] +} diff --git a/Makefile b/Makefile index 7deead54c1..2bd63016a2 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ all: - @cp lib/marked.js marked.js - @uglifyjs --comments '/\*[^\0]+?Copyright[^\0]+?\*/' -o marked.min.js lib/marked.js + @cp lib/marked.cjs marked.cjs + @uglifyjs --comments '/\*[^\0]+?Copyright[^\0]+?\*/' -o marked.min.js lib/marked.cjs clean: - @rm marked.js + @rm marked.cjs @rm marked.min.js bench: diff --git a/README.md b/README.md index 9f48278366..c3ae94319f 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,12 @@ Also read about: * [Options](https://marked.js.org/#/USING_ADVANCED.md) * [Extensibility](https://marked.js.org/#/USING_PRO.md) +## Compatibility + +**Node.js:** Only [current and LTS](https://nodejs.org/en/about/releases/) Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time. + +**Browser:** Not IE11 :) + ## Installation **CLI:** `npm install -g marked` @@ -41,7 +47,9 @@ Also read about: **CLI** + ``` bash +# Example with stdin input $ marked -o hello.html hello world ^D @@ -49,6 +57,11 @@ $ cat hello.html
hello world
``` +```bash +# Print all options +$ marked --help +``` + **Browser** ```html @@ -63,7 +76,7 @@ $ cat hello.html