From ae5a20d059209f2027c05820dc3b4cfe7346c8a8 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 16 Sep 2016 13:54:10 -0700 Subject: [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. --- www/Makefile | 59 ++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 23 deletions(-) (limited to 'www/Makefile') 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 -- cgit v1.2.3