Skip to content

Commit

Permalink
Merge pull request #3454 from video-dev/add-typings
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjamie committed Feb 10, 2021
2 parents e7a7615 + e4152e1 commit 25db4d7
Show file tree
Hide file tree
Showing 62 changed files with 2,628 additions and 158 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Expand Up @@ -80,8 +80,7 @@ jobs:

- name: build
run: |
npm run type-check
npm run build
npm run build:ci
npm run docs
# check that hls.js doesn't error if requiring in node
# see https://github.com/video-dev/hls.js/pull/1642
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -16,6 +16,7 @@ coverage/
.idea/*

# Build
/lib
/dist
/dist.zip
/netlify
Expand Down
9 changes: 0 additions & 9 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Expand Up @@ -3,3 +3,4 @@
package-lock.json
/coverage
libs/
/api-extractor/report*
6 changes: 0 additions & 6 deletions README.md
Expand Up @@ -223,12 +223,6 @@ Or type
npm install --save hls.js
```

Optionally there is a declaration file available to help with code completion and hinting within your IDE for the hls.js api

```sh
npm install --save-dev @types/hls.js
```

### Server-side-rendering (SSR) and `require` from a Node.js runtime

We support this now. You can safely require this library in Node and absolutely nothing will happen :) See https://github.com/video-dev/hls.js/pull/1841
Expand Down
44 changes: 44 additions & 0 deletions api-extractor.json
@@ -0,0 +1,44 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/lib/hls.d.ts",
"bundledPackages": [],
"compiler": {
"tsconfigFilePath": "<projectFolder>/tsconfig-lib.json"
},
"apiReport": {
"enabled": true,
"reportFolder": "<projectFolder>/api-extractor/report",
"reportTempFolder": "<projectFolder>/api-extractor/report-temp"
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/dist/hls.js.d.ts"
},
"tsdocMetadata": {
"enabled": false
},
"newlineKind": "lf",
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning",
"addToApiReportFile": true
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "warning",
"addToApiReportFile": true
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "none",
"addToApiReportFile": false
}
}
}
}
1 change: 1 addition & 0 deletions api-extractor/.gitignore
@@ -0,0 +1 @@
/report-temp

0 comments on commit 25db4d7

Please sign in to comment.