Files
cellxgene/client/Makefile
Severiano Badajoz 889b582538 ESLint tooling and enforcement(#1492)
* add eslint-prettier

* add lint-staged

* ignore .eslintcache

* remove unused import

* attempt test change

* Revert "attempt test change"

This reverts commit 78d0e31d41.

* attempt to add error

* Revert "attempt to add error"

This reverts commit a5885c0942.

* add error

* create config

* add comment

* tweak glob

* Revert "add error"

This reverts commit 3187522396.

* add python error

* Revert "add python error"

This reverts commit d0b116ed15.

* lint on push + PR

* Revert "add comment"

This reverts commit efa4eb6676.

* add prettier rules to ESLint

* remove lint-diff targets
2020-05-21 14:27:49 -07:00

75 lines
1.5 KiB
Makefile

include ../common.mk
ANNOTATIONS := $(if $(ANNOTATIONS),$(ANNOTATIONS),../server/test/test_datasets/pbmc3k-annotations.csv)
ANNOTATIONS_FILENAME := $(shell basename $(ANNOTATIONS))
# Packaging
.PHONY: clean
clean:
rm -rf node_modules
.PHONY: ci
ci:
npm ci
.PHONY: install
install:
npm install
.PHONY: build
WEBPACK_CONFIG ?= configuration/webpack/webpack.config.prod.js
build:
npm run build $(WEBPACK_CONFIG)
# Formatting code
.PHONY: lint
lint:
npx eslint ./src/
# Development convenience methods
.PHONY: start-frontend
start-frontend:
node server/development.js
.PHONY: e2e
e2e:
node node_modules/jest/bin/jest.js \
--verbose false \
--config __tests__/e2e/e2eJestConfig.json \
e2e/e2e.test.js
.PHONY: e2e-annotations
e2e-annotations:
node node_modules/jest/bin/jest.js \
--verbose false \
--config __tests__/e2e/e2eJestConfig.json \
e2e/e2eAnnotations.test.js
.PHONY: smoke-test
smoke-test:
start_server_and_test \
'CXG_OPTIONS="--disable-annotations" $(MAKE) start-server' \
$(CXG_SERVER_PORT) \
'$(MAKE) e2e'
.PHONY: smoke-test-annotations
smoke-test-annotations:
$(eval TMP_DIR := $(shell mktemp -d /tmp/cellxgene_XXXXXX))
cp $(ANNOTATIONS) $(TMP_DIR)/ && \
start_server_and_test \
'CXG_OPTIONS="--annotations-file $(TMP_DIR)/$(ANNOTATIONS_FILENAME)" $(MAKE) start-server' \
$(CXG_SERVER_PORT) \
'$(MAKE) e2e-annotations'
rm -rf $(TMP_DIR)
.PHONY: unit-test
unit-test:
node node_modules/jest/bin/jest.js \
--testPathIgnorePatterns e2e
# pass remaining commands through to npm run
%:
npm run $(*)