Skip to content

Commit 27f68c3

Browse files
authored
seperate types
1 parent 015d0c6 commit 27f68c3

File tree

6 files changed

+36
-27
lines changed

6 files changed

+36
-27
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "@bitpatty/imgproxy-url-builder",
3-
"version": "0.7.0",
3+
"version": "0.7.1-rc.1",
44
"description": "imgproxy param builder",
55
"author": "Matteias Collet <matteias.collet@bluewin.ch>",
66
"type": "module",
77
"main": "dist/cjs/index.js",
88
"module": "dist/mjs/index.js",
9+
"types": "dist/types/index.d.ts",
910
"exports": {
1011
".": {
1112
"import": "./dist/mjs/index.js",
@@ -14,7 +15,7 @@
1415
},
1516
"scripts": {
1617
"prebuild": "rimraf dist",
17-
"build": "rollup -c rollup.config.cjs.js && rollup -c rollup.config.esm.js && node create-pkg-json.cjs",
18+
"build": "rollup -c rollup.config.cjs.js && rollup -c rollup.config.esm.js && rollup -c rollup.config.types.js && node create-pkg-json.cjs",
1819
"test": "jest --verbose",
1920
"docs": "typedoc",
2021
"deps:force-upgrade": "npm-check-updates -u && rm -rf node_modules && rm -f package-lock.json && npm i"
@@ -36,7 +37,6 @@
3637
"files": [
3738
"dist"
3839
],
39-
"types": "./dist/index.d.ts",
4040
"homepage": "https://github.com/BitPatty/imgproxy-url-builder#readme",
4141
"devDependencies": {
4242
"@types/jest": "28.1.5",

rollup.config.types.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import typescript from 'rollup-plugin-typescript2';
2+
import pkg from './package.json';
3+
4+
export default {
5+
input: 'src/index.ts',
6+
output: [
7+
{
8+
file: pkg.types,
9+
},
10+
],
11+
plugins: [
12+
typescript({
13+
tsconfig: 'tsconfig.types.json',
14+
}),
15+
],
16+
external: [],
17+
};

tsconfig.cjs.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,7 @@
66
"moduleResolution": "node",
77
"sourceMap": true,
88
"allowJs": false,
9-
"declaration": true,
10-
"emitDeclarationOnly": false,
11-
"forceConsistentCasingInFileNames": true,
12-
"noImplicitReturns": true,
13-
"noImplicitThis": true,
14-
"noImplicitAny": true,
15-
"strictNullChecks": true,
16-
"suppressImplicitAnyIndexErrors": true,
17-
"noUnusedLocals": true,
18-
"noUnusedParameters": true,
19-
"esModuleInterop": true
9+
"declaration": false,
2010
},
2111
"include": ["src/**/*"],
2212
}

tsconfig.esm.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,7 @@
66
"moduleResolution": "node",
77
"sourceMap": true,
88
"allowJs": false,
9-
"declaration": true,
10-
"emitDeclarationOnly": false,
11-
"forceConsistentCasingInFileNames": true,
12-
"noImplicitReturns": true,
13-
"noImplicitThis": true,
14-
"noImplicitAny": true,
15-
"strictNullChecks": true,
16-
"suppressImplicitAnyIndexErrors": true,
17-
"noUnusedLocals": true,
18-
"noUnusedParameters": true,
19-
"esModuleInterop": true
9+
"declaration": false,
2010
},
2111
"include": ["src/**/*"],
2212
}

tsconfig.types.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "dist/types",
4+
"module": "ES2015",
5+
"target": "ES2020",
6+
"moduleResolution": "node",
7+
"sourceMap": false,
8+
"declaration": true,
9+
"emitDeclarationOnly": true,
10+
},
11+
"include": ["src/**/*"],
12+
}

0 commit comments

Comments
 (0)