Skip to content

Commit 20ca196

Browse files
feat: merge v3 (#39)
BREAKING CHANGE: the CLI can't be invoked without specifying any input files anymore. To convert all files in a directory, use a shell glob instead (e. g. `md-to-pdf *.md`). It's now possible to read markdown from stdin. The whole source code has been converted to Typescript. The minimum required node version has been increased to v10.0.0 (current LTS). It should still work with v8.3.0+ but the tests won't be able to run. The license has been changed to MIT.
2 parents ce51ae2 + 1b9bf99 commit 20ca196

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3668
-3645
lines changed

.circleci/config.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ on:
44
push:
55
paths:
66
- '.github/workflows/*'
7-
- 'lib/*'
8-
- 'test'
9-
- 'cli.js'
10-
- 'index.js'
7+
- 'src/**'
118
- 'markdown.css'
129
- 'package*.json'
1310

1411
jobs:
1512
build:
1613
strategy:
14+
fail-fast: false
1715
matrix:
18-
node: [8, 10, 12]
16+
node: [10, 12]
1917
os: ['ubuntu-latest', 'windows-latest', 'macOS-latest']
2018

2119
name: Node ${{ matrix.node }} on ${{ matrix.os }}
@@ -29,16 +27,21 @@ jobs:
2927
with:
3028
version: ${{ matrix.node }}.x
3129

32-
- name: install and lint
33-
run: |
34-
npm install
35-
npx xo
30+
- name: install
31+
run: npm install
32+
33+
- name: lint
34+
run: npx xo
35+
if: matrix.os != 'windows-latest' # because "Delete ␍ prettier/prettier" o.O
36+
37+
- name: build
38+
run: npm run build
3639

3740
- name: test lib
38-
run: npx nyc ava test/lib.spec.js
41+
run: npx nyc ava src/test/lib.spec.ts
3942

4043
- name: test api
41-
run: npx ava test/api.spec.js
44+
run: npx ava src/test/api.spec.ts
4245

4346
- name: test cli
44-
run: npx ava test/cli.spec.js
47+
run: npx ava src/test/cli.spec.ts --timeout=1m

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
.vscode
33
node_modules
44

5+
# generated
6+
dist
7+
58
# tests
69
.nyc_output
710
coverage
8-
test/**/*.pdf
9-
test/**/*.html
11+
src/test/**/*.pdf
12+
src/test/**/*.html

cli.js

Lines changed: 0 additions & 128 deletions
This file was deleted.

index.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

lib/get-html.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

lib/get-marked-with-highlighter.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

lib/get-md-files-in-dir.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/get-output-file-path.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/is-md-file.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)