Skip to content

Commit

Permalink
Update README and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianhopebailie committed Jul 5, 2019
1 parent f377b81 commit 4273042
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 17 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.vscode
node_modules
coverage
.nyc_output
Expand Down
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"eslint.packageManager": "yarn",
"eslint.provideLintTask": true,
"eslint.run": "onSave"
}
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ For [a while](https://forum.interledger.org/t/interledgerjs-monorepo/318) the co

## Design Decisions

- Keep it simple. Minimal custom stuff
- Use the @interledger scope and new package names to allow for some refactoring to do away with legacy hacks
- Switch to synchronized versioning
- Use lerna and yarn workspaces.
- Keep it simple. Minimal custom stuff.
- DRY. Where possible avoid repetition in packages
- Use the @interledger scope instead of `ilp` prefix in package names.
- Use package categories `utils`, `codecs`, `protocols` (others may be added) instead of naming convention.
- New package names allow for some refactoring to do away with legacy hacks to accommodate JS module funnies.
- Switch to synchronized versioning.
- Switch to eslint from tslint (See: https://eslint.org/blog/2019/01/future-typescript-eslint).

## Process

Expand All @@ -26,8 +31,8 @@ For [a while](https://forum.interledger.org/t/interledgerjs-monorepo/318) the co

## Importing

This process preserves the commit history of the legacy modules.
(This assume the module being imported should go into `protocols`, as opposed to a `codecs` or `utils`)
This process preserves the commit history of the legacy modules.
_(This assumes the module being imported should go into `protocols`, as opposed to a `codecs` or `utils`)_

```sh
git clone git@github.com:adrianhopebailie/interledgerjs.git
Expand All @@ -37,4 +42,22 @@ git pull
cd ../interledgerjs
lerna import ../legacy-module --dest=packages/protocols --preserve-commit --flatten
```


## Scripts

- postinstall : Ensure the repo is ready to go after install
- clean: Clean everything
- clean:artifacts: Recursively clean packages
- clean:packages: Run `lerna clean --yes`
- clean:root: Remove root `node_modules`
- build: Build each package in topological order
- test: Run tests in each package
- test:quick: Run tests in each package (in parallel)
- cover: Run test coverage in all packages
- prepare:release: Run `lerna version`
- prepare:prerelease: Prepare a prerelease (alpha)
- publish:canary: Run `lerna publish --canary`
- publish:release: Run `lerna publish from-package`
- lint: Lint the provided files (requires a glob param)
- lint:all: Lint everything
- lint:staged: Run `lint-staged`
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@
"clean:packages": "lerna clean --yes",
"clean:root": "rimraf node_modules",
"build": "lerna run build --sort --concurrency=1 --stream",
"build:quick": "yarn build -- --scope=@interledger/*",
"test": "lerna run test --concurrency=1 --stream",
"test:quick": "lerna run test:quick --concurrency=1 --stream",
"test:coverage": "lerna run test:coverage --parallel",
"test:watch": "lerna run test:watch --parallel",
"test:quick": "lerna run test --parallel",
"cover": "lerna run cover --concurrency=1 --stream",
"prepare:release": "lerna version",
"prepare:prerelease": "yarn prepare:release prerelease --preid alpha",
"publish:canary": "lerna publish --canary",
Expand All @@ -50,7 +48,7 @@
},
"husky": {
"hooks": {
"pre-commit": "lerna run --concurrency 1 --stream precommit"
"pre-commit": "yarn lint:staged && lerna run precommit"
}
},
"eslintConfig": {
Expand Down Expand Up @@ -91,12 +89,9 @@
]
}
},
"prettier": {
"semi": false
},
"lint-staged": {
"*.ts*": [
"npm run lint --",
"yarn lint --fix",
"git add"
]
},
Expand Down Expand Up @@ -147,7 +142,6 @@
"mocha": "^6.1.4",
"mocha-typescript": "^1.1.17",
"nyc": "^14.1.1",
"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"sinon": "^7.3.2",
"source-map-support": "^0.5.12",
Expand Down
1 change: 1 addition & 0 deletions packages/codecs/ilp/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Writer } from '@interledger/codecs-oer'
import Long = require('long')
import BaseError = require('extensible-error')

// TEST
export const codes = {
F00_BAD_REQUEST: 'F00',
F01_INVALID_PACKET: 'F01',
Expand Down
File renamed without changes.

0 comments on commit 4273042

Please sign in to comment.