Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
build: bundle declaration files
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed May 23, 2021
1 parent 51433e8 commit ef8fd3e
Show file tree
Hide file tree
Showing 6 changed files with 909 additions and 84 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/*.js
node_modules/
dist/
node_modules/
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"plugins": ["@typescript-eslint"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 12,
"project": "./tsconfig.json"
"ecmaVersion": 12
},
"env": {
"browser": true
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@types/jest": "^26.0.22",
"@typescript-eslint/eslint-plugin": "^4.21.0",
"@typescript-eslint/parser": "^4.21.0",
"@wessberg/rollup-plugin-ts": "^1.3.14",
"eslint": "^7.24.0",
"eslint-config-prettier": "^8.1.0",
"husky": "^6.0.0",
Expand All @@ -66,8 +67,6 @@
"rollup": "2.48.0",
"rollup-plugin-filesize": "^9.1.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript-paths": "^1.3.0",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "^26.4.2",
"ts-node": "^9.1.1",
"tslib": "^2.2.0",
Expand Down
8 changes: 2 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import resolve from '@rollup/plugin-node-resolve';
import strip from '@rollup/plugin-strip';
import filesize from 'rollup-plugin-filesize';
import { terser } from 'rollup-plugin-terser';
import typescript from 'rollup-plugin-typescript2';
import { typescriptPaths } from 'rollup-plugin-typescript-paths';
import ts from "@wessberg/rollup-plugin-ts";

const name = 'Lucia';

Expand All @@ -16,10 +15,7 @@ const generateConfig = (input, config) => ({
eslint(),
commonjs(),
resolve({ extensions: ['.ts'] }),
typescriptPaths({ preserveExtensions: true }),
typescript({
useTsconfigDeclarationDir: true,
}),
ts(),
strip({
functions: ['console.log'],
include: '**/*.(ts)',
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"declaration": true,
"strict": true
},
"include": ["./src/**/*.ts", "./src/**/*.spec.ts", "./vite.config.ts"],
"exclude": ["node_modules", "dist", "./src/**/*.js"]
"include": ["./src/**/*.ts"],
"exclude": ["node_modules", "dist", "./src/**/*.js", "./src/**/*.spec.ts", "./vite.config.ts"]
}
Loading

0 comments on commit ef8fd3e

Please sign in to comment.