Skip to content

Commit

Permalink
[IMP] tooling: add another d.ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGenin authored and ged-odoo committed Jun 9, 2022
1 parent 385e118 commit 8a967e5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/owl.cjs.js",
"browser": "dist/owl.iife.js",
"module": "dist/owl.es.js",
"types": "dist/types/index.d.ts",
"types": "dist/types/owl.d.ts",
"files": [
"dist"
],
Expand Down Expand Up @@ -55,6 +55,7 @@
"npm-run-all": "^4.1.5",
"prettier": "2.4.1",
"rollup": "^2.56.3",
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.31.1",
"sass": "^1.16.1",
Expand Down
27 changes: 17 additions & 10 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import pkg from "./package.json";
import git from "git-rev-sync";
import typescript from 'rollup-plugin-typescript2';
import { terser } from "rollup-plugin-terser";

import dts from "rollup-plugin-dts";

let input, output;

Expand Down Expand Up @@ -68,12 +68,19 @@ function getConfigForFormat(format, generatedFileName, outro, minified = false)
};
}

export default {
input,
output,
plugins: [
typescript({
useTsconfigDeclarationDir: true
}),
]
};
export default [
{
input,
output,
plugins: [
typescript({
useTsconfigDeclarationDir: true
}),
]
},
{
input: "dist/types/index.d.ts",
output: [{ file: "dist/types/owl.d.ts", format: "es" }],
plugins: [dts()],
},
];

0 comments on commit 8a967e5

Please sign in to comment.