Skip to content

Commit 2a5b8e2

Browse files
Johann-Srodneyrehm
authored andcommitted
docs(api): consistently use instance methods (#110)
1 parent 44db874 commit 2a5b8e2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/api.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ sass.options({
136136

137137
### Compiling strings
138138

139-
The `Sass.compile()` method compiles a SCSS source string (SASS) to CSS. See the [the response object](#the-response-object) below for details on the operation's resulting data structure.
139+
The `compile` method compiles a SCSS source string (SASS) to CSS. See the [the response object](#the-response-object) below for details on the operation's resulting data structure.
140140

141141
**NOTE:** To compile SASS source strings the option `indentedSyntax` needs to be set to `true`.
142142

@@ -146,7 +146,7 @@ sass.compile(source, function callback(result) {
146146
});
147147
```
148148

149-
It is possible to set options for a specific `Sass.compile()` call, rather than globally for all `Sass.compile()` calls. See [Sass.options()](#libsass-compile-options) for details:
149+
It is possible to set options for a specific `compile` call, rather than globally for all `compile` calls. See [Sass.options()](#libsass-compile-options) for details:
150150

151151
```js
152152
sass.compile(source, options, function callback(result) {
@@ -274,9 +274,10 @@ sass2.compile(source2, callback2);
274274
Chances are you want to use one of the readily available Sass mixins (e.g. [drublic/sass-mixins](https://github.com/drublic/Sass-Mixins) or [Bourbon](https://github.com/thoughtbot/bourbon)). While Sass.js doesn't feature a full-blown "loadBurbon()", registering individual files is possible:
275275

276276
```js
277-
Sass.writeFile('one.scss', '.one { width: 123px; }');
278-
Sass.writeFile('some-dir/two.scss', '.two { width: 123px; }');
279-
Sass.compile('@import "one"; @import "some-dir/two";', function(result) {
277+
var sass = new Sass();
278+
sass.writeFile('one.scss', '.one { width: 123px; }');
279+
sass.writeFile('some-dir/two.scss', '.two { width: 123px; }');
280+
sass.compile('@import "one"; @import "some-dir/two";', function(result) {
280281
console.log(result.text);
281282
});
282283
```

0 commit comments

Comments
 (0)