Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feat/gitworkflows
Browse files Browse the repository at this point in the history
  • Loading branch information
0xkenj1 committed May 23, 2024
2 parents 0b98dd2 + 4ac04e4 commit faa295f
Show file tree
Hide file tree
Showing 7 changed files with 1,061 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
nodeLinker: node-modules

compressionLevel: mixed

enableGlobalCache: false
Expand Down
58 changes: 52 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,63 @@
# Hyperhub

Developed with [Turborepo](https://turbo.build/)
## Description

### Apps and Packages
The Hyperhub project for zkSync involves the creation of a comprehensive data management system. This project is designed to provide key insights into the zkSync network, making it an invaluable tool for users and developers.

## Packages

- `@hyperhub/typescript-config`: `tsconfig.json`s used throughout the monorepo
- `@hyperhub/serverless`: Includes all serverless functions from the repository.

## Dev Environment

Installing and building packages can be done through the following command:

```
yarn && yarn build
```

Here `yarn`: Install deps, create symlinks, hoist packages.
And `yarn build` Build all packages.

Address changes for each package can be done the following way:

```
yarn workspace @hyperhub/serverless dev
```

## Running tests

To test for the complete repository run:

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
```
yarn build && yarn test
```

For testing individual packages:

```
yarn workspace @huperhub/serverless build
yarn workspace @hyperhub/serverless test
```

## Creating a new package

### Build
<!-- //TODO: add a boilerplate tool -->

Creating a new package can be replicated from already existing packages structure.

## Installing dependencies

For global dependencies:

```
yarn add ethers
```

To build all apps and packages, run the following command:
Adding new dependencies should be done from root level, and not from each package.
For example:

```
yarn build
yarn workspace @hyperhub/serverless add ethers
```
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"prepare": "husky",
"test": "turbo run test",
"test:watch": "turbo run test:watch",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
Expand All @@ -14,10 +15,18 @@
"tooling/*"
],
"devDependencies": {
"@commitlint/config-conventional": "19.2.2",
"@hyperhub/test-config": "workspace:*",
"@hyperhub/typescript-config": "workspace:*",
"commitlint": "19.3.0",
"husky": "9.0.11",
"lint-staged": "15.2.4",
"prettier": "3.2.5",
"turbo": "latest"
"turbo": "1.13.3"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": "eslint --cache --fix",
"**/*.{md,json,yml,yaml}": "prettier --write"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit faa295f

Please sign in to comment.