Skip to content

Commit

Permalink
Typescript declarations for eds-tokens (#725)
Browse files Browse the repository at this point in the history
* tsconfig

* rollup.config

* package.json

* tsconfig correct dir

* correct types in package.json
  • Loading branch information
pomfrida authored Oct 22, 2020
1 parent a0fbf6c commit dafaa1c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions libraries/tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "dist/tokens.esm.js",
"module": "dist/tokens.esm.js",
"browser": "dist/tokens.umd.js",
"types": "dist/types/index.d.ts",
"type": "module",
"license": "AGPL-3.0-or-later",
"author": {
Expand Down
10 changes: 1 addition & 9 deletions libraries/tokens/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ export default [
watch: {
clearScreen: true,
},
plugins: [
resolve(),
typescript({
tsconfig: 'tsconfig.json',
typescript: require('typescript'),
include: ['*.ts+(|x)', '**/*.ts+(|x)', '*.js+(|x)', '**/*.js+(|x)'],
exclude: ['node_modules/**'],
}),
],
plugins: [resolve(), typescript({ useTsconfigDeclarationDir: true })],
output: [
{
file: pkg.module,
Expand Down
7 changes: 6 additions & 1 deletion libraries/tokens/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"include": ["index.ts"],
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist/types",
"outDir": "./dist"
},
"include": ["./src/**/*.ts*"],
"exclude": ["node_modules"]
}

0 comments on commit dafaa1c

Please sign in to comment.