mirror of
https://github.com/umap-project/umap.git
synced 2025-05-04 21:51:50 +02:00
Makefile commands to run PrettierJS and Lebab
This commit is contained in:
parent
b34c79eae2
commit
48288cc8cb
1 changed files with 13 additions and 0 deletions
13
Makefile
13
Makefile
|
@ -52,3 +52,16 @@ tx_push:
|
|||
tx push -s
|
||||
tx_pull:
|
||||
tx pull
|
||||
|
||||
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,for-of,for-each,arg-rest,arg-spread,obj-method,obj-shorthand,no-strict,exponent,multi-var
|
||||
./node_modules/lebab/bin/index.js --replace ${filepath} --transform let,class,commonjs,template,default-param,destruct-param,includes
|
||||
$(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
|
||||
|
|
Loading…
Reference in a new issue