Skip to content

Commit

Permalink
🔧 Add Rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
NatoBoram committed May 24, 2024
1 parent 2179cc7 commit 16adaaf
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 20 deletions.
84 changes: 72 additions & 12 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"name": "jira.js",
"version": "4.0.0",
"description": "A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.",
"main": "out/index.js",
"main": "out/index.cjs",
"types": "out/index.d.ts",
"module": "out/index.mjs",
"repository": "https://github.com/MrRefactoring/jira.js.git",
"author": "Vladislav Tupikin <[email protected]>",
"license": "MIT",
Expand All @@ -19,7 +20,7 @@
"library"
],
"scripts": {
"build": "tsc",
"build": "rollup --config rollup.config.ts --configPlugin typescript",
"prettier": "prettier --write src",
"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",
"lint:tests": "npm run lint:base -- tests",
Expand Down Expand Up @@ -53,6 +54,7 @@
"code:formatting": "npm run replace:all && npm run prettier && npm run lint:fix"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.6",
"@swc-node/register": "^1.9.1",
"@swc/helpers": "^0.5.11",
"@types/node": "^18.19.33",
Expand All @@ -66,6 +68,7 @@
"eslint-plugin-import": "^2.29.1",
"prettier": "^3.2.5",
"prettier-plugin-jsdoc": "^1.3.0",
"rollup": "^4.18.0",
"sinon": "^18.0.0",
"ts-node": "^10.9.2",
"typedoc": "^0.25.13",
Expand Down
24 changes: 24 additions & 0 deletions rollup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* eslint-disable import/no-extraneous-dependencies */
import typescript from '@rollup/plugin-typescript';
import { defineConfig } from 'rollup';

const config = defineConfig([
{
input: 'src/index.ts',
output: [
{
file: './out/index.cjs',
format: 'cjs',
sourcemap: true,
},
{
file: './out/index.mjs',
format: 'es',
sourcemap: true,
},
],
plugins: [typescript()],
},
]);

export default config;
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"moduleResolution": "NodeNext",
"lib": ["ES2018", "DOM"],
"declaration": true,
"declarationMap": true,
"importHelpers": true,
"strict": true,
"sourceMap": true,
"verbatimModuleSyntax": true,
"forceConsistentCasingInFileNames": true
},
Expand Down
6 changes: 1 addition & 5 deletions tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"extends": "./tsconfig.json",
"include": [
"examples",
"src",
"tests"
]
"include": ["examples", "src", "tests", "rollup.config.ts"]
}

0 comments on commit 16adaaf

Please sign in to comment.