Skip to content

Commit

Permalink
Include TypeScript definitions in the final output.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Jan 29, 2020
1 parent 33e2822 commit bde1796
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 2 deletions.
173 changes: 173 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"homepage": "https://github.com/jonatanklosko/material-ui-confirm",
"main": "dist/material-ui-confirm.cjs.js",
"module": "dist/material-ui-confirm.esm.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
Expand Down Expand Up @@ -49,7 +50,8 @@
"react": "^16.12.0",
"react-dom": "^16.12.0",
"rollup": "^1.29.0",
"rollup-plugin-babel": "^4.3.3"
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-copy": "^3.3.0"
},
"peerDependencies": {
"react": "^16.8.0",
Expand Down
8 changes: 7 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pkg from './package.json';
import babel from 'rollup-plugin-babel';
import copy from 'rollup-plugin-copy';

export default {
input: 'src/index.js',
Expand All @@ -9,6 +10,11 @@ export default {
],
external: ['react', '@material-ui/core'],
plugins: [
babel({ exclude: 'node_modules/**' })
babel({ exclude: 'node_modules/**' }),
copy({
targets: [
{ src: 'src/index.d.ts', dest: 'dist' }
],
}),
]
};

0 comments on commit bde1796

Please sign in to comment.