diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /devtools/shared/jsbeautify/UPGRADING.md | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/shared/jsbeautify/UPGRADING.md')
-rw-r--r-- | devtools/shared/jsbeautify/UPGRADING.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/devtools/shared/jsbeautify/UPGRADING.md b/devtools/shared/jsbeautify/UPGRADING.md new file mode 100644 index 000000000..dc6e0fe43 --- /dev/null +++ b/devtools/shared/jsbeautify/UPGRADING.md @@ -0,0 +1,37 @@ +# UPGRADING + +1. `git clone https://github.com/beautify-web/js-beautify.git` + +2. Copy `js/lib/beautify.js` to `devtools/shared/jsbeautify/src/beautify-js.js` + +3. Remove the acorn section from the file and add the following to the top: + + ``` + const acorn = require("acorn/acorn"); + ``` + +4. Just above `function Beautifier(js_source_text, options) {` add: + + ``` + exports.jsBeautify = js_beautify; + ``` + +5. Copy `beautify-html.js` to `devtools/shared/jsbeautify/src/beautify-html.js` + +6. Replace the require blocks at the bottom of the file with: + + ``` + var beautify = require('devtools/shared/jsbeautify/beautify'); + + exports.htmlBeautify = function(html_source, options) { + return style_html(html_source, options, beautify.js, beautify.css); + }; + ``` + +7. Copy `beautify-css.js` to `devtools/shared/jsbeautify/src/beautify-css.js` + +8. Replace the global define block at the bottom of the file with: + ``` + exports.cssBeautify = css_beautify; + ``` +9. Copy `js/test/beautify-tests.js` to `devtools/shared/jsbeautify/src/beautify-tests.js` |