@ilionx/hn-environment
v1.0.8
Published
A package used to share env variables between frontend applciations
Keywords
Readme
Hn-environemnt
how to use
- install the package
npm install @ilionx/hn-environment - add the env switcher script to your npm package.json script section:
"env:use": "node ./node_modules/@ilionx/hn-environment/dist/switch-env.mjs" - run
npm run env:useand select a environment, this adds a env.json file to the root of your repo - import
import { loadEnvConfig, type EnvConfig } from "@ilionx/hn-environment";in your application code and callconst cfg = await loadEnvConfig();to retrieve your typed env config.
how to publish:
- sign in into npm
- bump the version of the package.
npm version patch - run
npm run build - run
npm publish -access publicto publish the package
