mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-01-12 16:53:19 +08:00
fix: postinstall script to build client lib if needed, add readme
This commit is contained in:
9
client/README.md
Normal file
9
client/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# @stacks/blockchain-api-client
|
||||
[](https://www.npmjs.org/package/@stacks/blockchain-api-client)
|
||||
[](https://github.com/blockstack/stacks-blockchain-api/actions)
|
||||
|
||||
Client for the Stacks Blockchain API.
|
||||
|
||||
### Known Issues
|
||||
|
||||
* The TypeScript definitions for several objects involving type unions, including transactions, are incorrectly specified as only `object`.
|
||||
@@ -2,11 +2,22 @@
|
||||
"name": "@stacks/blockchain-api-client",
|
||||
"version": "0.1.0",
|
||||
"access": "public",
|
||||
"description": "TypeScript client for the Stacks Blockchain API",
|
||||
"description": "Client for the Stacks Blockchain API",
|
||||
"homepage": "https://github.com/blockstack/stacks-blockchain-api/tree/master/client#readme",
|
||||
"author": "Blockstack PBC <engineering@blockstack.com> (https://blockstack.org)",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/blockstack/stacks-blockchain-api.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/blockstack/stacks-blockchain-api/issues"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"unpkg": "lib/index.umd.js",
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build",
|
||||
"postinstall": "npx shx find lib/index.js || npm run build",
|
||||
"build": "rimraf ./lib && npm run generate-openapi && npm run build:node && npm run build:browser",
|
||||
"build:node": "tsc",
|
||||
"build:browser": "microbundle -i src/index.ts -o lib/index.umd.js --no-pkg-main -f umd --external none --globals none --tsconfig tsconfig.browser.json --name StacksBlockchainApiClient",
|
||||
@@ -15,8 +26,6 @@
|
||||
"prep-openapi": "rimraf ./.tmp && swagger-cli bundle --dereference -o ./.tmp/openapi.json ../docs/openapi.yaml && shx sed -i '^.*\\$schema.*$' '' ./.tmp/openapi.json",
|
||||
"generate-openapi": "npm run prep-openapi && openapi-generator generate --skip-validate-spec -g typescript-fetch --additional-properties=typescriptThreePlus=true,supportsES6=true,legacyDiscriminatorBehavior=false,enumPropertyNaming=original,modelPropertyNaming=original -i ./.tmp/openapi.json -o ./src/generated"
|
||||
},
|
||||
"author": "@blockstack",
|
||||
"license": "ISC",
|
||||
"prettier": "@blockstack/prettier-config",
|
||||
"files": [
|
||||
"./src",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2019",
|
||||
"target": "es2017",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
|
||||
Reference in New Issue
Block a user