Skip to content

Commit

Permalink
Use Civet 0.9.2 to build faster
Browse files Browse the repository at this point in the history
  • Loading branch information
edemaine committed Dec 18, 2024
1 parent c9c04ff commit f9555e6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 30 deletions.
4 changes: 1 addition & 3 deletions build/esbuild.civet
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
try { require('node:module').enableCompileCache() } catch {}
esbuild := require "esbuild"
heraPlugin := require "@danielx/hera/esbuild-plugin"
// Need to use the packaged version because we may not have built our own yet
civetOldPlugin := require "../node_modules/@danielx/civet/dist/esbuild-plugin.js"
civetUnplugin := require("../node_modules/@danielx/civet/dist/unplugin/esbuild.js").default
civetPlugin := civetUnplugin
ts: "civet"
Expand Down Expand Up @@ -173,7 +171,7 @@ build({
plugins: [
resolveExtensions
heraPlugin module: true
civetOldPlugin() // currently necessary for `alias` to work
civetPlugin
]
}).catch -> process.exit 1

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"unplugin": "^2.1.0"
},
"devDependencies": {
"@danielx/civet": "0.9.0",
"@danielx/civet": "0.9.2",
"@danielx/hera": "^0.8.16",
"@prettier/sync": "^0.5.2",
"@types/assert": "^1.5.6",
Expand Down
1 change: 1 addition & 0 deletions source/unplugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ interface PluginOptions {
- `cache`: Cache compilation results based on file's mtime.
Useful when bundling the same source files for both CommonJS and ESM,
or for longer running processes like `watch` or `serve`. Default: `true`.
Be sure to re-use plugins instead of calling the plugin generator repeatedly.
- `threads`: Use specified number of Node worker threads to
compile Civet files faster. Default: `0` (don't use threads), or `CIVET_THREADS` environment variable if set.
- `config`: Civet config filename to load, or `null` to avoid looking for the
Expand Down
32 changes: 6 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"

"@danielx/civet@0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@danielx/civet/-/civet-0.9.0.tgz#ab78108c83ecd8fdfc804048fb9ce7341303e2d5"
integrity sha512-DjeJ2gAXPK2g2JlVPAspQkp1AWftofl6WgxDb10rYVJN3BTf7E4es4rHxP56lEengZMwAtxUFEbadjQIZhiiSg==
"@danielx/civet@0.9.2":
version "0.9.2"
resolved "https://registry.yarnpkg.com/@danielx/civet/-/civet-0.9.2.tgz#05be7f8e1b77acdea86d91819669076b0447a020"
integrity sha512-8cooX7VfctmLuf6GVMtZ/wW+yro8NXRR0AaJobXNA4w+AnUMx1LwlZ7ObQauTACxczS2xZvCNZo3Jc5fncXAWg==
dependencies:
"@cspotcode/source-map-support" "^0.8.1"
"@typescript/vfs" "^1.6.0"
unplugin "^1.12.2"
unplugin "^2.1.0"

"@danielx/hera@^0.8.16":
version "0.8.16"
Expand Down Expand Up @@ -669,11 +669,6 @@ acorn@^8.11.0, acorn@^8.14.0, acorn@^8.4.1:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0"
integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==

acorn@^8.12.1:
version "8.12.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248"
integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==

acorn@^8.8.2:
version "8.10.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5"
Expand Down Expand Up @@ -812,7 +807,7 @@ chalk@^4.1.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

chokidar@^3.5.3, chokidar@^3.6.0:
chokidar@^3.5.3:
version "3.6.0"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
Expand Down Expand Up @@ -1558,16 +1553,6 @@ undici-types@~6.20.0:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==

unplugin@^1.12.2:
version "1.12.2"
resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-1.12.2.tgz#cc85aef010614394898caccf5f17002af8a4cd6f"
integrity sha512-bEqQxeC7rxtxPZ3M5V4Djcc4lQqKPgGe3mAWZvxcSmX5jhGxll19NliaRzQSQPrk4xJZSGniK3puLWpRuZN7VQ==
dependencies:
acorn "^8.12.1"
chokidar "^3.6.0"
webpack-sources "^3.2.3"
webpack-virtual-modules "^0.6.2"

unplugin@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-2.1.0.tgz#c093c34bf52812131125b67d0724bd57685c830a"
Expand Down Expand Up @@ -1674,11 +1659,6 @@ vue@^3.2.45, vue@^3.3.4:
"@vue/server-renderer" "3.3.4"
"@vue/shared" "3.3.4"

webpack-sources@^3.2.3:
version "3.2.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==

webpack-virtual-modules@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz#057faa9065c8acf48f24cb57ac0e77739ab9a7e8"
Expand Down

0 comments on commit f9555e6

Please sign in to comment.