Skip to content

Commit

Permalink
fix(build): move to tsup and only output esm build
Browse files Browse the repository at this point in the history
it wasn't required to build cjs builds and just created a mess to handle both import types, and with tsup there is more customizability options
  • Loading branch information
V-ed committed Jul 12, 2022
1 parent ceec68c commit 250a39f
Show file tree
Hide file tree
Showing 4 changed files with 1,040 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"type": "node",
"request": "launch",
"name": "Debug Current Test File",
"autoAttachChildProcesses": true,
Expand Down
25 changes: 17 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
"name": "class-importer",
"version": "0.2.2",
"description": "node js class importer - import default classes of folder and subfolders based on class",
"main": "dist/index.js",
"module": "dist/index.mjs",
"type": "module",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"tsup": {
"entry": [
"src/index.ts"
],
"sourcemap": true,
"dts": true,
"clean": true,
"format": "esm"
},
"scripts": {
"build": "pkgroll",
"build": "tsup",
"lint": "npm-run-all lint:*",
"lint:src": "eslint \"src/**/*.ts\"",
"lint:tests": "eslint \"tests/**/*.ts\"",
Expand Down Expand Up @@ -50,13 +58,14 @@
"@v-ed/prettier-config": "0.1.1",
"@v-ed/tsconfig": "0.2.0",
"c8": "7.11.3",
"eslint": "8.18.0",
"eslint": "8.19.0",
"npm-run-all": "4.1.5",
"pkgroll": "1.3.1",
"prettier": "2.7.1",
"tsup": "6.1.3",
"typescript": "4.7.4",
"unbuild": "0.7.4",
"vite-tsconfig-paths": "3.5.0",
"vitest": "0.16.0"
"vitest": "0.18.0"
},
"dependencies": {
"recursive-readdir": "^2.2.2"
Expand Down

0 comments on commit 250a39f

Please sign in to comment.