mirror of
https://github.com/beautifier/js-beautify.git
synced 2025-02-18 20:28:59 +00:00
Add my makefile and cli-spidermonkey-tester
...just so they don't get lost.
This commit is contained in:
parent
2502468acb
commit
72016ffb16
51
Makefile
Normal file
51
Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
|
||||
define AVAILABLE_ACTIONS
|
||||
|
||||
publish: publish jsbeautifier to github.com and sync
|
||||
test: test both implementations, js and python
|
||||
testp: test python implementation
|
||||
testj: test javascript implementation
|
||||
|
||||
endef
|
||||
export AVAILABLE_ACTIONS
|
||||
|
||||
|
||||
define SCRIPT_PUBLISH
|
||||
|
||||
open spic
|
||||
cd jsbeautifier.org
|
||||
mirror -Rv attic
|
||||
mirror -Rv jquery
|
||||
mirror -Rv tests
|
||||
mirror -Rv unpackers
|
||||
mirror -Rv python
|
||||
put beautify-html.js beautify.js index.html license.txt README.md
|
||||
|
||||
endef
|
||||
export SCRIPT_PUBLISH
|
||||
|
||||
|
||||
.SILENT:
|
||||
|
||||
all:
|
||||
echo "$$AVAILABLE_ACTIONS"
|
||||
|
||||
publish:
|
||||
git push
|
||||
lftp -c "$$SCRIPT_PUBLISH"
|
||||
|
||||
testp:
|
||||
echo Testing python implementation...
|
||||
cd python ;\
|
||||
./test-jsbeautifier.py
|
||||
echo
|
||||
|
||||
testj:
|
||||
echo Testing javascript implementation...
|
||||
./tests/run-tests
|
||||
echo
|
||||
|
||||
tests: testp testj
|
||||
|
||||
test: testp testj
|
||||
|
17
tests/run-tests
Executable file
17
tests/run-tests
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/js
|
||||
|
||||
// a little helper for testing from command line
|
||||
// just run it, it will output the test results
|
||||
|
||||
try {
|
||||
load('beautify.js');
|
||||
load('tests/sanitytest.js')
|
||||
load('tests/beautify-tests.js')
|
||||
} catch (yada) {
|
||||
load('../beautify.js');
|
||||
load('sanitytest.js')
|
||||
load('beautify-tests.js')
|
||||
}
|
||||
|
||||
print(run_beautifier_tests().results_raw())
|
||||
|
Loading…
x
Reference in New Issue
Block a user