diff --git a/.eslintrc.json b/.eslintrc.json index a4aaa98..0ee2295 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,20 +2,24 @@ "extends": [ "plugin:github/es6", "plugin:github/browser", - "plugin:github/flow" + "plugin:github/typescript" ], + "globals": { + "ClipboardCopyElement": "readable" + }, "overrides": [ { "files": "test/**/*.js", - "rules": { - "flowtype/require-valid-file-annotation": "off" - }, "env": { "mocha": true }, "globals": { "assert": true } + }, + { + "files": "*.js", + "parser": "espree" } ] } diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index 60e7050..0000000 --- a/.flowconfig +++ /dev/null @@ -1,9 +0,0 @@ -[ignore] - -[include] - -[libs] - -[options] - -[lints] diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..76a2e03 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,23 @@ +name: Node CI + +on: push +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v1 + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm test + env: + CI: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a19f461..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -sudo: required -node_js: - - "node" -addons: - chrome: stable -cache: - directories: - - node_modules diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..e6bf555 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @github/web-systems-reviewers diff --git a/README.md b/README.md index cfdf0d0..8c9c6a2 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,22 @@ $ npm install --save @github/clipboard-copy-element ## Usage +### Script + +Import as ES modules: + ```js import '@github/clipboard-copy-element' ``` +With a script tag: + +```html + - +