Skip to content

Commit

Permalink
feat(hashing): Initial check-in of hashing package
Browse files Browse the repository at this point in the history
  • Loading branch information
sullivanpj committed Jul 28, 2024
1 parent c45b539 commit b3adb91
Show file tree
Hide file tree
Showing 27 changed files with 1,078 additions and 421 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@
"@storm-stack/web-docs": "workspace:*",
"@storm-stack/server-cache": "workspace:*",
"@storm-stack/string-fns": "workspace:*",
"@storm-stack/types": "workspace:*"
"@storm-stack/types": "workspace:*",
"@storm-stack/hashing": "workspace:*"
}
},
"prettier": "@storm-software/prettier/config.json",
Expand Down
62 changes: 62 additions & 0 deletions packages/hashing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!-- START header -->
<!-- END header -->

# hashing

A package that includes hashing utility functions

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

## Installing

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

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

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

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

</details>

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

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

</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 hashing` to build the library.

### Running unit tests

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

### Linting

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

<!-- START footer -->
<!-- END footer -->
3 changes: 3 additions & 0 deletions packages/hashing/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/hashing", true, "hashing");
15 changes: 15 additions & 0 deletions packages/hashing/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "@storm-stack/hashing",
"version": "0.0.1",
"type": "module",
"description": "⚡ The storm-stack monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
"repository": {
"type": "github",
"url": "https://github.com/storm-software/storm-stack.git",
"directory": "packages/hashing"
},
"private": false,
"publishConfig": {
"access": "public"
}
}
52 changes: 52 additions & 0 deletions packages/hashing/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "hashing",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "packages/hashing/src",
"targets": {
"build": {
"executor": "@storm-software/workspace-tools:tsup-neutral",
"outputs": ["{options.outputPath}"],
"options": {
"entry": "packages/hashing/src/index.ts",
"outputPath": "dist/packages/hashing",
"tsConfig": "packages/hashing/tsconfig.json",
"project": "packages/hashing/package.json",
"defaultConfiguration": "production",
"assets": [
{
"input": "packages/hashing",
"glob": "*.md",
"output": "/"
},
{
"input": "",
"glob": "LICENSE",
"output": "/"
}
],
"platform": "neutral"
},
"configurations": {
"production": {
"debug": false,
"verbose": false
},
"development": {
"debug": true,
"verbose": true
}
}
},
"nx-release-publish": {
"cache": true,
"inputs": ["default", "^production"],
"dependsOn": ["^build"],
"executor": "@storm-software/workspace-tools:npm-publish",
"options": {
"packageRoot": "dist/{projectRoot}",
"registry": "https://registry.npmjs.org/"
}
}
}
}
Loading

0 comments on commit b3adb91

Please sign in to comment.