mirror of
https://github.com/wharfkit/cli.git
synced 2026-07-23 18:57:44 +00:00
d91ee1965f
* chore: added contract command * chore: added make check and make format * chore: getting the generate command to work * chore: added the --file option to the generate command * fix: got tests passing * chore: got rid of deprecation warnings * chore: added ci check * Bumping requirement to v18 * Use stdout instead of stderr * Reworked shebang to disable experimental warnings * Made logging less verbose * Removed v16 testing * Inverted logging logic to debug by default --------- Co-authored-by: Aaron Cox <aaron@greymass.com>
42 lines
1.2 KiB
Makefile
42 lines
1.2 KiB
Makefile
SHELL := /bin/bash
|
|
SRC_FILES := $(shell find src -name '*.ts')
|
|
TEST_FILES := $(shell find test/tests -name '*.ts')
|
|
MOCHA_OPTS := -u tdd -r ts-node/register -r tsconfig-paths/register --extension ts
|
|
BIN := ./node_modules/.bin
|
|
|
|
lib: ${SRC_FILES} package.json tsconfig.json node_modules rollup.config.js
|
|
@${BIN}/rollup -c && touch lib
|
|
|
|
.PHONY: test
|
|
test: node_modules
|
|
@TS_NODE_PROJECT='./test/tsconfig.json' MOCK_DIR='./test/data/requests' \
|
|
${BIN}/mocha ${MOCHA_OPTS} ${TEST_FILES} --no-timeout --grep '$(grep)'
|
|
|
|
.PHONY: ci-test
|
|
ci-test: node_modules
|
|
@TS_NODE_PROJECT='./test/tsconfig.json' MOCK_DIR='./test/data/requests' \
|
|
${BIN}/nyc ${NYC_OPTS} --reporter=text \
|
|
${BIN}/mocha ${MOCHA_OPTS} -R list ${TEST_FILES} --no-timeout
|
|
|
|
.PHONY: test_generate
|
|
test_generate: node_modules clean lib
|
|
node lib/cli.js generate eosio.token -u https://jungle4.greymass.com
|
|
|
|
.PHONY: check
|
|
check: node_modules
|
|
@${BIN}/eslint src test --ext .ts --max-warnings 0 --format unix && echo "Ok"
|
|
|
|
.PHONY: format
|
|
format: node_modules
|
|
@${BIN}/eslint src test --ext .ts --fix
|
|
|
|
node_modules:
|
|
yarn install --non-interactive --frozen-lockfile --ignore-scripts
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf lib/
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|
|
rm -rf node_modules/
|