diff options
author | elijah <elijah@riseup.net> | 2016-09-16 13:54:10 -0700 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-09-22 11:39:47 -0400 |
commit | ae5a20d059209f2027c05820dc3b4cfe7346c8a8 (patch) | |
tree | 3ddc591e3d8b9fc9721c198bb83976b1d6705490 /www/Makefile | |
parent | bb82515bca6ff6e6b74718bf946faf3747e40002 (diff) |
[pkg] fix www (aka bitmask_js) when run in "development mode"
this change allows you to edit the js and have the changes reflected
immediately in the app.
Diffstat (limited to 'www/Makefile')
-rw-r--r-- | www/Makefile | 59 |
1 files changed, 36 insertions, 23 deletions
diff --git a/www/Makefile b/www/Makefile index 18a7107..d67a02b 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1,34 +1,47 @@ -build: +# +# builds for development mode +# + +dev-build: build-clean npm install - npm run build:production + npm run build + touch pydist/bitmask_js/__init__.py -build-dev: - npm run watch +dev-install: dev-build + pip install -e pydist -clean: - rm -rf public - rm -rf node_modules +# +# installs python package, but does not rebuild the js. +# for usage when you don't want to install nodejs +# +dev-install-prebuilt: + pip install -e pydist -py-pkg: - touch leap/bitmask_www/__init__.py - cp -r public/ leap/bitmask_www -pydist: pydist-clean build py-pkg - python setup.py bdist_wheel +# +# distribution builds +# -pydist-dev: pydist-clean build py-pkg - pip install -e . +dist-build: build-clean + npm install + npm run build:production + touch pydist/bitmask_js/__init__.py + cd pydist && python setup.py bdist_wheel -pydist-install: pydist - pip install dist/*.whl +dist-install: dist-build + pip install pydist/dist/*.whl -pydist-clean: - rm -rf build dist - rm -rf leap/bitmask_www/* +# +# cleaning up +# -uninstall: - pip uninstall leap.bitmask_www +build-clean: + rm -rf pydist/bitmask_js + rm -rf pydist/dist + rm -rf pydist/build -all: clean build pydist +clean: build-clean + rm -rf node_modules -.PHONY: clean build install all +uninstall: + pip uninstall bitmask_js |