Skip to content

Commit

Permalink
fix: move type declarations to a specific directory
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinroger committed May 7, 2018
1 parent 41c7bfd commit aaf59bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"license": "GPL-3.0",
"main": "dist/nanocurrency.cjs.js",
"module": "dist/nanocurrency.esm.js",
"types": "dist/index.d.ts",
"types": "dist/types/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/marvinroger/nanocurrency-js.git"
Expand Down
6 changes: 5 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ const config = [
{ file: pkg.main, format: 'cjs', globals },
{ file: pkg.module, format: 'es', globals }
],
plugins: [resolve(), commonjs(), typescript()]
plugins: [
resolve(),
commonjs(),
typescript({ useTsconfigDeclarationDir: true })
]
}
]

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"declarationDir": "dist/types",
"pretty": true,
"newLine": "lf",
"stripInternal": true,
Expand Down

0 comments on commit aaf59bd

Please sign in to comment.