Plugin:BeautifyWB v2.02

Browse, download and discuss plugins for Blumentals code editors

Plugin:BeautifyWB v2.02

Postby pmk65 » Fri Jun 19, 2015 1:13 am

Integrate JS Beautifier into Webuilder

* JS Beautifier is a coding style beautifier for JavaScript (and also for CSS and HTML).
* It reformat and reindent bookmarklets, ugly JavaScript, unpack scripts packed by Dean Edward’s popular packer, as well as deobfuscate scripts processed by javascriptobfuscator.com.
* You can easily write your own configuration to make your JavaScript beautiful and consistent.
* Requires nodejs.

Before installing/using this plugin, you need to install nodejs and the JS Beautifier script.

Installation:
1.) Download plugin .ZIP file.
2.) Download and Install node.js from https://nodejs.org/
3.) Reset computer. (Required after install of node.js)
4.) Open command prompt.
5.) Enter this at the prompt: npm install js-beautify -g
6.) If everything went well you should see something like this:
Code: Select all
C:\Users\Home\AppData\Roaming\npm\html-beautify -> C:\Users\Home\AppData\Roaming\npm\node_modules\js-beautify\js\bin\html-beautify.js
C:\Users\Home\AppData\Roaming\npm\js-beautify -> C:\Users\Home\AppData\Roaming\npm\node_modules\js-beautify\js\bin\js-beautify.js
C:\Users\Home\AppData\Roaming\npm\css-beautify -> C:\Users\Home\AppData\Roaming\npm\node_modules\js-beautify\js\bin\css-beautify.js
js-beautify@1.5.6 C:\Users\Home\AppData\Roaming\npm\node_modules\js-beautify
+-- nopt@3.0.2 (abbrev@1.0.7)
+-- config-chain@1.1.9 (ini@1.3.4, proto-list@1.2.4)
+-- mkdirp@0.5.1 (minimist@0.0.8)

7.) Open WeBuilder and select "Plugins -> Manage Plugins" from the menu.
8.) Click "Install" and select the .ZIP file you downloaded in step 1.
9). You can now process your JavaScript files (or selections) through JS Beautifier directly in the editor.

If you want to change how JS Beautifier works, you can modify the JS Beautifier config files "jsbeautify.json", "cssbeautify.json", "htmlbeautify.json" and "jsbeautify.json". All located in the JSBeautifierWB plugin folder. (%USERPROFILE%\AppData\Roaming\Blumentals\WeBuilder\plugins\BeautifyWB)

Changes:
v1.1 - Progress bar added
v1.2 - Better layout. Window is now a modalbox
v2.0 - Rewrite of code. Progress bare now replaced with Busybox
v2.01 - Converts Unicode to Entities as a workaround for the TStringList SaveAsFile encoding problem.
v2.02 - Changed the Save/Load methods from using TSTringList to using ADODB.Stream. This fixes the encoding problem.

Feedback appreciated. ;)
(I only use WeBuilder, so I haven't tested if it works in HTMLPad, Rapid CSS or Rapid PHP.)
Attachments
BeautifyWB.zip
(9.49 KiB) Downloaded 9 times
Last edited by pmk65 on Thu Mar 16, 2017 12:13 pm, edited 5 times in total.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 326
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Plugin: JSBeautifyWB v1.0

Postby Aivars » Fri Jun 19, 2015 12:00 pm

Wow, this is great. Too bad about the node.js requirement, is there any way around it?
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 1940
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Plugin: JSBeautifyWB v1.0

Postby pmk65 » Fri Jun 19, 2015 3:49 pm

Aivars wrote:Wow, this is great. Too bad about the node.js requirement, is there any way around it?


Not unless you want to implement the python version instead. :)
But nodejs is extremely easy to install/use on Windows. As they now have a standard Windows installer, you don't have to seup servers, enviroment vars etc.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 326
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Plugin:BeautifyWB v2.0

Postby pmk65 » Sat Mar 11, 2017 11:45 pm

New version added.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 326
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark


Return to Plugins for HTMLPad / Rapid CSS / Rapid PHP / WeBuilder

Who is online

Users browsing this forum: No registered users and 1 guest

cron