Skip to content

Commit

Permalink
chore: setup rollup for build
Browse files Browse the repository at this point in the history
  • Loading branch information
valpinkman committed Jan 25, 2024
1 parent b327cb2 commit 2165205
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 90 deletions.
2 changes: 1 addition & 1 deletion apps/sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"jest": "^29.7.0",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"rollup": "^4.9.6",
"turbo": "^1.11.2",
"typescript": "^5.3.3",
"zx": "^7.2.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/config/eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
},
},
{
files: ["**/scripts/*.mjs"],
files: ["**/*.mjs"],
env: {
es6: true,
node: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/config/typescript/sdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"experimentalDecorators": true,
"stripInternal": true,
"emitDecoratorMetadata": true,
"moduleResolution": "NodeNext",
"module": "NodeNext"
"moduleResolution": "bundler",
"module": "esnext"
},
"exclude": ["node_modules"]
}
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"./lib"
],
"scripts": {
"build": "rm -rf lib && tsc && tsc-alias",
"dev": "tsc && (concurrently \"tsc -w\" \"tsc-alias -w\")",
"build": "rm -rf lib && rollup -c",
"dev": "rollup -c -w",
"lint": "eslint --cache --ext .ts \"src\"",
"lint:fix": "eslint --cache --fix --ext .ts \"src\"",
"test": "jest src",
Expand All @@ -28,8 +28,8 @@
"@ledgerhq/eslint-config-dsdk": "workspace:*",
"@ledgerhq/jest-config-dsdk": "workspace:*",
"@ledgerhq/tsconfig-dsdk": "workspace:*",
"concurrently": "^8.2.2",
"@rollup/plugin-typescript": "^11.1.6",
"ts-node": "^10.9.2",
"tsc-alias": "^1.8.8"
"tslib": "^2.6.2"
}
}
11 changes: 11 additions & 0 deletions packages/core/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import typescript from "@rollup/plugin-typescript";

export default {
input: "src/index.ts",
output: {
dir: "lib",
format: "esm",
sourcemap: true,
},
plugins: [typescript({ tsconfig: "./tsconfig.json" })],
};
Loading

0 comments on commit 2165205

Please sign in to comment.