Skip to content

Commit d337b20

Browse files
committed
copy types to output folder
1 parent 0ba6d6c commit d337b20

File tree

5 files changed

+15
-25
lines changed

5 files changed

+15
-25
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"files": [
88
"dist"
99
],
10-
"types": "dist/index.d.ts",
10+
"types": "dist/expression-globals-typescript.d.ts",
1111
"scripts": {
12-
"build": "rollup -c",
12+
"build": "rollup -c && cp src/types.d.ts dist/expression-globals-typescript.d.ts",
1313
"test": "echo \"Error: no test specified\"",
1414
"publish": "npm run build && np"
1515
},

rollup.config.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@ import pkg from "./package.json";
44
export default {
55
input: "src/index.ts",
66
output: [
7-
{
8-
file: pkg.main,
9-
format: "cjs",
10-
},
11-
{
12-
file: pkg.module,
13-
format: "es",
14-
},
7+
{ file: pkg.main, format: "cjs", exports: "auto", sourcemap: true },
8+
{ file: pkg.module, format: "es", sourcemap: true },
159
],
1610
plugins: [typescript()],
1711
external: [...Object.keys(pkg.dependencies || {})],

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="./index.d.ts" />
1+
/// <reference path="./types.d.ts" />
22

33
// Global objects, attributes, and methods
44
export const PathBase: PathValue = {};
File renamed without changes.

tsconfig.json

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
{
22
"compilerOptions": {
3-
"outDir": "dist",
4-
"module": "esnext",
5-
"target": "es5",
6-
"lib": ["es6", "dom", "es2016", "es2017"],
7-
"sourceMap": true,
8-
"allowJs": false,
9-
"declaration": true,
10-
"moduleResolution": "node",
11-
"forceConsistentCasingInFileNames": true,
12-
"noImplicitReturns": true,
13-
"noImplicitThis": true,
3+
"allowSyntheticDefaultImports": true,
4+
"diagnostics": true,
5+
"downlevelIteration": false,
6+
"lib": ["es5", "es6", "dom"],
7+
"noEmitOnError": true,
148
"noImplicitAny": true,
15-
"strictNullChecks": true,
16-
"suppressImplicitAnyIndexErrors": true
9+
"noImplicitThis": true,
10+
"pretty": true,
11+
"skipLibCheck": true,
12+
"target": "es5"
1713
},
1814
"include": ["src"],
19-
"exclude": ["node_modules", "dist", "example", "rollup.config.js"]
15+
"exclude": ["dist", "node_modules", "test/typescript"]
2016
}

0 commit comments

Comments
 (0)