forked from greymass/anchor-link
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 1.52 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
SRC_FILES := $(shell find src -name '*.ts')
all: lib lib/bundle.js lib/index.es5.js
lib: $(SRC_FILES) node_modules tsconfig.json
./node_modules/.bin/tsc -p tsconfig.json --outDir lib
touch lib
lib/bundle.js: $(SRC_FILES) node_modules tsconfig.json
./node_modules/.bin/browserify --debug -e src/index-bundle.js -p tsify -s AnchorLink \
| ./node_modules/.bin/exorcist lib/bundle.js.map > lib/bundle.js
lib/index.es5.js: $(SRC_FILES) node_modules tsconfig.json
./node_modules/.bin/browserify --debug -e src/index-bundle.js -p tsify \
-s AnchorLink --node --no-bundle-external \
| ./node_modules/.bin/exorcist lib/index.es5.js.map > lib/index.es5.js
.PHONY: update-abi-types
update-abi-types: node_modules
./node_modules/.bin/ts-node -e "import data from './src/link-abi-data'; console.log(JSON.stringify(data))" \
| ./node_modules/.bin/eosio-abi2ts -e >src/link-abi.d.ts.tmp && mv src/link-abi.d.ts.tmp src/link-abi.d.ts
.PHONY: lint
lint: node_modules
NODE_ENV=test ./node_modules/.bin/tslint -p tsconfig.json -c tslint.json -t stylish --fix
docs: $(SRC_FILES) node_modules
./node_modules/.bin/typedoc \
--mode file --stripInternal \
--excludeNotExported --excludePrivate --excludeProtected \
--name "Anchor Link" --readme none \
--out docs \
src/index.ts
.PHONY: deploy-site
deploy-site: docs
cp -r ./examples ./docs/examples/
./node_modules/.bin/gh-pages -d docs
node_modules:
yarn install --non-interactive --frozen-lockfile
.PHONY: clean
clean:
rm -rf lib/ docs/
.PHONY: distclean
distclean: clean
rm -rf node_modules/