Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format .TSS as using the 'JS/JSON' formatting #216

Closed
beezenees opened this issue Feb 19, 2015 · 2 comments
Closed

Format .TSS as using the 'JS/JSON' formatting #216

beezenees opened this issue Feb 19, 2015 · 2 comments
Assignees
Labels

Comments

@beezenees
Copy link

Hi, I had it set up where TSS(titanium style sheets) was using JSON formatting, and it works fine for beautifying (great spacing, formatting, etc). However, I have installed a tss syntax package and no longer will the Beautify run on the .tss files(invalid grammar). I was wondering if there's a way to force .tss files to be beautified with the json/js formatter? I tried to look at the source code and couldn't figure out where I could just make it get formatted with the JS/JSON formatter.

This would be a great help to any tss users.

Before JS formatting:

".container": {
  backgroundImage:'images/bgbg-builder.png',
  width: 1024,
  height: 752,
  top:0,
  left:0
},
"#blackArrow": {
  touchEnabled: false,
  backgroundImage: 'images/arrow-builder.png',
  width: 15,
  height: 10,
  top: 128,
  left: 165,
  pos0: {
    left: 165,
    duration: 200
  },
  pos1: {
    left: 301,
    duration: 200
  },
  pos2: {
    left: 437,
    duration: 200
  },
  pos3: {
    left: 573,
    duration: 200
  }
},

after..

".container": {
    backgroundImage: 'images/bgbg-builder.png',
    width: 1024,
    height: 752,
    top: 0,
    left: 0
},
"#blackArrow": {
    touchEnabled: false,
    backgroundImage: 'images/arrow-builder.png',
    width: 15,
    height: 10,
    top: 128,
    left: 165,
    pos0: {
        left: 165,
        duration: 200
    },
    pos1: {
        left: 301,
        duration: 200
    },
    pos2: {
        left: 437,
        duration: 200
    },
    pos3: {
        left: 573,
        duration: 200
    }
},
@Glavin001
Copy link
Owner

I am away for the next few days and when I am back I have exams, so it is unlikely I will resolve this issue personally. If you want to get this feature added, it sounds like you could submit a simple Pull Request with the appropriate grammar added to https://github.com/Glavin001/atom-beautify/blob/master/lib/language-options.coffee#L399 and with a sample TSS test file that passes it's beautification tests. Hope that helps!

@Glavin001 Glavin001 self-assigned this Feb 20, 2015
@Glavin001
Copy link
Owner

Duplicate of #122

By the way, thanks to @prettydiff, this is almost ready to be published!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants