Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    bbjsbeautifypublic

    bbjsbeautify

    Run js-beautify on the javascript code in your frontmost (and saved) BBEdit document, and to either replace the contents in the filesystem or see the results in a window.

    Note that for now, BBEdit will tell you that the file was edited on the filesystem, and must be saved to retain the results from bbjsbeautify.

    install

    Use from BBEdit's Scripts menu by either installing or symlinking bbjsbeautify to BBEdit's Scripts folder. This is ~/Library/Application Support/BBEdit/Scripts or perhaps ~/Dropbox/Application Support/BBEdit/Scripts. You can show this folder from BBEdit by going to the scripts menu and choosing "Open Scripts Folder".

    npm install --global bbjsbeautify
    cd ~/Library/Application\ Support/BBEdit/Scripts
    ln -s `which bbjsbeautify`
    

    usage

    Please edit jsbeautify-opts.json to taste.

    There are three script files to choose from and hotkey:

    • index.js relies opts.replace to decide if the results are written or displayed.
    • display.js will not write to file, but will show results in an output window.
    • replace.js will overwrite the file with the results.

    acknowledgements

    Isao Yagi

    See bbresults. and bbjshint.

    license

    MIT

    install

    npm i bbjsbeautify

    Downloadsweekly downloads

    0

    version

    0.0.4

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar