Skip to content

Commit

Permalink
refactor: add example workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Sep 20, 2023
1 parent f44b3cc commit 31f3c1b
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 98 deletions.
3 changes: 2 additions & 1 deletion bench.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
hyperfine "dum example:rollup-node-resolve" "dum example:esbuild-optimize-deps" --warmup 2
cd example
hyperfine "dum rollup-node-resolve" "dum esbuild-optimize-deps" --warmup 2
17 changes: 17 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "example",
"version": "1.0.0",
"scripts": {
"rollup-node-resolve": "rollup --bundleConfigAsCjs -c rollup.config.js",
"esbuild-optimize-deps": "OPTIMIZE=true rollup --bundleConfigAsCjs -c rollup.config.js"
},
"dependencies": {
"lodash": "^4.17.21",
"react": "^18.2.0",
"three": "^0.145.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^15.0.0"
}
}
8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,18 @@
"repository": "https://github.com/egoist/rollup-plugin-esbuild",
"scripts": {
"test": "vitest",
"example:rollup-node-resolve": "rollup --bundleConfigAsCjs -c example/rollup.config.js",
"example:esbuild-optimize-deps": "OPTIMIZE=true rollup --bundleConfigAsCjs -c example/rollup.config.js",
"build": "rm -rf dist && tsup src/index.ts --format esm,cjs --dts-resolve",
"prepublishOnly": "npm run build"
},
"files": [
"dist"
],
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@types/debug": "^4.1.7",
"@types/node": "16.11.66",
"esbuild": "^0.15.11",
"istextorbinary": "^6.0.0",
"lodash": "^4.17.21",
"prettier": "^2.7.1",
"react": "^18.2.0",
"rollup": "^3.2.2",
"three": "^0.145.0",
"ts-essentials": "^9.3.0",
"tsup": "^6.3.0",
"typescript": "^4.8.4",
Expand Down
163 changes: 74 additions & 89 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- example

0 comments on commit 31f3c1b

Please sign in to comment.