Skip to content

Commit

Permalink
chore(repo): ditch tsup, use tsc, ship uncompiled packages
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Sep 19, 2023
1 parent a00bef8 commit 7dabba3
Show file tree
Hide file tree
Showing 28 changed files with 129 additions and 310 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
moon run jsx-email:build.packages
- name: Release
run: moon run :release --affected --concurrency 1
run: moon run :release --affected --concurrency 1 --remote
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ dist
.pnpm-debug.log*
.env

deprecated/tsconfig.json
packages/tsconfig.json
packages/**/tsconfig.json
2 changes: 1 addition & 1 deletion .moon/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tasks:
runDepsInParallel: false

compile:
command: tsup src/index.ts --format esm,cjs --dts --external reactm --sourcemap
command: rm -rf dist && tsc --project tsconfig.json && tsc --project tsconfig.json --outDir dist/es --module esnext --target esnext
inputs:
- src
deps:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"prettier": "3.0.0",
"ts-jest": "28.0.8",
"ts-node": "10.9.1",
"tsup": "7.1.0",
"typescript": "5.1.6"
},
"lint-staged": {
Expand Down
14 changes: 4 additions & 10 deletions packages/body/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
},
"description": "A React body component to wrap emails",
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"files": [
Expand Down
14 changes: 4 additions & 10 deletions packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/button"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/column/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/column"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/components"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/container"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/font/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
},
"description": "A React Font component to set your fonts",
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"files": [
Expand Down
14 changes: 4 additions & 10 deletions packages/head/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/head"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/heading/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/heading"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/hr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/hr"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/html"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/img/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/img"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/link"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/markdown"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/preview"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
14 changes: 4 additions & 10 deletions packages/render/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@
"url": "https://github.com/shellscape/jsx-email.git",
"directory": "packages/render"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"engines": {
Expand Down
4 changes: 1 addition & 3 deletions packages/render/src/render-async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ export const renderAsync = async (

const document = `${doctype}${markup}`;

if (options?.pretty) {
return pretty(document);
}
if (options?.pretty) return pretty(document);

return document;
};
Loading

0 comments on commit 7dabba3

Please sign in to comment.