umap/Makefile

47 lines
1.5 KiB
Makefile
Raw Normal View History

2016-08-20 05:32:23 -05:00
test:
py.test -xv umap/tests/
2018-05-18 14:40:38 -05:00
develop:
2021-12-29 10:54:15 -06:00
pip install -e .[test,dev]
2018-07-07 16:08:33 -05:00
release: test compilemessages
python setup.py sdist bdist_wheel
test_publish:
twine upload -r testpypi dist/*
publish:
twine upload dist/*
make clean
clean:
rm -f dist/*
rm -rf build/*
2018-05-19 04:12:19 -05:00
compilemessages:
2018-09-08 10:01:22 -05:00
umap compilemessages
2018-07-07 16:03:10 -05:00
umap generate_js_locale
2018-09-08 10:01:22 -05:00
messages:
cd umap && umap makemessages -l en
2018-07-07 16:03:10 -05:00
node node_modules/leaflet-i18n/bin/i18n.js --dir_path=umap/static/umap/js/ --dir_path=umap/static/umap/vendors/measurable/ --locale_dir_path=umap/static/umap/locale/ --locale_codes=en --mode=json --clean --default_values
2018-07-07 16:15:26 -05:00
vendors:
npm run vendors
2018-06-02 07:44:59 -05:00
installjs:
npm install
testjsfx:
firefox umap/static/umap/test/index.html
testjs: node_modules
@./node_modules/mocha-phantomjs/bin/mocha-phantomjs --view 1024x768 umap/static/umap/test/index.html
tx_push:
tx push -s
tx_pull:
tx pull
2023-05-12 12:57:03 -05:00
jsdir = umap/static/umap/js/
filepath = "${jsdir}*.js"
pretty: ## Apply PrettierJS to all JS files (or specified `filepath`)
./node_modules/prettier/bin-prettier.js --write ${filepath}
lebab: ## Convert JS `filepath` to modern syntax with Lebab, then prettify
./node_modules/lebab/bin/index.js --replace ${filepath} --transform arrow,arrow-return
Apply Lebab for let/const conversions As far as I understand, it default to `let` in these cases because the tool cannot figure out if a `const` is possible. It has to be checked manually: ``` ./node_modules/lebab/bin/index.js --replace "umap/static/umap/js/*.js" --transform let umap/static/umap/js/umap.xhr.js: 228: warning Unable to transform var (let) umap/static/umap/js/umap.ui.js: 83: warning Unable to transform var (let) umap/static/umap/js/umap.slideshow.js: 15: warning Unable to transform var (let) 83: warning Unable to transform var (let) umap/static/umap/js/umap.popup.js: 100: warning Unable to transform var (let) umap/static/umap/js/umap.permissions.js: 14: warning Unable to transform var (let) umap/static/umap/js/umap.layer.js: 195: warning Unable to transform var (let) 436: warning Unable to transform var (let) 568: warning Unable to transform var (let) 584: warning Unable to transform var (let) 989: warning Unable to transform var (let) 1088: warning Unable to transform var (let) 1098: warning Unable to transform var (let) umap/static/umap/js/umap.js: 124: warning Unable to transform var (let) 223: warning Unable to transform var (let) 343: warning Unable to transform var (let) 376: warning Unable to transform var (let) 406: warning Unable to transform var (let) 849: warning Unable to transform var (let) 732: warning Unable to transform var (let) 948: warning Unable to transform var (let) 959: warning Unable to transform var (let) 878: warning Unable to transform var (let) 1085: warning Unable to transform var (let) umap/static/umap/js/umap.icon.js: 145: warning Unable to transform var (let) 184: warning Unable to transform var (let) umap/static/umap/js/umap.forms.js: 453: warning Unable to transform var (let) umap/static/umap/js/umap.features.js: 15: warning Unable to transform var (let) 101: warning Unable to transform var (let) 143: warning Unable to transform var (let) 373: warning Unable to transform var (let) 429: warning Unable to transform var (let) 890: warning Unable to transform var (let) 949: warning Unable to transform var (let) umap/static/umap/js/umap.core.js: 149: warning Unable to transform var (let) 175: warning Unable to transform var (let) umap/static/umap/js/umap.controls.js: 665: warning Unable to transform var (let) 876: warning Unable to transform var (let) 1249: warning Unable to transform var (let) ```
2023-05-22 09:13:45 -05:00
./node_modules/lebab/bin/index.js --replace ${filepath} --transform let
2023-05-30 13:53:53 -05:00
./node_modules/lebab/bin/index.js --replace ${filepath} --transform template
$(MAKE) pretty filepath=${filepath}
lebab-all: $(jsdir)* ## Convert all JS files to modern syntax with Lebab + prettify
for file in $^ ; do $(MAKE) lebab filepath=$${file}; done