Skip to content

Commit

Permalink
feat: typescript declaration files
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipe Correa committed Mar 10, 2023
1 parent 645d07f commit c47c1f8
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"@babel/react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-class-properties"
],
"ignore": [
"**/*.stories.js"
]
}
176 changes: 170 additions & 6 deletions package-lock.json

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

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"pretest": "standard",
"test": "jest",
"lint": "standard --fix",
"build": "babel ./src --out-dir ./dist -s inline",
"build:prod": "babel ./src --out-dir ./dist --ignore '**/*.test.js' --ignore '**/*.stories.js' -s inline",
"prebuild": "rimraf dist",
"build": "babel ./src --out-dir dist -s inline",
"postbuild": "tsc",
"build:storybook": "build-storybook -c .storybook -o docs",
"prepublishOnly": "npm test && npm run build",
"start": "start-storybook"
},
"repository": {
Expand Down Expand Up @@ -62,7 +62,9 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-test-renderer": "^18.2.0",
"standard": "^13.1.0"
"rimraf": "^4.4.0",
"standard": "^13.1.0",
"typescript": "^4.9.5"
},
"peerDependencies": {
"react": "^18.2.0"
Expand Down
19 changes: 19 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es2019",
"moduleResolution": "node",
"jsx": "react",
"esModuleInterop": true,
"allowJs": true,
"outDir": "dist",
"declaration": true,
"declarationMap": true
},
"include": [
"src"
],
"exclude": [
"**/*.stories.js",
"**/*.test.js"
]
}

0 comments on commit c47c1f8

Please sign in to comment.