Skip to content

Commit

Permalink
Publish types in npm package (#98)
Browse files Browse the repository at this point in the history
* publish types in npm package
* fixes nits
* Delete package-lock.json
  • Loading branch information
prateekbh authored and kristoferbaxter committed Nov 1, 2018
1 parent 2b78710 commit fbef4bd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -45,10 +45,12 @@
"prettier": "1.14.3",
"rimraf": "2.6.2",
"rollup": "0.66.6",
"rollup-plugin-copy": "0.2.3",
"tslint": "5.11.0",
"typescript": "3.1.3"
},
"files": [
"dist/index.d.ts",
"dist/index.js",
"dist/index.mjs"
],
Expand Down
11 changes: 9 additions & 2 deletions rollup.config.js
Expand Up @@ -16,13 +16,20 @@

import pkg from './package.json';
import builtins from 'builtins';
import copy from 'rollup-plugin-copy';

export default {
input: './transpile/index.js',
external: [
...builtins(),
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {}),
...Object.keys(pkg.peerDependencies || {}),
],
plugins: [
copy({
'./transpile/index.d.ts': './dist/index.d.ts',
verbose: true,
}),
],
output: [
{
Expand All @@ -34,4 +41,4 @@ export default {
format: 'cjs',
},
],
}
};
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -15,6 +15,7 @@
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"declaration": true,
"module": "esnext"
},
"include": [
Expand Down

0 comments on commit fbef4bd

Please sign in to comment.