Commit 80a470c4 by Adeel Mujahid

README: Fixes (and reduces) code indentation.

parent ca600f02
...@@ -46,8 +46,8 @@ sass.render({ ...@@ -46,8 +46,8 @@ sass.render({
}); });
// OR // OR
var result = sass.renderSync({ var result = sass.renderSync({
data: scss_content data: scss_content
[, options..] [, options..]
}); });
``` ```
...@@ -109,16 +109,16 @@ The API for using node-sass has changed, so that now there is only one variable ...@@ -109,16 +109,16 @@ The API for using node-sass has changed, so that now there is only one variable
```javascript ```javascript
var sass = require('node-sass'); var sass = require('node-sass');
sass.render({ sass.render({
file: '/path/to/myFile.scss', file: '/path/to/myFile.scss',
data: 'body{background:blue; a{color:black;}}', data: 'body{background:blue; a{color:black;}}',
success: function(result) { success: function(result) {
// result is an object: v2 change // result is an object: v2 change
console.log(result.css); console.log(result.css);
console.log(result.stats); console.log(result.stats);
console.log(result.map) console.log(result.map)
}, },
error: function(error) { error: function(error) {
// error is an object: v2 change // error is an object: v2 change
console.log(error.message); console.log(error.message);
console.log(error.code); console.log(error.code);
}, },
...@@ -141,7 +141,7 @@ sass.render({ ...@@ -141,7 +141,7 @@ sass.render({
}); });
// OR // OR
var result = sass.renderSync({ var result = sass.renderSync({
file: '/path/to/file.scss', file: '/path/to/file.scss',
data: 'body{background:blue; a{color:black;}}', data: 'body{background:blue; a{color:black;}}',
outputStyle: 'compressed', outputStyle: 'compressed',
outFile: '/to/my/output.css', outFile: '/to/my/output.css',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment