Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript Types #189

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ node_modules/

.DS_Store

# build
web.js*
web-dev.js*
node.js*
node-dev.js*
*.map
dist
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!dist
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.16.1",
"description": "A Javascript API to connect to ESPN's fantasy football API",
"main": "web.js",
"types": "dist/index.d.ts",
"files": [
"web.js",
"node.js",
Expand All @@ -19,10 +20,11 @@
},
"license": "LGPL-3.0-only",
"scripts": {
"build": "npm run clean:dist && webpack",
"build": "npm run clean:dist && npm run build:types && webpack",
"build:docs": "npm run clean:docs && jsdoc -c .jsdoc.json",
"build:types": "npx tsc",
"clean": "npm run clean:dist && npm run clean:docs",
"clean:dist": "rm -rf web.js web.js.map node.js node.js.map web-dev.js web-dev.js.map node-dev.js node-dev.js.map",
"clean:dist": "rm -rf web.js web.js.map node.js node.js.map web-dev.js web-dev.js.map node-dev.js node-dev.js.map dist",
"clean:docs": "rm -rf docs",
"ci": "npm run clean && npm run lint && npm run test && npm run build && npm run build:docs",
"lint": "eslint integration-tests/**/*.js src/**/*.js",
Expand Down Expand Up @@ -72,6 +74,7 @@
"jest": "26.4.2",
"jsdoc": "^3.6.6",
"q": "^1.5.1",
"typescript": "^4.2.4",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12"
},
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"allowJs": true,
"outDir": "dist"
},
"include": ["src/**/*"]
}