Skip to content

Commit

Permalink
feat(env): Initial check-in for the @storm-stack/env package
Browse files Browse the repository at this point in the history
  • Loading branch information
sullivanpj committed Dec 20, 2024
1 parent 46e904c commit 5a367cd
Show file tree
Hide file tree
Showing 11 changed files with 502 additions and 1 deletion.
63 changes: 63 additions & 0 deletions packages/env/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!-- START header -->
<!-- END header -->

# Storm Stack - Environment

A package used by Storm Software to manage environment variables,
configurations, and secrets

<!-- START doctoc -->
<!-- END doctoc -->

## Installing

Using [pnpm](http://pnpm.io):

```bash
pnpm add -D @storm-stack/env
```

<details>
<summary>Using npm</summary>

```bash
npm install -D @storm-stack/env
```

</details>

<details>
<summary>Using yarn</summary>

```bash
yarn add -D @storm-stack/env
```

</details>

## Reduced Package Size

This project uses [tsup](https://tsup.egoist.dev/) to package the source code
due to its ability to remove unused code and ship smaller javascript files
thanks to code splitting. This helps to greatly reduce the size of the package
and to make it easier to use in other projects.

## Development

This project is built using [Nx](https://nx.dev). As a result, many of the usual
commands are available to assist in development.

### Building

Run `nx build env` to build the library.

### Running unit tests

Run `nx test env` to execute the unit tests via [Jest](https://jestjs.io).

### Linting

Run `nx lint env` to run [ESLint](https://eslint.org/) on the package.

<!-- START footer -->
<!-- END footer -->
3 changes: 3 additions & 0 deletions packages/env/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { getJestConfig } from '@storm-software/testing-tools';

export default getJestConfig('packages/env', true, 'env');
20 changes: 20 additions & 0 deletions packages/env/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@storm-stack/env",
"version": "0.0.1",
"type": "module",
"description": "A package used by Storm Software to manage environment variables, configurations, and secrets",
"repository": {
"type": "github",
"url": "https://github.com/storm-software/storm-stack.git",
"directory": "packages/env"
},
"private": false,
"dependencies": {
"@storm-software/config": "latest",
"@storm-software/config-tools": "latest",
"typia": "^7.5.0"
},
"publishConfig": {
"access": "public"
}
}
43 changes: 43 additions & 0 deletions packages/env/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "env",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "packages/env/src",
"targets": {
"build": {
"executor": "@storm-software/workspace-tools:unbuild",
"outputs": ["{options.outputPath}"],
"options": {
"entry": "packages/env/src/index.ts",
"outputPath": "dist/packages/env",
"tsConfig": "packages/env/tsconfig.json",
"project": "packages/env/package.json",
"defaultConfiguration": "production",
"platform": "neutral",
"assets": [
{
"input": "packages/env",
"glob": "*.md",
"output": "/"
},
{
"input": "",
"glob": "LICENSE",
"output": "/"
}
]
},
"configurations": {
"production": {
"debug": false,
"verbose": false
},
"development": {
"debug": true,
"verbose": true
}
}
}
},
"tags": ["platform:neutral"]
}
28 changes: 28 additions & 0 deletions packages/env/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*-------------------------------------------------------------------
⚡ Storm Software - Storm Stack
This code was released as part of the Storm Stack project. Storm Stack
is maintained by Storm Software under the Apache-2.0 License, and is
free for commercial and private use. For more information, please visit
our licensing page.
Website: https://stormsoftware.com
Repository: https://github.com/storm-software/storm-stack
Documentation: https://stormsoftware.com/projects/storm-stack/docs
Contact: https://stormsoftware.com/contact
License: https://stormsoftware.com/projects/storm-stack/license
-------------------------------------------------------------------*/

/**
* The env library used by Storm Software for building TypeScript applications.
*
* @remarks
* A package used by Storm Software to manage environment variables, configurations, and secrets
*
* @packageDocumentation
*/

export * from "./types";
export * from "./utilities";
Loading

0 comments on commit 5a367cd

Please sign in to comment.