cli: Add npm package (#438)

This commit is contained in:
Kirill Fomichev 2021-06-30 00:04:59 +03:00 committed by GitHub
parent b1dabe8c12
commit 7314c66c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 0 deletions

2
.gitignore vendored
View File

@ -13,3 +13,5 @@ examples/**/Cargo.lock
.DS_Store
docs/yarn.lock
ts/docs/
cli/npm-package/anchor
cli/npm-package/*.tgz

4
Makefile Normal file
View File

@ -0,0 +1,4 @@
.PHONY: build-cli
build-cli:
cargo build -p anchor-cli --release
cp target/release/anchor cli/npm-package/anchor

View File

@ -0,0 +1,29 @@
{
"name": "@project-serum/anchor-cli",
"version": "0.10.0",
"description": "Anchor CLI tool",
"homepage": "https://github.com/project-serum/anchor#readme",
"bugs": {
"url": "https://github.com/project-serum/anchor/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/project-serum/anchor.git"
},
"license": "(MIT OR Apache-2.0)",
"bin": {
"anchor": "anchor"
},
"scripts": {
"prepack": "[ \"$(uname -op)\" != \"x86_64 GNU/Linux\" ] && (echo Only for x86_64 GNU/Linux && exit 1) || ([ \"$(./anchor --version)\" != \"anchor-cli $(jq -r .version package.json)\" ] && (echo Check anchor binary version && exit 2) || exit 0)"
},
"os": [
"linux"
],
"cpu": [
"x64"
],
"publishConfig": {
"access": "public"
}
}