You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LibSass is just a library. To run the code locally (i.e. to compile your stylesheets), you need an implementer. SassC (get it?) is an implementer written in C. There are a number of other implementations of LibSass - for example Node. We encourage you to write your own port - the whole point of Libsass is that we want to bring Sass to many other languages, not just Ruby!
4
+
LibSass is just a library. To run the code locally (i.e. to compile your stylesheets), you need an implementer. SassC (get it?) is an implementer written in C. There are a number of other implementations of LibSass - for example Node. We encourage you to write your own port - the whole point of LibSass is that we want to bring Sass to many other languages, not just Ruby!
5
5
6
6
We're working hard on moving to full parity with Ruby Sass... learn more at the [The-LibSass-Compatibility-Plan](compatibility-plan.md)!
7
7
8
-
### Implementing libsass
8
+
### Implementing LibSass
9
9
10
-
If you're interested in implementing libsass in your own project see the [API Documentation](api-doc.md) which now includes implementing
11
-
your own [Sass functions](api-function.md). You may wish to [look at other implementations](implementations.md) for your language of choice.
10
+
If you're interested in implementing LibSass in your own project see the [API Documentation](api-doc.md) which now includes implementing
11
+
your own [Sass functions](api-function.md). You may wish to [look at other implementations](implementations.md) for your language of choice.
12
12
Or make your own!
13
13
14
-
### Contributing to libsass
14
+
### Contributing to LibSass
15
15
16
16
| Issue Tracker | Issue Triage | Community Guidelines |
| We're always needing help, so checkout our issue tracker, help some people out, and read our article on [Contributing](contributing.md)! It's got all the details on what to do! | To help understand the process of triaging bugs, have a look at our [Issue-Triage](triage.md) document. | Oh, and don't forget we always follow [[Sass Community Guidelines|http://sass-lang.com/community-guidelines]]. Be nice and everyone else will be nice too! |
18
+
| We're always needing help, so check out our issue tracker, help some people out, and read our article on [Contributing](contributing.md)! It's got all the details on what to do! | To help understand the process of triaging bugs, have a look at our [Issue-Triage](triage.md) document. | Oh, and don't forget we always follow [[Sass Community Guidelines|http://sass-lang.com/community-guidelines]]. Be nice and everyone else will be nice too! |
19
19
20
-
Please refer to the steps on [Building Libsass](build.md)
20
+
Please refer to the steps on [Building LibSass](build.md)
Copy file name to clipboardExpand all lines: docs/api-doc.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
## Introduction
2
2
3
-
Libsass wouldn't be much good without a way to interface with it. These interface documentations describe the various functions and data structures available to implementers. They are split up over three major components, which have all their own source files (plus some common functionality).
3
+
LibSass wouldn't be much good without a way to interface with it. These interface documentations describe the various functions and data structures available to implementers. They are split up over three major components, which have all their own source files (plus some common functionality).
4
4
5
5
-[Sass Context](api-context.md) - Trigger and handle the main Sass compilation
6
-
-[Sass Value](api-value.md) - Exchange values and its format with libsass
7
-
-[Sass Function](api-function.md) - Get invoked by libsass for function statments
8
-
-[Sass Importer](api-importer.md) - Get invoked by libsass for @import statments
6
+
-[Sass Value](api-value.md) - Exchange values and its format with LibSass
7
+
-[Sass Function](api-function.md) - Get invoked by LibSass for function statments
8
+
-[Sass Importer](api-importer.md) - Get invoked by LibSass for @import statments
9
9
10
10
### Basic usage
11
11
12
-
First you will need to include the header file!
12
+
First you will need to include the header file!
13
13
This will automatically load all other headers too!
14
14
15
15
```C
@@ -18,7 +18,7 @@ This will automatically load all other headers too!
18
18
19
19
### Deprecated usage
20
20
21
-
The old API is kept in the source for backward compatibility.
21
+
The old API is kept in the source for backward compatibility.
22
22
It's deprecated and incompatible with this documentation, use `sass/context.h`!
23
23
24
24
```C
@@ -33,7 +33,7 @@ It's deprecated and incompatible with this documentation, use `sass/context.h`!
The most important is your sass file (or string of sass code). With this, you will want to start a libsass compiler. Here is some pseudocode describing the process. The compiler has two different modes: direct input as a string with `Sass_Data_Context` or libsass will do file reading for you by using `Sass_File_Context`. See the code for a list of options available [Sass_Options](https://github.com/sass/libsass/blob/36feef0/include/sass/interface.h#L18)
54
+
The most important is your sass file (or string of sass code). With this, you will want to start a LibSass compiler. Here is some pseudocode describing the process. The compiler has two different modes: direct input as a string with `Sass_Data_Context` or LibSass will do file reading for you by using `Sass_File_Context`. See the code for a list of options available [Sass_Options](https://github.com/sass/libsass/blob/36feef0/include/sass/interface.h#L18)
This mirrors very well how `libsass` uses these structures.
109
109
110
110
-`Sass_Options` holds everything you feed in before the compilation. It also hosts `input_path` and `output_path` options, because they are used to generate/calculate relative links in source-maps. The `input_path` is shared with `Sass_File_Context`.
111
-
-`Sass_Context` holds all the data returned by the compilation step.
111
+
-`Sass_Context` holds all the data returned by the compilation step.
112
112
-`Sass_File_Context` is a specific implementation that requires no additional fields
113
113
-`Sass_Data_Context` is a specific implementation that adds the `input_source` field
114
114
@@ -126,31 +126,31 @@ Be aware that `libsass` does not write the output file itself. This option merel
126
126
127
127
## Error Codes
128
128
129
-
The `error_code` is integer value which indicates the type of error that occurred inside the libsass process. Following is the list of error codes along with the short description:
129
+
The `error_code` is integer value which indicates the type of error that occurred inside the LibSass process. Following is the list of error codes along with the short description:
130
130
131
131
* 1: normal errors like parsing or `eval` errors
132
132
* 2: bad allocation error (memory error)
133
133
* 3: "untranslated" C++ exception (`throw std::exception`)
Although for the API consumer, error codes do not offer much value except indicating whether *any* error occurred during the compilation, it helps debugging the libsass internal code paths.
137
+
Although for the API consumer, error codes do not offer much value except indicating whether *any* error occurred during the compilation, it helps debugging the LibSass internal code paths.
138
138
139
139
## Real-World Implementations
140
140
141
-
The proof is in the pudding, so we have highlighted a few implementations that should be on par with the latest libsass interface version. Some of them may not have all features implemented!
141
+
The proof is in the pudding, so we have highlighted a few implementations that should be on par with the latest LibSass interface version. Some of them may not have all features implemented!
We use a functional API to make dynamic linking more robust and future compatible. The API is not yet 100% stable, so we do not yet guarantee ABI forward compatibility. We will do so, once we increase the shared library version above 1.0.
149
+
We use a functional API to make dynamic linking more robust and future compatible. The API is not yet 100% stable, so we do not yet guarantee [ABI](https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) forward compatibility. We will do so, once we increase the shared library version above 1.0.
150
150
151
151
## Plugins (experimental)
152
152
153
-
Libsass can load plugins from directories. Just define `plugin_path` on context options to load all plugins from the given directories. To implement plugins, please consult the [[Wiki-Page for plugins|API-Plugins]].
153
+
LibSass can load plugins from directories. Just define `plugin_path` on context options to load all plugins from the given directories. To implement plugins, please consult the [[Wiki-Page for plugins|API-Plugins]].
0 commit comments