Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgerstmayr committed Mar 18, 2024
1 parent 1d7adc0 commit 9080d1d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
default: run

## Dependencies
deps-js:
cd frontend; npm install && npx puppeteer browsers install chrome

deps-js-update:
cd frontend; npx npm-check-updates -i

deps-py:
pipenv install -d

deps-py-update:
pipenv update

deps: deps-js deps-py

## Build and Test
build-js:
cd frontend; npm run build

build: build-js

watch-js:
cd frontend; npm run watch

Expand All @@ -18,13 +30,17 @@ test-js:
test-js-update:
cd frontend; LANG=en npm run test -- -u

test: test-js

## Utils
run:
cd example; pipenv run fava example.beancount

run-debug:
cd example; pipenv run fava --debug example.beancount

lint:
cd frontend; npx tsc --noEmit
pipenv run mypy src/fava_dashboards/__init__.py scripts/format_js_in_dashboard.py
pipenv run pylint src/fava_dashboards/__init__.py scripts/format_js_in_dashboard.py

Expand All @@ -36,9 +52,9 @@ format:

ci:
make lint
make build-js
make build
make run &
make test-js
make test

make format
git diff --exit-code
16 changes: 15 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"jest-puppeteer": "^9.0.0",
"jest-serializer-html": "^7.1.0",
"prettier": "^3.1.0",
"puppeteer": "^22.4.1"
"puppeteer": "^22.4.1",
"typescript": "^5.4.2"
},
"dependencies": {
"d3": "^7.8.5",
Expand Down
6 changes: 6 additions & 0 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"compilerOptions": {
"target": "es2022",
"moduleResolution": "Node",
},
}

0 comments on commit 9080d1d

Please sign in to comment.