Skip to content

Commit

Permalink
Updates README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Aug 17, 2014
1 parent a35b799 commit 044ac7f
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ sass2scss

[![Build Status](https://travis-ci.org/mgreter/sass2scss.svg?branch=master)](https://travis-ci.org/mgreter/sass2scss)

It may just work or is probably horribly broken!
C++ tool/library to convert indented sass syntax to the newer scss syntax. This
was initially a port of a previous perl implementation. Its primary intention
was to bring indented sass syntax support to [`libsass`](https://github.com/hcatlin/libsass).
`sass2scss` is included in `libsass` since [version 2.0](https://github.com/sass/libsass/releases/tag/v2.0).

C++ port of https://github.com/mgreter/OCBNET-CSS3/blob/master/bin/sass2scss.
This implementation is currently far ahead of the previous perl implementation!
Unit Tests
==========

Converts old indented sass syntax to newer scss syntax. My C++ is very rusty so it may
contain obvious errors and memory leaks. I only tested some basic examples from
http://sass-lang.com/documentation/file.INDENTED_SYNTAX.html. The scripts reads from STDIN
and writes to STDOUT, so you should be able to pipe sass files to scss processors.
I added around 60 unit tests for `sass2sccs` to the `libsass` perl binding
[`CSS-Sass`](https://github.com/mgreter/CSS-Sass/blob/master/t/05_sass2scss.t).

Added some unit tests for sass2scss to https://github.com/mgreter/CSS-Sass.

Options
=======
Command Line Utility
====================

```
sass2scss [options] < file.sass
Expand All @@ -30,3 +29,16 @@ sass2scss [options] < file.sass
-h, --help help text
-v, --version version information
```

`--pretty` can be repeated up to 3 times to add even more linefeeds (lf).

- 0: Write everything on one line (`minimized`)
- 1: Add lf after opening bracket (`lisp style`)
- 2: Add lf after opening and before closing bracket (`1TBS style`)
- 3: Add lf before/after opening and before closing (`allman style`)

The `listp style` is the only output style that should not alter the line count
of the input file. This is the best option if you still want to use `source-maps`,
since it should only change the source by a few inserted chars. So far
`sass2sccs` does not produce source-maps and `libsass` will not be able to
produce 100% accurate `source-maps` for indented sass syntax input files!

0 comments on commit 044ac7f

Please sign in to comment.