Skip to content

Commit

Permalink
build: run typescript from rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
dvirtz committed Dec 30, 2024
1 parent f7188a4 commit fb0f499
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prepare": "husky",
"dev": "rollup -wc",
"clean": "del-cli scripts",
"ci": "tsc && yarn knip",
"ci": "yarn knip",
"build:js": "rollup -c",
"build": "yarn ci && yarn clean && yarn build:js",
"semantic-release": "yarn workspaces foreach --all --topological-dev exec semantic-release",
Expand Down Expand Up @@ -59,6 +59,7 @@
"@gera2ld/plaid": "~2.7.0",
"@gera2ld/plaid-rollup": "~2.7.0",
"@rollup/plugin-eslint": "^9.0.5",
"@rollup/plugin-typescript": "^12.1.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^11.0.0",
"@semantic-release/git": "^10.0.1",
Expand Down
8 changes: 5 additions & 3 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {defineExternal, definePlugins} from '@gera2ld/plaid-rollup';
import eslint from '@rollup/plugin-eslint';
import typescript from '@rollup/plugin-typescript';
import path from 'path';
import {defineConfig} from 'rollup';
import userscript from 'rollup-plugin-userscript';
Expand All @@ -18,6 +19,10 @@ export default defineConfig(
include: 'src/**/*.{ts,tsx}',
},
plugins: [
eslint({
throwOnError: true,
}),
typescript(),
...definePlugins({
esm: true,
minimize: false,
Expand All @@ -31,9 +36,6 @@ export default defineConfig(
},
}),
userscript(meta => meta.replace('process.env.AUTHOR', `${pkg.author.name} (${pkg.author.email})`)),
eslint({
throwOnError: true,
}),
],
external: defineExternal(['@violentmonkey/ui', '@violentmonkey/dom', 'solid-js', 'solid-js/web']),
output: {
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"outDir": "scripts",
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
Expand Down
20 changes: 20 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2226,6 +2226,7 @@ __metadata:
"@gera2ld/plaid-rollup": "npm:~2.7.0"
"@kobalte/core": "npm:^0.13.7"
"@rollup/plugin-eslint": "npm:^9.0.5"
"@rollup/plugin-typescript": "npm:^12.1.2"
"@semantic-release/changelog": "npm:^6.0.3"
"@semantic-release/commit-analyzer": "npm:^11.0.0"
"@semantic-release/git": "npm:^10.0.1"
Expand Down Expand Up @@ -3174,6 +3175,25 @@ __metadata:
languageName: node
linkType: hard

"@rollup/plugin-typescript@npm:^12.1.2":
version: 12.1.2
resolution: "@rollup/plugin-typescript@npm:12.1.2"
dependencies:
"@rollup/pluginutils": "npm:^5.1.0"
resolve: "npm:^1.22.1"
peerDependencies:
rollup: ^2.14.0||^3.0.0||^4.0.0
tslib: "*"
typescript: ">=3.7.0"
peerDependenciesMeta:
rollup:
optional: true
tslib:
optional: true
checksum: 10c0/f447e23371bb1815030446ada3f57608bc6665f8aa2cd7343c4aa18021790fa3ba4783146ea576fb650d6ec68876182d0bc789a05b1a9163c09b16c17efdf868
languageName: node
linkType: hard

"@rollup/pluginutils@npm:^5.0.1, @rollup/pluginutils@npm:^5.1.0":
version: 5.1.0
resolution: "@rollup/pluginutils@npm:5.1.0"
Expand Down

0 comments on commit fb0f499

Please sign in to comment.