Skip to content

Commit

Permalink
[PAS-587] Add missing Typescript definitions back (#86)
Browse files Browse the repository at this point in the history
* [PAS-587] Add Typescript definition files back

* [PAS-587] Add Typescript definition files back

* format

* format
  • Loading branch information
jonashendrickx authored Nov 5, 2024
1 parent 9682cff commit d801c21
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 18 deletions.
32 changes: 32 additions & 0 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"format:check": "prettier . --check && eslint \"**/*.{js,vue}\"",
"test": "npx jest"
},
"dependencies": {},
"devDependencies": {
"@eslint/js": "9.13.0",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "12.1.1",
"@types/jest": "29.5.14",
"eslint": "9.13.0",
Expand All @@ -41,9 +41,9 @@
"prettier-plugin-organize-imports": "4.1.0",
"rimraf": "6.0.1",
"rollup": "4.24.2",
"@rollup/plugin-terser": "0.4.4",
"rollup-plugin-dts": "6.1.1",
"ts-jest": "29.2.5",
"tslib": "2.8.0",
"typescript": "5.6.3",
"ts-jest": "29.2.5"
"typescript": "5.6.3"
}
}
38 changes: 24 additions & 14 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import dts from 'rollup-plugin-dts';

const createPlugins = (compact) => (compact ? [terser()] : []);

Expand Down Expand Up @@ -37,17 +38,26 @@ const cjs = (compact) => ({
plugins: createPlugins(compact)
});

export default {
input: 'src/passwordless.ts',
plugins: [typescript()],
output: [
iife(false),
iife(true),
es6(false),
es6(true),
umd(false),
umd(true),
cjs(false),
cjs(true)
]
};
export default [
{
input: 'src/passwordless.ts',
plugins: [typescript()],
output: [
iife(false),
iife(true),
es6(false),
es6(true),
umd(false),
umd(true),
cjs(false),
cjs(true)
]
},
{
input: 'src/types.ts',
plugins: [dts()],
output: {
file: 'dist/types.d.ts'
}
}
];

0 comments on commit d801c21

Please sign in to comment.