Skip to content

Commit

Permalink
using ts-standard instead for deps brevity (#32)
Browse files Browse the repository at this point in the history
* using ts-standard for better deps brevity
* updated readme
* fixed husky setup
* removed tsconfig.eslint.json, not required anymore
  • Loading branch information
fuxingloh authored Mar 2, 2021
1 parent b01d1a0 commit f194a39
Show file tree
Hide file tree
Showing 19 changed files with 1,741 additions and 1,408 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

68 changes: 0 additions & 68 deletions .eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/ci-size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: build
skip_step: install


# TODO(fuxingloh): npm i -g @size-limit/file @size-limit/time size-limit
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request:
branches: [ main ]

# TODO(fuxingloh): npm install -g codecov

jobs:
build:
name: Build
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc.js

This file was deleted.

4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DeFiChain Jellyfish Contributing Guide

## All features must be united tested with accepted coverage. (Target 100%)
## All features must be unit tested with accepted coverage. (Target 100%)

Each package or functionality must be accompanied by full coverage testing.

Expand Down Expand Up @@ -32,8 +32,6 @@ TypeScript must be used for all code written in this project.
### Document and maintain browser compatibility.

### Do not use the filename `index.ts`

### Minimize dependencies (target zero)

### Do not depend on external code. (never if possible)
Expand Down
67 changes: 49 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,84 @@
# @defichain/jellyfish

[![codecov](https://codecov.io/gh/DeFiCh/jellyfish/branch/main/graph/badge.svg?token=IYL9K0WROA)](https://codecov.io/gh/DeFiCh/jellyfish)
[![MIT License](https://img.shields.io/github/license/DeFiCh/jellyfish)](https://github.com/DeFiCh/jellyfish/releases)
[![TS-Standard](https://badgen.net/badge/code%20style/ts-standard/blue?icon=typescript)](https://github.com/standard/ts-standard)
[![npm](https://img.shields.io/npm/v/@defichain/jellyfish)](https://www.npmjs.com/package/@defichain/jellyfish)

A collection of TypeScript/JavaScript tools and libraries for DeFiChain to build decentralized finance on Bitcoin.
# @defichain/jellyfish

A collection of TypeScript + JavaScript tools and libraries for DeFiChain to build decentralized finance on Bitcoin.

> 🚧 Work in progress.
## Usage

> 🚧 Work in progress. This project uses Yarn 2 for it's monorepo setup.
For the majority of the time, you just need `@defichain/jellyfish`.

## Installation
### Installation

```shell
npm install @defichain/jellyfish
npm i @defichain/jellyfish
```

## Connecting to a node
### Setting a client

```js
import {Jellyfish} from '@defichain/jellyfish'
// TODO(fuxingloh):
```

<details>

<summary>All available dependencies</summary>

const jellyfish = Jellyfish('0.0.0.0', 'rpc', {
wallet: true, // defaults to false
})
```shell
npm i @defichain/jellyfish
npm i @defichain/jellyfish-core
npm i @defichain/jellyfish-jsonrpc
npm i -D @defichain/testcontainers
```

</details>

## Features

- [ ] TODO(fuxingloh)
```js
// TODO(fuxingloh):
```

## Documentation & Community

- [ ] TODO(fuxingloh)
```js
// TODO(fuxingloh):
```

## Motivation & Philosophy

- [ ] TODO(fuxingloh)
```js
// TODO(fuxingloh):
```

## Developing & Contributing

Thanks for contributing! You can read our [contributing guidelines here](CONTRIBUTING.md).
Thanks for contributing, here is our [contributing guidelines](CONTRIBUTING.md).

We use `npm 7` for this project, it's required to set
up [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces).

```shell
npm install
```

### Testing

`jest.config.js` is set up at the root project level as well as at each sub module. You can run jest at root to test all
modules or individually at each sub module. If you use IntelliJ IDEA, you can right click any file to test it
individually and have it reported to the IDE.

Docker is required to run the tests as [`@defichain/testcontainers`](./packages/testcontainers) will automatically spin
up `regtest` instances for testing.

Coverage is collected at merge with `codecov`; more testing 🚀 less 🐛 = 😎

```shell
npm run test
jest
```

### IntelliJ IDEA
Expand All @@ -62,6 +93,6 @@ If you discover a security vulnerability in

## License & Disclaimer

By using `@defichain/jellyfish`, you (the user) agree to be bound by [the terms of this license](LICENSE).
By using `@defichain/jellyfish` (this repo), you (the user) agree to be bound by [the terms of this license](LICENSE).

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FDeFiCh%2Fjellyfish.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FDeFiCh%2Fjellyfish?ref=badge_large)
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module.exports = {
projects: [
'<rootDir>/packages/*'
]
};
}
Loading

0 comments on commit f194a39

Please sign in to comment.