Skip to content

Commit 7abf1a8

Browse files
committed
🔧 Add Rollup
1 parent 506a533 commit 7abf1a8

File tree

5 files changed

+39
-27
lines changed

5 files changed

+39
-27
lines changed

‎package.json

+13-9
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
"name": "jira.js",
33
"version": "4.0.2",
44
"description": "A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.",
5-
"main": "out/index.js",
5+
"main": "out/index.cjs",
66
"types": "out/index.d.ts",
7+
"module": "out/index.mjs",
78
"repository": "https://github.com/MrRefactoring/jira.js.git",
89
"author": "Vladislav Tupikin <[email protected]>",
910
"license": "MIT",
@@ -19,7 +20,7 @@
1920
"library"
2021
],
2122
"scripts": {
22-
"build": "tsc",
23+
"build": "rollup --config rollup.config.ts --configPlugin typescript",
2324
"prettier": "prettier --write src",
2425
"lint": "npm run lint:tests && npm run lint:examples && npm run lint:src:agile && npm run lint:src:clients && npm run lint:src:services && npm run lint:src:version2 && npm run lint:src:version3 && npm run lint:src:files",
2526
"lint:tests": "npm run lint:base -- tests",
@@ -53,7 +54,10 @@
5354
"code:formatting": "npm run replace:all && npm run prettier && npm run lint:fix"
5455
},
5556
"devDependencies": {
56-
"@types/node": "^18.19.50",
57+
"@rollup/plugin-typescript": "^11.1.6",
58+
"@swc-node/register": "^1.9.1",
59+
"@swc/helpers": "^0.5.11",
60+
"@types/node": "^18.19.33",
5761
"@types/sinon": "^17.0.3",
5862
"@typescript-eslint/eslint-plugin": "^8.6.0",
5963
"@typescript-eslint/parser": "^8.6.0",
@@ -65,12 +69,12 @@
6569
"eslint-plugin-import": "^2.30.0",
6670
"prettier": "^3.3.3",
6771
"prettier-plugin-jsdoc": "^1.3.0",
68-
"sinon": "^18.0.1",
69-
"typedoc": "^0.26.7",
70-
"typedoc-plugin-extras": "^3.1.0",
71-
"typescript": "^5.6.2",
72-
"vite-tsconfig-paths": "^5.0.1",
73-
"vitest": "^2.1.1"
72+
"rollup": "^4.18.0",
73+
"sinon": "^18.0.0",
74+
"typedoc": "^0.25.13",
75+
"typedoc-plugin-extras": "^3.0.0",
76+
"typescript": "^5.4.5",
77+
"vitest": "^1.6.0"
7478
},
7579
"dependencies": {
7680
"axios": "^1.7.7",

‎rollup.config.ts

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
2+
import typescript from '@rollup/plugin-typescript';
3+
import { defineConfig } from 'rollup';
4+
5+
const config = defineConfig([
6+
{
7+
input: 'src/index.ts',
8+
output: [
9+
{
10+
file: './out/index.cjs',
11+
format: 'cjs',
12+
sourcemap: true,
13+
},
14+
{
15+
file: './out/index.mjs',
16+
format: 'es',
17+
sourcemap: true,
18+
},
19+
],
20+
plugins: [typescript()],
21+
},
22+
]);
23+
24+
export default config;

‎tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"lib": ["ES2018", "DOM"],
88
"baseUrl": ".",
99
"declaration": true,
10+
"declarationMap": true,
1011
"importHelpers": true,
1112
"strict": true,
12-
"sourceMap": true,
1313
"verbatimModuleSyntax": true,
1414
"forceConsistentCasingInFileNames": true
1515
},

‎tsconfig.lint.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
22
"extends": "./tsconfig.json",
3-
"include": [
4-
"examples",
5-
"src",
6-
"tests",
7-
"vitest.config.mts"
8-
]
3+
"include": ["examples", "src", "tests", "vitest.config.mts"]
94
}

‎vitest.config.ts

-11
This file was deleted.

0 commit comments

Comments
 (0)