Permalink
Browse files

Reorganize file structure by language/platform

Moved all files that are specifically for the website into web (except for index.htm)
Moved all files that are javascript (for node or web) into js
Organized js folder to generally follow node structures

This change also changes .npmignore to include unpackers in the package.
First step on #224.
  • Loading branch information...
1 parent 1768f57 commit 9de057f94c87ff23f4ca60e931a44ba11e1dd258 @bitwiseman bitwiseman committed Apr 4, 2013
Showing with 56 additions and 58 deletions.
  1. +1 −5 .npmignore
  2. +6 −6 Makefile
  3. +0 −4 bin/css-beautify.js
  4. +0 −4 bin/html-beautify.js
  5. +0 −4 bin/js-beautify.js
  6. +17 −17 index.html
  7. +4 −0 js/bin/css-beautify.js
  8. +4 −0 js/bin/html-beautify.js
  9. +4 −0 js/bin/js-beautify.js
  10. 0 { → js}/config/defaults.json
  11. 0 { → js}/index.js
  12. 0 { → js/lib}/beautify-css.js
  13. 0 { → js/lib}/beautify-html.js
  14. 0 { → js/lib}/beautify.js
  15. +3 −3 { → js/lib}/cli.js
  16. 0 { → js/lib}/unpackers/javascriptobfuscator_unpacker.js
  17. 0 { → js/lib}/unpackers/myobfuscate_unpacker.js
  18. 0 { → js/lib}/unpackers/p_a_c_k_e_r_unpacker.js
  19. +2 −2 { → js/lib}/unpackers/urlencode_unpacker.js
  20. 0 {tests → js/test}/beautify-tests.js
  21. +2 −2 {tests → js/test}/node-beautify-tests.js
  22. +5 −5 {tests → js/test}/run-tests
  23. 0 {tests → js/test}/sanitytest.js
  24. +8 −6 package.json
  25. BIN { → web}/favicon.png
  26. 0 {third-party/codemirror2 → web/third-party/codemirror}/LICENSE
  27. 0 {third-party/codemirror2 → web/third-party/codemirror}/README.md
  28. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/activeline.html
  29. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/changemode.html
  30. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/closetag.html
  31. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/complete.html
  32. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/emacs.html
  33. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/folding.html
  34. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/formatting.html
  35. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/fullscreen.html
  36. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/loadmode.html
  37. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/marker.html
  38. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/matchhighlighter.html
  39. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/mustache.html
  40. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/preview.html
  41. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/resize.html
  42. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/runmode.html
  43. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/search.html
  44. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/theme.html
  45. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/vim.html
  46. 0 {third-party/codemirror2 → web/third-party/codemirror}/demo/visibletabs.html
  47. BIN {third-party/codemirror2 → web/third-party/codemirror}/doc/baboon.png
  48. 0 {third-party/codemirror2 → web/third-party/codemirror}/doc/baboon_vector.svg
  49. 0 {third-party/codemirror2 → web/third-party/codemirror}/doc/compress.html
  50. 0 {third-party/codemirror2 → web/third-party/codemirror}/doc/docs.css
  51. 0 {third-party/codemirror2 → web/third-party/codemirror}/doc/internals.html
  52. 0 {third-party/codemirror2 → web/third-party/codemirror}/doc/manual.html
  53. 0 {third-party/codemirror2 → web/third-party/codemirror}/doc/oldrelease.html
  54. 0 {third-party/codemirror2 → web/third-party/codemirror}/doc/reporting.html
  55. 0 {third-party/codemirror2 → web/third-party/codemirror}/doc/upgrade_v2.2.html
  56. 0 {third-party/codemirror2 → web/third-party/codemirror}/index.html
  57. 0 {third-party/codemirror2 → web/third-party/codemirror}/keymap/emacs.js
  58. 0 {third-party/codemirror2 → web/third-party/codemirror}/keymap/vim.js
  59. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/codemirror.css
  60. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/codemirror.js
  61. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/closetag.js
  62. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/dialog.css
  63. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/dialog.js
  64. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/foldcode.js
  65. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/formatting.js
  66. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/javascript-hint.js
  67. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/loadmode.js
  68. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/match-highlighter.js
  69. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/overlay.js
  70. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/runmode.js
  71. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/search.js
  72. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/searchcursor.js
  73. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/simple-hint.css
  74. 0 {third-party/codemirror2 → web/third-party/codemirror}/lib/util/simple-hint.js
  75. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/clike/clike.js
  76. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/clike/index.html
  77. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/clojure/clojure.js
  78. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/clojure/index.html
  79. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/coffeescript/LICENSE
  80. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/coffeescript/coffeescript.js
  81. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/coffeescript/index.html
  82. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/css/css.js
  83. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/css/index.html
  84. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/diff/diff.js
  85. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/diff/index.html
  86. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/ecl/ecl.js
  87. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/ecl/index.html
  88. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/erlang/erlang.js
  89. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/erlang/index.html
  90. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/gfm/gfm.js
  91. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/gfm/index.html
  92. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/go/go.js
  93. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/go/index.html
  94. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/groovy/groovy.js
  95. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/groovy/index.html
  96. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/haskell/haskell.js
  97. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/haskell/index.html
  98. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/htmlembedded/htmlembedded.js
  99. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/htmlembedded/index.html
  100. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/htmlmixed/htmlmixed.js
  101. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/htmlmixed/index.html
  102. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/javascript/index.html
  103. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/javascript/javascript.js
  104. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/jinja2/index.html
  105. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/jinja2/jinja2.js
  106. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/less/index.html
  107. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/less/less.js
  108. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/lua/index.html
  109. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/lua/lua.js
  110. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/markdown/index.html
  111. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/markdown/markdown.js
  112. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/mysql/index.html
  113. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/mysql/mysql.js
  114. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/ntriples/index.html
  115. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/ntriples/ntriples.js
  116. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/pascal/LICENSE
  117. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/pascal/index.html
  118. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/pascal/pascal.js
  119. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/perl/LICENSE
  120. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/perl/index.html
  121. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/perl/perl.js
  122. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/php/index.html
  123. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/php/php.js
  124. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/pig/index.html
  125. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/pig/pig.js
  126. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/plsql/index.html
  127. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/plsql/plsql.js
  128. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/properties/index.html
  129. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/properties/properties.js
  130. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/python/LICENSE.txt
  131. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/python/index.html
  132. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/python/python.js
  133. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/r/LICENSE
  134. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/r/index.html
  135. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/r/r.js
  136. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rpm/changes/changes.js
  137. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rpm/changes/index.html
  138. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rpm/spec/index.html
  139. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rpm/spec/spec.css
  140. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rpm/spec/spec.js
  141. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rst/index.html
  142. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rst/rst.js
  143. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/ruby/LICENSE
  144. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/ruby/index.html
  145. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/ruby/ruby.js
  146. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rust/index.html
  147. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/rust/rust.js
  148. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/scheme/index.html
  149. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/scheme/scheme.js
  150. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/shell/index.html
  151. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/shell/shell.js
  152. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/smalltalk/index.html
  153. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/smalltalk/smalltalk.js
  154. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/smarty/index.html
  155. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/smarty/smarty.js
  156. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/sparql/index.html
  157. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/sparql/sparql.js
  158. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/stex/index.html
  159. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/stex/stex.js
  160. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/stex/test.html
  161. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/tiddlywiki/index.html
  162. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/tiddlywiki/tiddlywiki.css
  163. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/tiddlywiki/tiddlywiki.js
  164. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/tiki/index.html
  165. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/tiki/tiki.css
  166. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/tiki/tiki.js
  167. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/vbscript/index.html
  168. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/vbscript/vbscript.js
  169. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/velocity/index.html
  170. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/velocity/velocity.js
  171. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/verilog/index.html
  172. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/verilog/verilog.js
  173. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xml/index.html
  174. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xml/xml.js
  175. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/LICENSE
  176. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/index.html
  177. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/test/index.html
  178. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/test/testBase.js
  179. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/test/testEmptySequenceKeyword.js
  180. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/test/testMultiAttr.js
  181. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/test/testNamespaces.js
  182. 0 ...rd-party/codemirror2 → web/third-party/codemirror}/mode/xquery/test/testProcessingInstructions.js
  183. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/test/testQuotes.js
  184. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/xquery/xquery.js
  185. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/yaml/index.html
  186. 0 {third-party/codemirror2 → web/third-party/codemirror}/mode/yaml/yaml.js
  187. 0 {third-party/codemirror2 → web/third-party/codemirror}/test/index.html
  188. 0 {third-party/codemirror2 → web/third-party/codemirror}/test/mode_test.css
  189. 0 {third-party/codemirror2 → web/third-party/codemirror}/test/mode_test.js
  190. 0 {third-party/codemirror2 → web/third-party/codemirror}/test/test.js
  191. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/ambiance.css
  192. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/blackboard.css
  193. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/cobalt.css
  194. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/eclipse.css
  195. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/elegant.css
  196. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/erlang-dark.css
  197. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/lesser-dark.css
  198. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/monokai.css
  199. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/neat.css
  200. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/night.css
  201. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/rubyblue.css
  202. 0 {third-party/codemirror2 → web/third-party/codemirror}/theme/xq-dark.css
  203. 0 { → web}/third-party/jquery/jquery.cookie.js
  204. 0 { → web}/third-party/jquery/jquery.js
View
@@ -1,9 +1,5 @@
Makefile
-attic/
-favicon.png
index.html
-jquery/
php/
python/
-third-party/
-unpackers/
+web/
View
@@ -34,15 +34,15 @@ testj:
edit:
vim \
- beautify.js python/jsbeautifier/__init__.py \
- tests/beautify-tests.js python/jsbeautifier/tests/testjsbeautifier.py
+ js/lib/beautify.js python/jsbeautifier/__init__.py \
+ js/test/beautify-tests.js python/jsbeautifier/tests/testjsbeautifier.py
gedit:
gvim \
- beautify.js \
- tests/beautify-tests.js \
- python/jsbeautifier/__init__.py \
- python/jsbeautifier/tests/testjsbeautifier.py &
+ js/lib/beautify.js \
+ js/test/beautify-tests.js \
+ js/python/jsbeautifier/__init__.py \
+ js/python/jsbeautifier/tests/testjsbeautifier.py &
tests: testj testp
View
@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-var cli = require('../cli'); cli.interpret();
-
-
@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-var cli = require('../cli'); cli.interpret();
-
-
View
@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-var cli = require('../cli'); cli.interpret();
-
-
View
@@ -32,10 +32,10 @@
<head>
<meta charset="utf-8">
<title>Online JavaScript beautifier</title>
- <link rel="icon" href="favicon.png" type="image/png">
- <script src="third-party/codemirror2/lib/codemirror.js"></script>
- <script src="third-party/codemirror2/mode/javascript/javascript.js"></script>
- <link rel="stylesheet" href="third-party/codemirror2/lib/codemirror.css">
+ <link rel="icon" href="web/favicon.png" type="image/png">
+ <script src="web/third-party/codemirror/lib/codemirror.js"></script>
+ <script src="web/third-party/codemirror/mode/javascript/javascript.js"></script>
+ <link rel="stylesheet" href="web/third-party/codemirror/lib/codemirror.css">
<style>
@@ -137,19 +137,19 @@
}
</style>
-<script src="third-party/jquery/jquery.js"></script>
-<script src="third-party/jquery/jquery.cookie.js"></script>
-
-
-<script src="beautify.js"></script>
-<script src="beautify-css.js"></script>
-<script src="beautify-html.js"></script>
-<script src="tests/sanitytest.js"></script>
-<script src="tests/beautify-tests.js"></script>
-<script src="unpackers/javascriptobfuscator_unpacker.js"></script>
-<script src="unpackers/urlencode_unpacker.js"></script>
-<script src="unpackers/p_a_c_k_e_r_unpacker.js"></script>
-<script src="unpackers/myobfuscate_unpacker.js"></script>
+<script src="web/third-party/jquery/jquery.js"></script>
+<script src="web/third-party/jquery/jquery.cookie.js"></script>
+
+
+<script src="js/lib/beautify.js"></script>
+<script src="js/lib/beautify-css.js"></script>
+<script src="js/lib/beautify-html.js"></script>
+<script src="js/test/sanitytest.js"></script>
+<script src="js/test/beautify-tests.js"></script>
+<script src="js/lib/unpackers/javascriptobfuscator_unpacker.js"></script>
+<script src="js/lib/unpackers/urlencode_unpacker.js"></script>
+<script src="js/lib/unpackers/p_a_c_k_e_r_unpacker.js"></script>
+<script src="js/lib/unpackers/myobfuscate_unpacker.js"></script>
<script>
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+var cli = require('../lib/cli'); cli.interpret();
+
+
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+var cli = require('../lib/cli'); cli.interpret();
+
+
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+var cli = require('../lib/cli'); cli.interpret();
+
+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -38,7 +38,7 @@ var debug = process.env.DEBUG_JSBEAUTIFY || process.env.JSBEAUTIFY_DEBUG
var fs = require('fs'),
cc = require('config-chain'),
- beautify = require('./index'),
+ beautify = require('../index'),
nopt = require('nopt'),
path = require('path'),
knownOpts = {
@@ -113,7 +113,7 @@ var interpret = exports.interpret = function (argv, slice) {
var parsed = nopt(knownOpts, shortHands, argv, slice);
if (parsed.version) {
- console.log(require('./package.json').version);
+ console.log(require(__dirname + '/../../package.json').version);
process.exit(0);
}
else if (parsed.help) {
@@ -126,7 +126,7 @@ var interpret = exports.interpret = function (argv, slice) {
cleanOptions(cc.env('jsbeautify_'), knownOpts),
parsed.config,
cc.find('.jsbeautifyrc'),
- __dirname + '/config/defaults.json'
+ __dirname + '/../config/defaults.json'
).snapshot;
try {
@@ -9,12 +9,12 @@
// if (Urlencoded.detect(some_string)) {
// var unpacked = Urlencoded.unpack(some_string);
// }
-//
+//
//
var isNode = (typeof module !== 'undefined' && module.exports);
if (isNode) {
- var SanityTest = require(__dirname + '/../tests/sanitytest');
+ var SanityTest = require(__dirname + '/../../test/sanitytest');
}
var Urlencoded = {
File renamed without changes.
@@ -2,8 +2,8 @@
/*jshint node:true */
var SanityTest = require('./sanitytest'),
- Urlencoded = require('../unpackers/urlencode_unpacker'),
- js_beautify = require('../beautify').js_beautify,
+ Urlencoded = require('../lib/unpackers/urlencode_unpacker'),
+ js_beautify = require('../lib/beautify').js_beautify,
run_beautifier_tests = require('./beautify-tests').run_beautifier_tests;
function node_beautifier_tests() {
@@ -5,13 +5,13 @@
// a little helper for testing from command line
// just run it, it will output the test results
-load('beautify.js');
-load('tests/sanitytest.js')
-load('tests/beautify-tests.js')
-load('unpackers/urlencode_unpacker.js')
+load('js/lib/beautify.js');
+load('js/test/sanitytest.js')
+load('js/test/beautify-tests.js')
+load('js/lib/unpackers/urlencode_unpacker.js')
print(run_beautifier_tests().results_raw())
// for nodejs use this from the command line from the main directory:
-// node tests/beautify-tests.js
+// node test/beautify-tests.js
File renamed without changes.
View
@@ -2,18 +2,20 @@
"name": "js-beautify",
"version": "1.2.0",
"description": "jsbeautifier.org for node",
- "main": "index.js",
+ "main": "js/index.js",
"preferGlobal": true,
"bin": {
- "css-beautify": "./bin/css-beautify.js",
- "html-beautify": "./bin/html-beautify.js",
- "js-beautify": "./bin/js-beautify.js"
+ "css-beautify": "./js/bin/css-beautify.js",
+ "html-beautify": "./js/bin/html-beautify.js",
+ "js-beautify": "./js/bin/js-beautify.js"
},
"directories": {
- "test": "tests"
+ "lib": "js/lib",
+ "test": "js/test"
+
},
"scripts": {
- "test": "node ./tests/node-beautify-tests.js"
+ "test": "node ./js/test/node-beautify-tests.js"
},
"bugs": "https://github.com/einars/js-beautify/issues",
"homepage": "http://jsbeautifier.org/",
File renamed without changes

0 comments on commit 9de057f

Please sign in to comment.