Skip to content

Commit

Permalink
feat(examples/bun): Add std-env to manage cache in CI environment
Browse files Browse the repository at this point in the history
This commit introduces the `std-env` package to the project. It is used
to check if the current environment is a Continuous Integration (CI)
environment. The cache option of the UnpluginTypia plugin is now
dynamically set based on the environment. This change helps to optimize
the caching behavior of the plugin in different environments.
  • Loading branch information
ryoppippi committed Jun 16, 2024
1 parent b2ce192 commit eed0056
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions examples/bun-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"devDependencies": {
"@types/bun": "latest",
"npm-run-all2": "^6.2.0",
"std-env": "^3.7.0",
"typia": "^6.1.0"
},
"peerDependencies": {
Expand Down
8 changes: 6 additions & 2 deletions examples/bun-build/preload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { plugin } from 'bun';
import UnpluginTypia from '@ryoppippi/unplugin-typia/bun'
import UnpluginTypia from '@ryoppippi/unplugin-typia/bun';
import { isCI } from "std-env";

plugin(UnpluginTypia({cache: true, log: 'verbose'}))
plugin(UnpluginTypia({
cache: isCI,
log: 'verbose'
}))

0 comments on commit eed0056

Please sign in to comment.