Convert to monorepository using lerna/workspaces

This commit is contained in:
Simon Warta 2020-01-29 12:00:24 +01:00
parent 4d373c62db
commit 0fe2cbba52
52 changed files with 89 additions and 22 deletions

5
lerna.json Normal file
View File

@ -0,0 +1,5 @@
{
"version": "0.0.0",
"useWorkspaces": true,
"npmClient": "yarn"
}

View File

@ -1,7 +1,7 @@
{
"name": "cosm-js",
"version": "2.0.0-alpha.7",
"name": "cosm-js-monorepo-root",
"description": "Transaction codec and client to communicate with any wasmd blockchain",
"private": true,
"author": "Ethan Frey <ethanfrey@users.noreply.github.com>",
"license": "Apache-2.0",
"main": "build/index.js",
@ -20,22 +20,17 @@
"publishConfig": {
"access": "public"
},
"workspaces": [
"packages/*"
],
"scripts": {
"docs": "shx rm -rf docs && typedoc --options typedoc.js",
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\" && tslint -t verbose --project .",
"autolint": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
"move-types": "shx rm -rf ./types/* && shx mv build/types/* ./types && rm -rf ./types/testdata && shx rm -f ./types/*.spec.d.ts",
"format-types": "prettier --write --loglevel warn \"./types/**/*.d.ts\"",
"build": "shx rm -rf ./build && tsc && yarn move-types && yarn format-types",
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
"test-node": "node jasmine-testrunner.js",
"test-edge": "yarn pack-web && karma start --single-run --browsers Edge",
"test-firefox": "yarn pack-web && karma start --single-run --browsers Firefox",
"test-chrome": "yarn pack-web && karma start --single-run --browsers ChromeHeadlessInsecure",
"test-safari": "yarn pack-web && karma start --single-run --browsers Safari",
"test": "yarn build-or-skip && yarn test-node",
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js"
"format": "lerna run format",
"format-text": "prettier --write --prose-wrap always --print-width 80 \"./*.md\" \"./docs/**/*.md\" \"./scripts/**/*.{json,md}\" && lerna run format-text",
"lint": "lerna run lint",
"lint-fix": "lerna run lint-fix",
"test": "lerna run test",
"build": "lerna run build",
"docs": "lerna run docs"
},
"dependencies": {
"@iov/bcp": "^2.0.0-alpha.7",
@ -49,7 +44,6 @@
"xstream": "^11.11.0"
},
"devDependencies": {
"@iov/keycontrol": "^2.0.0-alpha.7",
"@types/jasmine": "^3.3.7",
"@types/memdown": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^2.10.0",

1
packages/bcp/.eslintignore Symbolic link
View File

@ -0,0 +1 @@
../../.eslintignore

54
packages/bcp/package.json Normal file
View File

@ -0,0 +1,54 @@
{
"name": "@cosmwasm/bcp",
"version": "2.0.0-alpha.7",
"description": "Transaction codec and client to communicate with any wasmd blockchain",
"author": "Ethan Frey <ethanfrey@users.noreply.github.com>",
"license": "Apache-2.0",
"main": "build/index.js",
"types": "types/index.d.ts",
"files": [
"build/",
"types/",
"*.md",
"!*.spec.*",
"!**/testdata/"
],
"repository": {
"type": "git",
"url": "https://github.com/confio/cosm-js/tree/master/packages/bcp"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"docs": "shx rm -rf docs && typedoc --options typedoc.js",
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\" && tslint -t verbose --project .",
"lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix",
"move-types": "shx rm -rf ./types/* && shx mv build/types/* ./types && rm -rf ./types/testdata && shx rm -f ./types/*.spec.d.ts",
"format-types": "prettier --write --loglevel warn \"./types/**/*.d.ts\"",
"build": "shx rm -rf ./build && tsc && yarn move-types && yarn format-types",
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
"test-node": "node jasmine-testrunner.js",
"test-edge": "yarn pack-web && karma start --single-run --browsers Edge",
"test-firefox": "yarn pack-web && karma start --single-run --browsers Firefox",
"test-chrome": "yarn pack-web && karma start --single-run --browsers ChromeHeadlessInsecure",
"test-safari": "yarn pack-web && karma start --single-run --browsers Safari",
"test": "yarn build-or-skip && yarn test-node",
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js"
},
"dependencies": {
"@iov/bcp": "^2.0.0-alpha.7",
"@iov/crypto": "^2.0.0-alpha.7",
"@iov/encoding": "^2.0.0-alpha.7",
"@iov/stream": "^2.0.0-alpha.7",
"@tendermint/amino-js": "^0.7.0-alpha.1",
"axios": "^0.19.0",
"fast-deep-equal": "^3.1.1",
"readonly-date": "^1.0.0",
"xstream": "^11.11.0"
},
"devDependencies": {
"@iov/keycontrol": "^2.0.0-alpha.7"
}
}

View File

@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"outDir": "build",
"declarationDir": "build/types",
"rootDir": "src"
},
"include": [
"src/**/*"
]
}

3
packages/bcp/tslint.json Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "../../tslint.json"
}

View File

@ -17,7 +17,6 @@
"pretty": true,
"removeComments": false,
"resolveJsonModule": true,
"rootDir": "src",
"sourceMap": true,
"strict": true,
"target": "es6",
@ -26,6 +25,5 @@
"./custom_types",
"./node_modules/@types"
]
},
"include": ["src/**/*"]
}
}
}