Skip to content

Commit

Permalink
Generate type declarations
Browse files Browse the repository at this point in the history
This lets the Typescript compiler also generates the types'
declarations.
  • Loading branch information
poirotp-bpk committed Oct 13, 2023
1 parent 36dbd02 commit a83d710
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ build/Release

# Typescript intermediate files
tsconfig.tsbuildinfo
*.d.ts
*.js
!test/**/*.js

Expand Down
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,24 @@ build/Release
node_modules
jspm_packages

# Editors
.idea/
.vscode/

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

test
.github/
.node-version
.travis.yml
.npmignore
data-structure.png
tsconfig.tsbuildinfo
webpack.config.js
LICENSE
*.ts
!*.d.ts
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"version": "0.10.8",
"description": "A simple library to read/write HLS playlists",
"main": "index.js",
"types": "index.d.ts",
"browser": "dist/hls-parser.min.js",
"scripts": {
"lint": "xo",
"type-check": "tsc --noEmit",
"audit": "npm audit --audit-level high",
"build": "rm -fR ./dist; webpack --mode development ; webpack --mode production",
"build": "rm -fR ./dist; tsc ; webpack --mode development ; webpack --mode production",
"test": "npm run lint && npm run build && npm run audit && ava --verbose"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"declaration": true,
"noImplicitAny": false
},
"exclude": [
Expand Down

0 comments on commit a83d710

Please sign in to comment.