Giter Club home page Giter Club logo

brackets-beautify's Introduction

brackets-beautify

Brackets Extension that formats open HTML, CSS, and JavaScript files using js-beautify.

Compatible with Sprint 22 and above.

Installation

Search for "Beautify" in Extension Manager, then click on Install for Beautify by Drew Hamlett.

Alternative Install

Download zip and extract into arbitrary directory (or clone source files), then move the folder to the extensions folder (you can open this folder by clicking "Help > Show Extensions Folder" menu).

Usage

Edit > Beautify menu or Cmd-Shift-L(Mac) / Ctrl-Shift-L(Win) key.

SASS Formatting

You need to supply an absolute path to the sass-convert executble for SASS formatting to work.

On MacOSX you can go into terminal and type which sass-convert

Since I use rbenv for manageing Ruby versions it gave me this. /Users/drewh/.rbenv/shims/sass-convert

If you use system Ruby, when you do sudo gem install sass your path will be something like /usr/bin/sass-convert

On Windows your path will be something similiar to this. C:\\Ruby193\\bin\\sass-convert.bat

  • Now go open Brackets and go to Debug > Open Preferences File

It will look something like this.

{
    "useTabChar": false,
    "tabSize": 2,
    "spaceUnits": 2,
    "closeBrackets": true,
    "showLineNumbers": true,
    "styleActiveLine": false,
    "wordWrap": false,
    "linting.enabled": true,
    "linting.collapsed": false,
    "quickview.enabled": true
}

Now add "beautify.sassConvertPath": "/Users/drewh/.rbenv/shims/sass-convert" at the bottom. Change the path name to the path all the way to executable. The upcoming version will use me.drewh.jsbeautify.sassConvertPath as the key.

You will now be able to format scss files.

For windows add "beautify.sassConvertPath": "C:\\Ruby193\\bin\\sass-convert.bat"

Contributing

For any pull requesets dealing with the actual formatting or the source in beautify-css.js, beautify.js and beautify-html.js, please send to:

https://github.com/einars/js-beautify/issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.