Skip to content

Commit

Permalink
Merge pull request #29 from samchon/features/checker
Browse files Browse the repository at this point in the history
Export ESM module at the same time
  • Loading branch information
samchon authored Jul 9, 2024
2 parents 0cf6d4e + 3e0e347 commit 6aafb7f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "@samchon/openapi",
"version": "0.3.1",
"version": "0.3.2",
"description": "OpenAPI definitions and converters for 'typia' and 'nestia'.",
"main": "./lib/index.js",
"module": "./lib/index.mjs",
"typings": "./lib/index.d.ts",
"scripts": {
"prepare": "ts-patch install",
"build": "npm run build:main && npm run build:test",
"build:main": "rimraf lib && tsc",
"build:main": "rimraf lib && tsc && rollup -c",
"build:test": "rimraf bin && tsc -p test/tsconfig.json",
"dev": "npm run build:test -- --watch",
"test": "node bin/test"
Expand All @@ -30,14 +31,17 @@
"homepage": "https://github.com/samchon/openapi",
"devDependencies": {
"@nestia/e2e": "^0.6.0",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.12.7",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"rollup": "^4.18.1",
"ts-patch": "^3.2.1",
"typescript": "^5.5.2",
"typescript": "^5.5.3",
"typescript-transform-paths": "^3.4.7",
"typia": "^6.3.1"
"typia": "^6.0.0"
},
"files": [
"lib",
Expand Down
29 changes: 29 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const typescript = require("@rollup/plugin-typescript");
const terser = require("@rollup/plugin-terser");

module.exports = {
input: "./src/index.ts",
output: {
dir: "lib",
format: "esm",
entryFileNames: "[name].mjs",
sourcemap: true,
},
plugins: [
typescript({
tsconfig: "tsconfig.json",
module: "ES2020",
target: "ES2020",
}),
terser({
format: {
comments: "some",
beautify: true,
ecma: "2020",
},
compress: false,
mangle: false,
module: true,
}),
],
};

0 comments on commit 6aafb7f

Please sign in to comment.