-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into feat/gitworkflows
- Loading branch information
Showing
7 changed files
with
1,061 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
nodeLinker: node-modules | ||
|
||
compressionLevel: mixed | ||
|
||
enableGlobalCache: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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}\"" | ||
|
@@ -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]" | ||
} |
Oops, something went wrong.