Skip to content

Commit 8bedaaa

Browse files
authored
Merge pull request #31 from github/modernize
Convert to TypeScript and simplify toolchain
2 parents b99ce21 + 6f66ca1 commit 8bedaaa

16 files changed

+3388
-4864
lines changed

.babelrc

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

.eslintrc.json

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,29 @@
22
"extends": [
33
"plugin:github/browser",
44
"plugin:github/es6",
5-
"plugin:github/flow"
5+
"plugin:github/typescript"
66
],
7-
"parser": "babel-eslint",
7+
"globals": {
8+
"MarkdownToolbarElement": "readable",
9+
"MarkdownHeaderButtonElement": "readable",
10+
"MarkdownBoldButtonElement": "readable",
11+
"MarkdownItalicButtonElement": "readable",
12+
"MarkdownQuoteButtonElement": "readable",
13+
"MarkdownCodeButtonElement": "readable",
14+
"MarkdownLinkButtonElement": "readable",
15+
"MarkdownImageButtonElement": "readable",
16+
"MarkdownUnorderedListButtonElement": "readable",
17+
"MarkdownOrderedListButtonElement": "readable",
18+
"MarkdownTaskListButtonElement": "readable",
19+
"MarkdownMentionButtonElement": "readable",
20+
"MarkdownRefButtonElement": "readable"
21+
},
822
"overrides": [
923
{
1024
"files": "test/**/*.js",
1125
"rules": {
12-
"flowtype/require-valid-file-annotation": "off",
1326
"github/unescaped-html-literal": "off"
1427
}
15-
},
16-
{
17-
"files": "prettier.config.js",
18-
"rules": {
19-
"flowtype/require-valid-file-annotation": "off"
20-
}
2128
}
2229
]
2330
}

.flowconfig

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

.github/workflows/nodejs.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ on:
44
pull_request:
55
branches:
66
- master
7-
87
jobs:
98
build:
10-
11-
runs-on: ubuntu-latest
9+
runs-on: ${{ matrix.os }}
1210

1311
strategy:
12+
fail-fast: false
1413
matrix:
15-
node-version: [8.x, 10.x, 12.x]
14+
os: [ubuntu-latest, windows-latest, macos-latest]
1615

1716
steps:
1817
- uses: actions/checkout@v1
19-
- name: Use Node.js ${{ matrix.node-version }}
18+
- name: Use Node.js 12.x
2019
uses: actions/setup-node@v1
2120
with:
22-
node-version: ${{ matrix.node-version }}
21+
node-version: 12.x
2322
- name: npm install, build, and test
2423
run: |
2524
npm install

.travis.yml

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

examples/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@
4949
<script>
5050
const script = document.createElement('script')
5151
if (window.location.hostname.endsWith('github.io') || window.location.hostname.endsWith('github.com')) {
52-
script.src = "https://unpkg.com/@github/markdown-toolbar-element@latest/dist/index.umd.js"
52+
script.src = "https://unpkg.com/@github/markdown-toolbar-element@latest/dist/index.js"
5353
} else {
54-
script.src = "../dist/index.umd.js"
54+
script.src = "../dist/index.js"
5555
}
56+
script.type = 'module'
5657
document.body.appendChild(script)
5758
</script>
5859
</body>

index.d.ts

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

index.js.flow

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

0 commit comments

Comments
 (0)