mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 04:05:49 +00:00
ea37e9901b
--HG-- rename : browser/devtools/shared/Jsbeautify.jsm => toolkit/devtools/jsbeautify/beautify.js
1.0 KiB
1.0 KiB
UPGRADING
-
git clone https://github.com/beautify-web/js-beautify.git
-
Copy
js/lib/beautify.js
totoolkit/devtools/jsbeautify/src/beautify-js.js
-
Remove the acorn section from the file and add the following to the top:
const acorn = require("acorn/acorn");
- Just above
function Beautifier(js_source_text, options) {
add:
exports.jsBeautify = js_beautify;
-
Copy
beautify-html.js
totoolkit/devtools/jsbeautify/src/beautify-html.js
-
Replace the require blocks at the bottom of the file with:
var beautify = require('devtools/jsbeautify');
exports.htmlBeautify = function(html_source, options) {
return style_html(html_source, options, beautify.js, beautify.css);
};
-
Copy
beautify-css.js
totoolkit/devtools/jsbeautify/src/beautify-css.js
-
Replace the global define block at the bottom of the file with:
exports.cssBeautify = css_beautify;
- Copy
js/test/beautify-tests.js
totoolkit/devtools/jsbeautify/src/beautify-tests.js