Showing preview only (1,925K chars total). Download the full file or copy to clipboard to get everything.
Repository: sass/node-sass
Branch: master
Commit: 107ded9434cf
Files: 359
Total size: 1.8 MB
Directory structure:
gitextract_uxldy4j8/
├── .editorconfig
├── .eslintrc.json
├── .gitattributes
├── .github/
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE/
│ │ ├── Bug_report.md
│ │ └── Feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── alpine.yml
│ ├── coverage.yml
│ ├── lint-js.yml
│ ├── linux.yml
│ ├── macos.yml
│ └── windows.yml
├── .gitignore
├── .mailmap
├── .nycrc.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── TROUBLESHOOTING.md
├── appveyor.yml
├── bin/
│ └── node-sass
├── binding.gyp
├── lib/
│ ├── binding.js
│ ├── errors.js
│ ├── extensions.js
│ ├── index.js
│ ├── render.js
│ └── watcher.js
├── memory-tests/
│ ├── _measure.js
│ ├── boolean.js
│ ├── function-bridge.js
│ ├── map.js
│ └── string.js
├── package.json
├── scripts/
│ ├── build.js
│ ├── install.js
│ ├── prepublish.js
│ └── util/
│ ├── downloadoptions.js
│ ├── proxy.js
│ ├── rejectUnauthorized.js
│ └── useragent.js
├── src/
│ ├── binding.cpp
│ ├── callback_bridge.h
│ ├── create_string.cpp
│ ├── create_string.h
│ ├── custom_function_bridge.cpp
│ ├── custom_function_bridge.h
│ ├── custom_importer_bridge.cpp
│ ├── custom_importer_bridge.h
│ ├── libsass/
│ │ ├── .editorconfig
│ │ ├── .gitattributes
│ │ ├── .github/
│ │ │ ├── CONTRIBUTING.md
│ │ │ └── ISSUE_TEMPLATE.md
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── COPYING
│ │ ├── GNUmakefile.am
│ │ ├── INSTALL
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── Makefile.conf
│ │ ├── Readme.md
│ │ ├── SECURITY.md
│ │ ├── appveyor.yml
│ │ ├── configure.ac
│ │ ├── contrib/
│ │ │ ├── libsass.spec
│ │ │ └── plugin.cpp
│ │ ├── docs/
│ │ │ ├── README.md
│ │ │ ├── api-context-example.md
│ │ │ ├── api-context-internal.md
│ │ │ ├── api-context.md
│ │ │ ├── api-doc.md
│ │ │ ├── api-function-example.md
│ │ │ ├── api-function-internal.md
│ │ │ ├── api-function.md
│ │ │ ├── api-importer-example.md
│ │ │ ├── api-importer-internal.md
│ │ │ ├── api-importer.md
│ │ │ ├── api-value-example.md
│ │ │ ├── api-value-internal.md
│ │ │ ├── api-value.md
│ │ │ ├── build-on-darwin.md
│ │ │ ├── build-on-gentoo.md
│ │ │ ├── build-on-windows.md
│ │ │ ├── build-shared-library.md
│ │ │ ├── build-with-autotools.md
│ │ │ ├── build-with-makefiles.md
│ │ │ ├── build-with-mingw.md
│ │ │ ├── build-with-visual-studio.md
│ │ │ ├── build.md
│ │ │ ├── compatibility-plan.md
│ │ │ ├── contributing.md
│ │ │ ├── custom-functions-internal.md
│ │ │ ├── dev-ast-memory.md
│ │ │ ├── implementations.md
│ │ │ ├── plugins.md
│ │ │ ├── setup-environment.md
│ │ │ ├── source-map-internals.md
│ │ │ ├── trace.md
│ │ │ ├── triage.md
│ │ │ └── unicode.md
│ │ ├── extconf.rb
│ │ ├── include/
│ │ │ ├── sass/
│ │ │ │ ├── base.h
│ │ │ │ ├── context.h
│ │ │ │ ├── functions.h
│ │ │ │ ├── values.h
│ │ │ │ ├── version.h
│ │ │ │ └── version.h.in
│ │ │ ├── sass.h
│ │ │ └── sass2scss.h
│ │ ├── m4/
│ │ │ ├── .gitkeep
│ │ │ └── m4-ax_cxx_compile_stdcxx_11.m4
│ │ ├── res/
│ │ │ └── resource.rc
│ │ ├── script/
│ │ │ ├── bootstrap
│ │ │ ├── branding
│ │ │ ├── ci-build-libsass
│ │ │ ├── ci-build-plugin
│ │ │ ├── ci-install-compiler
│ │ │ ├── ci-install-deps
│ │ │ ├── ci-report-coverage
│ │ │ ├── spec
│ │ │ ├── tap-driver
│ │ │ ├── tap-runner
│ │ │ └── test-leaks.pl
│ │ ├── src/
│ │ │ ├── GNUmakefile.am
│ │ │ ├── ast.cpp
│ │ │ ├── ast.hpp
│ │ │ ├── ast_def_macros.hpp
│ │ │ ├── ast_fwd_decl.cpp
│ │ │ ├── ast_fwd_decl.hpp
│ │ │ ├── b64/
│ │ │ │ ├── cencode.h
│ │ │ │ └── encode.h
│ │ │ ├── backtrace.cpp
│ │ │ ├── backtrace.hpp
│ │ │ ├── base64vlq.cpp
│ │ │ ├── base64vlq.hpp
│ │ │ ├── bind.cpp
│ │ │ ├── bind.hpp
│ │ │ ├── c99func.c
│ │ │ ├── cencode.c
│ │ │ ├── check_nesting.cpp
│ │ │ ├── check_nesting.hpp
│ │ │ ├── color_maps.cpp
│ │ │ ├── color_maps.hpp
│ │ │ ├── constants.cpp
│ │ │ ├── constants.hpp
│ │ │ ├── context.cpp
│ │ │ ├── context.hpp
│ │ │ ├── cssize.cpp
│ │ │ ├── cssize.hpp
│ │ │ ├── debug.hpp
│ │ │ ├── debugger.hpp
│ │ │ ├── emitter.cpp
│ │ │ ├── emitter.hpp
│ │ │ ├── environment.cpp
│ │ │ ├── environment.hpp
│ │ │ ├── error_handling.cpp
│ │ │ ├── error_handling.hpp
│ │ │ ├── eval.cpp
│ │ │ ├── eval.hpp
│ │ │ ├── expand.cpp
│ │ │ ├── expand.hpp
│ │ │ ├── extend.cpp
│ │ │ ├── extend.hpp
│ │ │ ├── file.cpp
│ │ │ ├── file.hpp
│ │ │ ├── functions.cpp
│ │ │ ├── functions.hpp
│ │ │ ├── inspect.cpp
│ │ │ ├── inspect.hpp
│ │ │ ├── json.cpp
│ │ │ ├── json.hpp
│ │ │ ├── kwd_arg_macros.hpp
│ │ │ ├── lexer.cpp
│ │ │ ├── lexer.hpp
│ │ │ ├── listize.cpp
│ │ │ ├── listize.hpp
│ │ │ ├── mapping.hpp
│ │ │ ├── memory/
│ │ │ │ ├── SharedPtr.cpp
│ │ │ │ └── SharedPtr.hpp
│ │ │ ├── node.cpp
│ │ │ ├── node.hpp
│ │ │ ├── operation.hpp
│ │ │ ├── operators.cpp
│ │ │ ├── operators.hpp
│ │ │ ├── output.cpp
│ │ │ ├── output.hpp
│ │ │ ├── parser.cpp
│ │ │ ├── parser.hpp
│ │ │ ├── paths.hpp
│ │ │ ├── plugins.cpp
│ │ │ ├── plugins.hpp
│ │ │ ├── position.cpp
│ │ │ ├── position.hpp
│ │ │ ├── prelexer.cpp
│ │ │ ├── prelexer.hpp
│ │ │ ├── remove_placeholders.cpp
│ │ │ ├── remove_placeholders.hpp
│ │ │ ├── sass.cpp
│ │ │ ├── sass.hpp
│ │ │ ├── sass2scss.cpp
│ │ │ ├── sass_context.cpp
│ │ │ ├── sass_context.hpp
│ │ │ ├── sass_functions.cpp
│ │ │ ├── sass_functions.hpp
│ │ │ ├── sass_util.cpp
│ │ │ ├── sass_util.hpp
│ │ │ ├── sass_values.cpp
│ │ │ ├── sass_values.hpp
│ │ │ ├── source_map.cpp
│ │ │ ├── source_map.hpp
│ │ │ ├── subset_map.cpp
│ │ │ ├── subset_map.hpp
│ │ │ ├── support/
│ │ │ │ └── libsass.pc.in
│ │ │ ├── to_c.cpp
│ │ │ ├── to_c.hpp
│ │ │ ├── to_value.cpp
│ │ │ ├── to_value.hpp
│ │ │ ├── units.cpp
│ │ │ ├── units.hpp
│ │ │ ├── utf8/
│ │ │ │ ├── checked.h
│ │ │ │ ├── core.h
│ │ │ │ └── unchecked.h
│ │ │ ├── utf8.h
│ │ │ ├── utf8_string.cpp
│ │ │ ├── utf8_string.hpp
│ │ │ ├── util.cpp
│ │ │ ├── util.hpp
│ │ │ ├── values.cpp
│ │ │ └── values.hpp
│ │ ├── test/
│ │ │ ├── test_node.cpp
│ │ │ ├── test_paths.cpp
│ │ │ ├── test_selector_difference.cpp
│ │ │ ├── test_specificity.cpp
│ │ │ ├── test_subset_map.cpp
│ │ │ ├── test_superselector.cpp
│ │ │ └── test_unification.cpp
│ │ ├── version.sh
│ │ └── win/
│ │ ├── libsass.sln
│ │ ├── libsass.sln.DotSettings
│ │ ├── libsass.targets
│ │ ├── libsass.vcxproj
│ │ └── libsass.vcxproj.filters
│ ├── libsass.gyp
│ ├── sass_context_wrapper.cpp
│ ├── sass_context_wrapper.h
│ └── sass_types/
│ ├── boolean.cpp
│ ├── boolean.h
│ ├── color.cpp
│ ├── color.h
│ ├── error.cpp
│ ├── error.h
│ ├── factory.cpp
│ ├── factory.h
│ ├── list.cpp
│ ├── list.h
│ ├── map.cpp
│ ├── map.h
│ ├── null.cpp
│ ├── null.h
│ ├── number.cpp
│ ├── number.h
│ ├── sass_value_wrapper.h
│ ├── string.cpp
│ ├── string.h
│ └── value.h
└── test/
├── api.js
├── binding.js
├── cli.js
├── downloadoptions.js
├── errors.js
├── fixtures/
│ ├── compressed/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── custom-functions/
│ │ ├── setter-expected.css
│ │ ├── setter.scss
│ │ ├── string-conversion-expected.css
│ │ └── string-conversion.scss
│ ├── cwd-include-path/
│ │ ├── expected.css
│ │ ├── outside.scss
│ │ └── root/
│ │ └── index.scss
│ ├── depth-first/
│ │ ├── _common.scss
│ │ ├── _struct.scss
│ │ ├── _vars.scss
│ │ ├── a.scss
│ │ ├── a1.scss
│ │ ├── b.scss
│ │ ├── b1.scss
│ │ ├── expected.css
│ │ └── index.scss
│ ├── extras/
│ │ ├── my_custom_arrays_of_importers.js
│ │ ├── my_custom_functions_setter.js
│ │ ├── my_custom_functions_string_conversion.js
│ │ ├── my_custom_importer_data.js
│ │ ├── my_custom_importer_data_cb.js
│ │ ├── my_custom_importer_error.js
│ │ ├── my_custom_importer_file.js
│ │ ├── my_custom_importer_file_and_data.js
│ │ ├── my_custom_importer_file_and_data_cb.js
│ │ └── my_custom_importer_file_cb.js
│ ├── follow/
│ │ └── foo/
│ │ └── bar/
│ │ └── index.scss
│ ├── include-files/
│ │ ├── bar.scss
│ │ ├── chained-imports-with-custom-importer.scss
│ │ ├── expected-data-importer.css
│ │ ├── expected-file-importer.css
│ │ ├── expected-importer.css
│ │ ├── file-not-processed-by-loader.scss
│ │ ├── file-processed-by-loader.scss
│ │ ├── foo.scss
│ │ └── index.scss
│ ├── include-path/
│ │ ├── expected.css
│ │ ├── functions/
│ │ │ └── colorBlue.scss
│ │ ├── index.scss
│ │ └── lib/
│ │ └── vars.scss
│ ├── indent/
│ │ ├── expected.css
│ │ └── index.sass
│ ├── input-directory/
│ │ └── sass/
│ │ ├── _skipped.scss
│ │ ├── nested/
│ │ │ └── three.scss
│ │ ├── one.scss
│ │ └── two.scss
│ ├── invalid/
│ │ └── index.scss
│ ├── output-directory/
│ │ └── index.scss
│ ├── precision/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── sass-path/
│ │ ├── expected-orange.css
│ │ ├── expected-red.css
│ │ ├── index.scss
│ │ ├── orange/
│ │ │ └── colors.scss
│ │ └── red/
│ │ └── colors.scss
│ ├── simple/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── source-comments/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── source-map/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── source-map-embed/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── watcher/
│ │ ├── main/
│ │ │ ├── one.scss
│ │ │ ├── partials/
│ │ │ │ ├── _one.scss
│ │ │ │ ├── _three.scss
│ │ │ │ └── _two.scss
│ │ │ ├── three.scss
│ │ │ └── two.scss
│ │ └── sibling/
│ │ ├── partials/
│ │ │ └── _three.scss
│ │ └── three.scss
│ ├── watching/
│ │ ├── bar.sass
│ │ ├── index.sass
│ │ ├── index.scss
│ │ └── white.scss
│ ├── watching-dir-01/
│ │ └── index.scss
│ └── watching-dir-02/
│ ├── foo.scss
│ └── index.scss
├── lowlevel.js
├── runtime.js
├── scripts/
│ └── util/
│ └── proxy.js
├── types.js
├── useragent.js
└── watcher.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
================================================
FILE: .eslintrc.json
================================================
{
"env": {
"es6": true,
"node": true
},
"globals": {},
"extends": "eslint:recommended",
"overrides": [
{
"files": [
"test/**/*.js"
],
"env": {
"mocha": true
}
}
],
"rules": {
"no-bitwise": 2,
"curly": 2,
"eqeqeq": 2,
"no-unused-expressions": [
2,
{
"allowTernary": true
}
],
"wrap-iife": [
2,
"any"
],
"indent": [
2,
2,
{
"SwitchCase": 1
}
],
"linebreak-style": 2,
"no-multi-str": 2,
"new-cap": 2,
"no-caller": 2,
"quotes": [
2,
"single"
],
"semi": 2,
"block-scoped-var": 2
}
}
================================================
FILE: .gitattributes
================================================
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
# Declare files that will always have LF line endings on checkout.
*.c text eol=lf
*.css text eol=lf
*.cpp text eol=lf
.editorconfig text eol=lf
.gitattributes text eol=lf
.gitignore text eol=lf
.gitmodules text eol=lf
*.gyp text eol=lf
*.h text eol=lf
*.hpp text eol=lf
*.js text eol=lf
*.json text eol=lf
LICENSE text eol=lf
*.md text eol=lf
node-sass text eol=lf
*.sass text eol=lf
*.scss text eol=lf
*.svg text eol=lf
# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf
*.cmd text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.gif binary
*.jpg binary
*.node binary
*.png binary
================================================
FILE: .github/CONTRIBUTING.md
================================================
## Contributing
* Fork the project.
* Make your feature addition or bug fix.
* Add documentation if necessary.
* Add tests for it. This is important so I don't break it in a future version unintentionally.
* Send a pull request. Bonus points for topic branches.
## Bug reports
A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful, so thanks!
Guidelines for bug reports:
1. **Use the GitHub issue search** — check if the issue has already been
reported.
2. **Check if the issue has been fixed** — try to reproduce it using the
latest `master` branch in the repository.
3. **Isolate the problem** — ideally create an
[SSCCE](http://www.sscce.org/) and a live example.
4. Always consult the [Troubleshooting guide](/TROUBLESHOOTING.md) before opening a new issue.
A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? Do other browsers show the bug differently? What would you expect to be the outcome? All these details will help people to fix any potential bugs.
If you are facing binary related issues, please create a gist (see [Creating gists on GitHub](https://help.github.com/articles/creating-gists/)) with the output of this set of commands:
* For *nix: https://gist.github.com/am11/9f429c211822a9b15aee.
* For win: https://gist.github.com/am11/e5de3c49c219f0811e1d.
If this project is missing an API or command line flag that has been added to [libsass], then please open an issue here. We will then look at updating our [libsass] submodule and create a new release. You can help us create the new release by rebuilding binaries, and then creating a pull request to the [node-sass-binaries](https://github.com/sass/node-sass-binaries) repo.
### Testing a bugfix:
1. Ensure the `master` branch is up-to-date with: `git checkout master; git pull`
2. Create a new Git branch and make your changes. `git checkout -b name-of-new-branch`
3. Install all the node.js dependencies of node-sass with: `npm install`
4. Ensure the tests pass with: `npm test`
If the bug fix requires modifying any of the C++ files in the src/ directory, you'll need to re-build the bindings to libSass.
1. Build the libSass bindings for node-sass with: `npm run-script build`
Alternatively, the `scripts/build.js` build script has several different command line flags that can be passed by running: `node scripts/build.js -[flag]`
## Reporting Sass compilation and syntax issues
Please check for [issues on the libsass repo](https://github.com/hcatlin/libsass/issues) (as there is a good chance that it may already be an issue there for it), and otherwise [create a new issue there](https://github.com/sass/libsass/issues/new).
[libsass]: https://github.com/sass/libsass
================================================
FILE: .github/ISSUE_TEMPLATE/Bug_report.md
================================================
---
name: Bug report
about: If you're having an issue with installing node-sass or the compiled results
look incorrect
---
<!--
Before opening an Install issue:
- If you're running Node 13, you must be running node-sass 4.13.
- Check that the version of node-sass you're trying to install supports your version of Node by looking at the release page for that version https://github.com/sass/node-sass/releases
- If you're running the latest versions of Node, you'll likely need the latest node-sass, we don't backport support to old versions of node-sass
- Read the common workarounds in https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md
- Common issues we're tracking can be found by looking at the `Pinned` label https://github.com/sass/node-sass/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3APinned+
**When reporting any bug, YOU MUST PROVIDE THE FOLLOWING INFORMATION
or your issue will be closed without discussion**
-->
- NPM version (`npm -v`):
- Node version (`node -v`):
- Node Process (`node -p process.versions`):
- Node Platform (`node -p process.platform`):
- Node architecture (`node -p process.arch`):
- node-sass version (`node -p "require('node-sass').info"`):
- npm node-sass versions (`npm ls node-sass`):
<!--
When encountering a syntax, or compilation issue:
- Please note that we cannot backport fixes to old versions, so ensure that you are running the latest release https://github.com/sass/node-sass/releases
- Search for duplicate or closed issues https://github.com/sass/node-sass/issues?utf8=%E2%9C%93&q=is%3Aissue
- Validate with http://sassmeister.com/ that the code works with Ruby Sass, then open an issue on `LibSass` https://github.com/sass/LibSass/issues/new
Sorry you didn't have the experience you expected.
-->
================================================
FILE: .github/ISSUE_TEMPLATE/Feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
---
<!--
Before you request a feature, please realize this project is a wrapper for
LibSass so we can't add any language features here. If you want to add a feature
to the Sass language, please open an issue on https://github.com/sass/sass/issues/new
If you want a CLI feature, please make sure that it is supported by https://github.com/sass/sass
Thanks for making node-sass better!
-->
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
open-pull-requests-limit: 99
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
open-pull-requests-limit: 99
schedule:
interval: "weekly"
================================================
FILE: .github/workflows/alpine.yml
================================================
name: Build bindings for Alpine releases
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container:
image: node:${{ matrix.node }}-alpine
strategy:
fail-fast: false
matrix:
node:
- 16
- 18
- 19
- 20
steps:
- name: Install Alpine build tools
run: apk add --no-cache python3 make git gcc g++
- uses: actions/checkout@v4
- name: Install packages
run: npm install --unsafe-perm
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true
- name: Run tests
run: npm test
- uses: actions/upload-artifact@v3
if: github.repository_owner == 'sass' && github.event_name != 'pull_request'
with:
name: ${{ matrix.node }}
path: vendor/
================================================
FILE: .github/workflows/coverage.yml
================================================
name: Coverage
on:
push:
branches-ignore:
- "dependabot/**"
paths:
- ".nycrc.json"
- "**/*.js"
- "test/**"
- "package.json"
- "bin/node-sass"
- ".github/workflows/coverage.yml"
pull_request:
paths:
- ".nycrc.json"
- "**/*.js"
- "test/**"
- "package.json"
- "bin/node-sass"
- ".github/workflows/coverage.yml"
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'sass'
steps:
- uses: actions/checkout@v4
- name: Install packages
run: npm install --unsafe-perm
- name: Run Coverage
run: npm run coverage
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/lint-js.yml
================================================
name: Lint JS
on:
push:
branches-ignore:
- "dependabot/**"
paths:
- "**/*.js"
- ".eslintrc.json"
- "package.json"
- "bin/node-sass"
- ".github/workflows/lint-js.yml"
pull_request:
paths:
- "**/*.js"
- ".eslintrc.json"
- "package.json"
- "bin/node-sass"
- ".github/workflows/lint-js.yml"
jobs:
build:
runs-on: ubuntu-latest
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install packages
run: npm install --unsafe-perm
- name: Run Linting
run: npm run lint
================================================
FILE: .github/workflows/linux.yml
================================================
name: Build bindings for Linux releases
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- node: 16
gcc: "gcc-8"
gpp: "g++-8"
os: ubuntu-20.04
- node: 18
gcc: "gcc-8"
gpp: "g++-8"
os: ubuntu-20.04
- node: 19
gcc: "gcc-8"
gpp: "g++-8"
os: ubuntu-20.04
- node: 20
gcc: "gcc-10"
gpp: "g++-10"
os: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Setup GCC/G++
run: sudo apt-get install ${{ matrix.gcc }} ${{ matrix.gpp }}
- name: Install packages
run: npm install --unsafe-perm
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true
CC: ${{ matrix.gcc }}
CXX: ${{ matrix.gpp }}
LINK: ${{ matrix.gcc }}
LINKXX: ${{ matrix.gpp }}
- name: Run tests
run: npm test
- uses: actions/upload-artifact@v3
if: github.repository_owner == 'sass' && github.event_name != 'pull_request'
with:
name: ${{ matrix.node }}
path: vendor/
================================================
FILE: .github/workflows/macos.yml
================================================
name: Build bindings for macOS releases
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
jobs:
build:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
node:
- 16
- 18
- 19
- 20
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install packages
run: npm install --unsafe-perm
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true
- name: Run tests
run: npm test
- uses: actions/upload-artifact@v3
if: github.repository_owner == 'sass' && github.event_name != 'pull_request'
with:
name: ${{ matrix.node }}
path: vendor/
================================================
FILE: .github/workflows/windows.yml
================================================
name: Build bindings for Windows releases
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
jobs:
build:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
node:
- 16
- 18
- 19
- 20
architecture:
- x64
- x86
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.architecture }}
- name: Install packages
run: npm install
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true
- name: Run tests
run: npm test
- uses: actions/upload-artifact@v3
if: github.repository_owner == 'sass' && github.event_name != 'pull_request'
with:
name: ${{ matrix.node }}-${{ matrix.architecture }}
path: |
vendor/**/binding.node
build/Release/binding.pdb
================================================
FILE: .gitignore
================================================
*.log
.DS_Store
.sass-cache
build
lib-cov
node_modules
vendor
test/html-report
test/lcov-report
test/lcov.info
test/fixtures/watching-css-out-01
test/fixtures/watching-css-out-02
coverage
package-lock.json
.nyc_output
================================================
FILE: .mailmap
================================================
Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
================================================
FILE: .nycrc.json
================================================
{
"all": true,
"include": [
"bin/*",
"lib/*.js",
"scripts/**/*.js"
],
"extension": [
"node-sass"
],
"reporter": [
"lcovonly"
]
}
================================================
FILE: CHANGELOG.md
================================================
## v4.14.0
https://github.com/sass/node-sass/releases/tag/v4.14.0
## v4.13.1
https://github.com/sass/node-sass/releases/tag/v4.13.1
## v4.13.0
https://github.com/sass/node-sass/releases/tag/v4.13.0
## v4.12.0
https://github.com/sass/node-sass/releases/tag/v4.12.0
## v4.11.0
https://github.com/sass/node-sass/releases/tag/v4.11.0
## v4.10.0
https://github.com/sass/node-sass/releases/tag/v4.10.0
## v4.9.4
https://github.com/sass/node-sass/releases/tag/v4.9.4
## v4.9.3
https://github.com/sass/node-sass/releases/tag/v4.9.3
## v4.9.2
https://github.com/sass/node-sass/releases/tag/v4.9.2
## v4.9.1
https://github.com/sass/node-sass/releases/tag/v4.9.1
## v4.9.0
https://github.com/sass/node-sass/releases/tag/v4.9.0
## v4.8.3
https://github.com/sass/node-sass/releases/tag/v4.8.3
## v4.8.2
https://github.com/sass/node-sass/releases/tag/v4.8.2
## v4.8.1
https://github.com/sass/node-sass/releases/tag/v4.8.1
## v4.8.0
https://github.com/sass/node-sass/releases/tag/v4.8.0
## v4.7.2
https://github.com/sass/node-sass/releases/tag/v4.7.2
## v4.7.1
https://github.com/sass/node-sass/releases/tag/v4.7.1
## v4.7.0
https://github.com/sass/node-sass/releases/tag/v4.7.0
## v4.6.1
https://github.com/sass/node-sass/releases/tag/v4.6.1
## v4.6.0
https://github.com/sass/node-sass/releases/tag/v4.6.0
## v4.5.0
https://github.com/sass/node-sass/releases/tag/v4.5.0
## v4.4.0
https://github.com/sass/node-sass/releases/tag/v4.4.0
## v4.3.0
https://github.com/sass/node-sass/releases/tag/v4.3.0
## v4.2.0
https://github.com/sass/node-sass/releases/tag/v4.2.0
## v4.1.1
https://github.com/sass/node-sass/releases/tag/v4.1.1
## v4.1.0
https://github.com/sass/node-sass/releases/tag/v4.1.0
## v4.0.0
https://github.com/sass/node-sass/releases/tag/v4.0.0
## v3.13.1
https://github.com/sass/node-sass/releases/tag/v3.13.1
## v3.13.0
https://github.com/sass/node-sass/releases/tag/v3.13.0
## v3.12.5
https://github.com/sass/node-sass/releases/tag/v3.12.5
## v3.12.4
https://github.com/sass/node-sass/releases/tag/v3.12.4
## v3.12.3
https://github.com/sass/node-sass/releases/tag/v3.12.3
## v3.12.2
https://github.com/sass/node-sass/releases/tag/v3.12.2
## v3.12.1
https://github.com/sass/node-sass/releases/tag/v3.12.1
## v3.12.0
https://github.com/sass/node-sass/releases/tag/v3.12.0
## v3.11.3
https://github.com/sass/node-sass/releases/tag/v3.11.3
## v3.11.2
https://github.com/sass/node-sass/releases/tag/v3.11.2
## v3.11.1
https://github.com/sass/node-sass/releases/tag/v3.11.1
## v3.11.0
https://github.com/sass/node-sass/releases/tag/v3.11.0
## v3.10.1
https://github.com/sass/node-sass/releases/tag/v3.10.1
## v3.10.0
https://github.com/sass/node-sass/releases/tag/v3.10.0
## v3.9.3
https://github.com/sass/node-sass/releases/tag/v3.9.3
## v3.9.2
(removed)
## v3.9.1
(removed)
## v3.9.0
https://github.com/sass/node-sass/releases/tag/v3.9.0
## v3.8.0
https://github.com/sass/node-sass/releases/tag/v3.8.0
## v3.7.0
https://github.com/sass/node-sass/releases/tag/v3.7.0
## v3.6.0
https://github.com/sass/node-sass/releases/tag/v3.6.0
## v3.5.3
https://github.com/sass/node-sass/releases/tag/v3.5.3
## v3.5.2
https://github.com/sass/node-sass/releases/tag/v3.5.2
## v3.5.1
https://github.com/sass/node-sass/releases/tag/v3.5.1
## v3.5.0
(removed)
## v3.4.2
https://github.com/sass/node-sass/releases/tag/v3.4.2
## v3.4.1
https://github.com/sass/node-sass/releases/tag/v3.4.1
## v3.4.0
https://github.com/sass/node-sass/releases/tag/v3.4.0
## v3.3.3
https://github.com/sass/node-sass/releases/tag/v3.3.3
## v3.3.2
https://github.com/sass/node-sass/releases/tag/v3.3.2
## v3.3.1
https://github.com/sass/node-sass/releases/tag/v3.3.1
## v3.3.0
https://github.com/sass/node-sass/releases/tag/v3.3.0
## v3.2.0
https://github.com/sass/node-sass/releases/tag/v3.2.0
## v3.1.2
https://github.com/sass/node-sass/releases/tag/v3.1.2
## v3.1.1
https://github.com/sass/node-sass/releases/tag/v3.1.1
## v3.1.0
https://github.com/sass/node-sass/releases/tag/v3.1.0
## v3.0.0
https://github.com/sass/node-sass/releases/tag/v3.0.0
================================================
FILE: CODE_OF_CONDUCT.md
================================================
Sass is more than a technology; Sass is driven by the community of individuals
that power its development and use every day. As a community, we want to embrace
the very differences that have made our collaboration so powerful, and work
together to provide the best environment for learning, growing, and sharing of
ideas. It is imperative that we keep Sass a fun, welcoming, challenging, and
fair place to play.
[The full community guidelines can be found on the Sass website.][link]
[link]: https://sass-lang.com/community-guidelines
================================================
FILE: LICENSE
================================================
Copyright (c) 2013-2016 Andrew Nesbitt
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# node-sass
**Warning:** [Node Sass has reached end of life]. It will receive no more
releases, even for security fixes. Projects that still use it should move onto
[Dart Sass](https://sass-lang.com/dart-sass).
[Node Sass has reached end of life]: https://sass-lang.com/blog/node-sass-is-end-of-life
## Node version support policy
1. Supported Node.js versions vary by release, please consult the [releases page](https://github.com/sass/node-sass/releases).
1. Node versions that hit end of life <https://github.com/nodejs/Release>, will be dropped from support at each node-sass release (major, minor).
1. We will stop building binaries for unsupported releases, testing for breakages in dependency compatibility, but we will not block installations for those that want to support themselves.
1. New node release require minor internal changes along with support from CI providers (AppVeyor, GitHub Actions). We will open a single issue for interested parties to subscribe to, and close additional issues.
Below is a quick guide for minimum and maximum supported versions of node-sass:
NodeJS | Supported node-sass version | Node Module
--------|-----------------------------|------------
Node 20 | 9.0+ | 115
Node 19 | 8.0+ | 111
Node 18 | 8.0+ | 108
Node 17 | 7.0+, <8.0 | 102
Node 16 | 6.0+ | 93
Node 15 | 5.0+, <7.0 | 88
Node 14 | 4.14+, <9.0 | 83
Node 13 | 4.13+, <5.0 | 79
Node 12 | 4.12+, <8.0 | 72
Node 11 | 4.10+, <5.0 | 67
Node 10 | 4.9+, <6.0 | 64
Node 8 | 4.5.3+, <5.0 | 57
Node <8 | <5.0 | <57
<table>
<tr>
<td>
<img width="77px" alt="Sass logo" src="https://rawgit.com/sass/node-sass/master/media/logo.svg" />
</td>
<td valign="bottom" align="right">
<a href="https://www.npmjs.com/package/node-sass">
<img width="100%" src="https://nodei.co/npm/node-sass.png?downloads=true&downloadRank=true&stars=true">
</a>
</td>
</tr>
</table>





[](https://ci.appveyor.com/project/sass/node-sass/branch/master)
[](https://coveralls.io/r/sass/node-sass?branch=master)
Node-sass is a library that provides binding for Node.js to [LibSass], the C version of the popular stylesheet preprocessor, Sass.
It allows you to natively compile .scss files to css at incredible speed and automatically via a connect middleware.
Find it on npm: <https://www.npmjs.com/package/node-sass>
Follow @nodesass on twitter for release updates: <https://twitter.com/nodesass>
## Install
```shell
npm install node-sass
```
Some users have reported issues installing on Ubuntu due to `node` being registered to another package. [Follow the official NodeJS docs](https://github.com/nodesource/distributions/blob/master/README.md#debinstall) to install NodeJS so that `#!/usr/bin/env node` correctly resolves.
Compiling on Windows machines requires the [node-gyp prerequisites](https://github.com/nodejs/node-gyp#on-windows).
Are you seeing the following error? Check out our [Troubleshooting guide](https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#installing-node-sass-4x-with-node--4).**
```
SyntaxError: Use of const in strict mode.
```
**Having installation troubles? Check out our [Troubleshooting guide](https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md).**
### Install from mirror in China
```shell
npm install -g mirror-config-china --registry=https://registry.npmmirror.com
npm install node-sass
```
## Usage
```javascript
var sass = require('node-sass');
sass.render({
file: scss_filename,
[, options..]
}, function(err, result) { /*...*/ });
// OR
var result = sass.renderSync({
data: scss_content
[, options..]
});
```
## Options
### file
* Type: `String`
* Default: `null`
**Special**: `file` or `data` must be specified
Path to a file for [LibSass] to compile.
### data
* Type: `String`
* Default: `null`
**Special**: `file` or `data` must be specified
A string to pass to [LibSass] to compile. It is recommended that you use `includePaths` in conjunction with this so that [LibSass] can find files when using the `@import` directive.
### importer (>= v2.0.0) - _experimental_
**This is an experimental LibSass feature. Use with caution.**
* Type: `Function | Function[]` signature `function(url, prev, done)`
* Default: `undefined`
Function Parameters and Information:
* `url (String)` - the path in import **as-is**, which [LibSass] encountered
* `prev (String)` - the previously resolved path
* `done (Function)` - a callback function to invoke on async completion, takes an object literal containing
* `file (String)` - an alternate path for [LibSass] to use **OR**
* `contents (String)` - the imported contents (for example, read from memory or the file system)
Handles when [LibSass] encounters the `@import` directive. A custom importer allows extension of the [LibSass] engine in both a synchronous and asynchronous manner. In both cases, the goal is to either `return` or call `done()` with an object literal. Depending on the value of the object literal, one of two things will happen.
When returning or calling `done()` with `{ file: "String" }`, the new file path will be assumed for the `@import`. It's recommended to be mindful of the value of `prev` in instances where relative path resolution may be required.
When returning or calling `done()` with `{ contents: "String" }`, the string value will be used as if the file was read in through an external source.
Starting from v3.0.0:
* `this` refers to a contextual scope for the immediate run of `sass.render` or `sass.renderSync`
* importers can return error and LibSass will emit that error in response. For instance:
```javascript
done(new Error('doesn\'t exist!'));
// or return synchronously
return new Error('nothing to do here');
```
* importer can be an array of functions, which will be called by LibSass in the order of their occurrence in array. This helps user specify special importer for particular kind of path (filesystem, http). If an importer does not want to handle a particular path, it should return `null`. See [functions section](#functions--v300---experimental) for more details on Sass types.
### functions (>= v3.0.0) - _experimental_
**This is an experimental LibSass feature. Use with caution.**
`functions` is an `Object` that holds a collection of custom functions that may be invoked by the sass files being compiled. They may take zero or more input parameters and must return a value either synchronously (`return ...;`) or asynchronously (`done();`). Those parameters will be instances of one of the constructors contained in the `require('node-sass').types` hash. The return value must be of one of these types as well. See the list of available types below:
#### types.Number(value [, unit = ""])
* `getValue()`/ `setValue(value)` : gets / sets the numerical portion of the number
* `getUnit()` / `setUnit(unit)` : gets / sets the unit portion of the number
#### types.String(value)
* `getValue()` / `setValue(value)` : gets / sets the enclosed string
#### types.Color(r, g, b [, a = 1.0]) or types.Color(argb)
* `getR()` / `setR(value)` : red component (integer from `0` to `255`)
* `getG()` / `setG(value)` : green component (integer from `0` to `255`)
* `getB()` / `setB(value)` : blue component (integer from `0` to `255`)
* `getA()` / `setA(value)` : alpha component (number from `0` to `1.0`)
Example:
```javascript
var Color = require('node-sass').types.Color,
c1 = new Color(255, 0, 0),
c2 = new Color(0xff0088cc);
```
#### types.Boolean(value)
* `getValue()` : gets the enclosed boolean
* `types.Boolean.TRUE` : Singleton instance of `types.Boolean` that holds "true"
* `types.Boolean.FALSE` : Singleton instance of `types.Boolean` that holds "false"
#### types.List(length [, commaSeparator = true])
* `getValue(index)` / `setValue(index, value)` : `value` must itself be an instance of one of the constructors in `sass.types`.
* `getSeparator()` / `setSeparator(isComma)` : whether to use commas as a separator
* `getLength()`
#### types.Map(length)
* `getKey(index)` / `setKey(index, value)`
* `getValue(index)` / `setValue(index, value)`
* `getLength()`
#### types.Null()
* `types.Null.NULL` : Singleton instance of `types.Null`.
#### Example
```javascript
sass.renderSync({
data: '#{headings(2,5)} { color: #08c; }',
functions: {
'headings($from: 0, $to: 6)': function(from, to) {
var i, f = from.getValue(), t = to.getValue(),
list = new sass.types.List(t - f + 1);
for (i = f; i <= t; i++) {
list.setValue(i - f, new sass.types.String('h' + i));
}
return list;
}
}
});
```
### includePaths
* Type: `Array<String>`
* Default: `[]`
An array of paths that [LibSass] can look in to attempt to resolve your `@import` declarations. When using `data`, it is recommended that you use this.
### indentedSyntax
* Type: `Boolean`
* Default: `false`
`true` values enable [Sass Indented Syntax](https://sass-lang.com/documentation/file.INDENTED_SYNTAX.html) for parsing the data string or file.
__Note:__ node-sass/libsass will compile a mixed library of scss and indented syntax (.sass) files with the Default setting (false) as long as .sass and .scss extensions are used in filenames.
### indentType (>= v3.0.0)
* Type: `String`
* Default: `space`
Used to determine whether to use space or tab character for indentation.
### indentWidth (>= v3.0.0)
* Type: `Number`
* Default: `2`
* Maximum: `10`
Used to determine the number of spaces or tabs to be used for indentation.
### linefeed (>= v3.0.0)
* Type: `String`
* Default: `lf`
Used to determine whether to use `cr`, `crlf`, `lf` or `lfcr` sequence for line break.
### omitSourceMapUrl
* Type: `Boolean`
* Default: `false`
**Special:** When using this, you should also specify `outFile` to avoid unexpected behavior.
`true` values disable the inclusion of source map information in the output file.
### outFile
* Type: `String | null`
* Default: `null`
**Special:** Required when `sourceMap` is a truthy value
Specify the intended location of the output file. Strongly recommended when outputting source maps so that they can properly refer back to their intended files.
**Attention** enabling this option will **not** write the file on disk for you, it's for internal reference purpose only (to generate the map for example).
Example on how to write it on the disk
```javascript
sass.render({
...
outFile: yourPathTotheFile,
}, function(error, result) { // node-style callback from v3.0.0 onwards
if(!error){
// No errors during the compilation, write this result on the disk
fs.writeFile(yourPathTotheFile, result.css, function(err){
if(!err){
//file written on disk
}
});
}
});
});
```
### outputStyle
* Type: `String`
* Default: `nested`
* Values: `nested`, `expanded`, `compact`, `compressed`
Determines the output format of the final CSS style.
### precision
* Type: `Integer`
* Default: `5`
Used to determine how many digits after the decimal will be allowed. For instance, if you had a decimal number of `1.23456789` and a precision of `5`, the result will be `1.23457` in the final CSS.
### sourceComments
* Type: `Boolean`
* Default: `false`
`true` Enables the line number and file where a selector is defined to be emitted into the compiled CSS as a comment. Useful for debugging, especially when using imports and mixins.
### sourceMap
* Type: `Boolean | String | undefined`
* Default: `undefined`
Enables source map generation during `render` and `renderSync`.
When `sourceMap === true`, the value of `outFile` is used as the target output location for the source map with the suffix `.map` appended. If no `outFile` is set, `sourceMap` parameter is ignored.
When `typeof sourceMap === "string"`, the value of `sourceMap` will be used as the writing location for the file.
### sourceMapContents
* Type: `Boolean`
* Default: `false`
`true` includes the `contents` in the source map information
### sourceMapEmbed
* Type: `Boolean`
* Default: `false`
`true` embeds the source map as a data URI
### sourceMapRoot
* Type: `String`
* Default: `undefined`
the value will be emitted as `sourceRoot` in the source map information
## `render` Callback (>= v3.0.0)
node-sass supports standard node style asynchronous callbacks with the signature of `function(err, result)`. In error conditions, the `error` argument is populated with the error object. In success conditions, the `result` object is populated with an object describing the result of the render call.
### Error Object
* `message` (String) - The error message.
* `line` (Number) - The line number of error.
* `column` (Number) - The column number of error.
* `status` (Number) - The status code.
* `file` (String) - The filename of error. In case `file` option was not set (in favour of `data`), this will reflect the value `stdin`.
### Result Object
* `css` (Buffer) - The compiled CSS. Write this to a file, or serve it out as needed.
* `map` (Buffer) - The source map
* `stats` (Object) - An object containing information about the compile. It contains the following keys:
* `entry` (String) - The path to the scss file, or `data` if the source was not a file
* `start` (Number) - Date.now() before the compilation
* `end` (Number) - Date.now() after the compilation
* `duration` (Number) - *end* - *start*
* `includedFiles` (Array) - Absolute paths to all related scss files in no particular order.
### Examples
```javascript
var sass = require('node-sass');
sass.render({
file: '/path/to/myFile.scss',
data: 'body{background:blue; a{color:black;}}',
importer: function(url, prev, done) {
// url is the path in import as is, which LibSass encountered.
// prev is the previously resolved path.
// done is an optional callback, either consume it or return value synchronously.
// this.options contains this options hash, this.callback contains the node-style callback
someAsyncFunction(url, prev, function(result){
done({
file: result.path, // only one of them is required, see section Special Behaviours.
contents: result.data
});
});
// OR
var result = someSyncFunction(url, prev);
return {file: result.path, contents: result.data};
},
includePaths: [ 'lib/', 'mod/' ],
outputStyle: 'compressed'
}, function(error, result) { // node-style callback from v3.0.0 onwards
if (error) {
console.log(error.status); // used to be "code" in v2x and below
console.log(error.column);
console.log(error.message);
console.log(error.line);
}
else {
console.log(result.css.toString());
console.log(result.stats);
console.log(result.map.toString());
// or better
console.log(JSON.stringify(result.map)); // note, JSON.stringify accepts Buffer too
}
});
// OR
var result = sass.renderSync({
file: '/path/to/file.scss',
data: 'body{background:blue; a{color:black;}}',
outputStyle: 'compressed',
outFile: '/to/my/output.css',
sourceMap: true, // or an absolute or relative (to outFile) path
importer: function(url, prev, done) {
// url is the path in import as is, which LibSass encountered.
// prev is the previously resolved path.
// done is an optional callback, either consume it or return value synchronously.
// this.options contains this options hash
someAsyncFunction(url, prev, function(result){
done({
file: result.path, // only one of them is required, see section Special Behaviours.
contents: result.data
});
});
// OR
var result = someSyncFunction(url, prev);
return {file: result.path, contents: result.data};
}
});
console.log(result.css);
console.log(result.map);
console.log(result.stats);
```
### Special behaviours
* In the case that both `file` and `data` options are set, node-sass will give precedence to `data` and use `file` to calculate paths in sourcemaps.
### Version information (>= v2.0.0)
Both `node-sass` and `libsass` version info is now exposed via the `info` method:
```javascript
var sass = require('node-sass');
console.log(sass.info);
/*
it will output something like:
node-sass 2.0.1 (Wrapper) [JavaScript]
libsass 3.1.0 (Sass Compiler) [C/C++]
*/
```
Since node-sass >=v3.0.0 LibSass version is determined at run time.
## Integrations
Listing of community uses of node-sass in build tools and frameworks.
### Brackets extension
[@jasonsanjose](https://github.com/jasonsanjose) has created a [Brackets](http://brackets.io) extension based on node-sass: <https://github.com/jasonsanjose/brackets-sass>. When editing Sass files, the extension compiles changes on save. The extension also integrates with Live Preview to show Sass changes in the browser without saving or compiling.
### Brunch plugin
[Brunch](http://brunch.io)'s official sass plugin uses node-sass by default, and automatically falls back to ruby if use of Compass is detected: <https://github.com/brunch/sass-brunch>
### Connect/Express middleware
Recompile `.scss` files automatically for connect and express based http servers.
This functionality has been moved to [`node-sass-middleware`](https://github.com/sass/node-sass-middleware) in node-sass v1.0.0
### DocPad Plugin
[@10xLaCroixDrinker](https://github.com/10xLaCroixDrinker) wrote a [DocPad](http://docpad.org/) plugin that compiles `.scss` files using node-sass: <https://github.com/docpad/docpad-plugin-nodesass>
### Duo.js extension
[@stephenway](https://github.com/stephenway) has created an extension that transpiles Sass to CSS using node-sass with [duo.js](http://duojs.org/)
<https://github.com/duojs/sass>
### Grunt extension
[@sindresorhus](https://github.com/sindresorhus/) has created a set of grunt tasks based on node-sass: <https://github.com/sindresorhus/grunt-sass>
### Gulp extension
[@dlmanning](https://github.com/dlmanning/) has created a gulp sass plugin based on node-sass: <https://github.com/dlmanning/gulp-sass>
### Harp
[@sintaxi](https://github.com/sintaxi)’s Harp web server implicitly compiles `.scss` files using node-sass: <https://github.com/sintaxi/harp>
### Metalsmith plugin
[@stevenschobert](https://github.com/stevenschobert/) has created a metalsmith plugin based on node-sass: <https://github.com/stevenschobert/metalsmith-sass>
### Meteor plugin
[@fourseven](https://github.com/fourseven) has created a meteor plugin based on node-sass: <https://github.com/fourseven/meteor-scss>
### Mimosa module
[@dbashford](https://github.com/dbashford) has created a Mimosa module for sass which includes node-sass: <https://github.com/dbashford/mimosa-sass>
## Example App
There is also an example connect app here: <https://github.com/andrew/node-sass-example>
## Rebuilding binaries
Node-sass includes pre-compiled binaries for popular platforms, to add a binary for your platform follow these steps:
Check out the project:
```bash
git clone --recursive https://github.com/sass/node-sass.git
cd node-sass
npm install
node scripts/build -f # use -d switch for debug release
# if succeeded, it will generate and move
# the binary in vendor directory.
```
## Command Line Interface
The interface for command-line usage is fairly simplistic at this stage, as seen in the following usage section.
Output will be sent to stdout if the `--output` flag is omitted.
### Usage
`node-sass [options] <input> [output]`
Or:
`cat <input> | node-sass > output`
Example:
`node-sass src/style.scss dest/style.css`
**Options:**
```bash
-w, --watch Watch a directory or file
-r, --recursive Recursively watch directories or files
-o, --output Output directory
-x, --omit-source-map-url Omit source map URL comment from output
-i, --indented-syntax Treat data from stdin as sass code (versus scss)
-q, --quiet Suppress log output except on error
-v, --version Prints version info
--output-style CSS output style (nested | expanded | compact | compressed)
--indent-type Indent type for output CSS (space | tab)
--indent-width Indent width; number of spaces or tabs (maximum value: 10)
--linefeed Linefeed style (cr | crlf | lf | lfcr)
--source-comments Include debug info in output
--source-map Emit source map
--source-map-contents Embed include contents in map
--source-map-embed Embed sourceMappingUrl as data URI
--source-map-root Base path, will be emitted in source-map as is
--include-path Path to look for imported files
--follow Follow symlinked directories
--precision The amount of precision allowed in decimal numbers
--error-bell Output a bell character on errors
--importer Path to .js file containing custom importer
--functions Path to .js file containing custom functions
--help Print usage info
```
The `input` can be either a single `.scss` or `.sass`, or a directory. If the input is a directory the `--output` flag must also be supplied.
Also, note `--importer` takes the (absolute or relative to pwd) path to a js file, which needs to have a default `module.exports` set to the importer function. See our test [fixtures](https://github.com/sass/node-sass/tree/974f93e76ddd08ea850e3e663cfe64bb6a059dd3/test/fixtures/extras) for example.
The `--source-map` option accepts a boolean value, in which case it replaces destination extension with `.css.map`. It also accepts path to `.map` file and even path to the desired directory.
When compiling a directory `--source-map` can either be a boolean value or a directory.
## Binary configuration parameters
node-sass supports different configuration parameters to change settings related to the sass binary such as binary name, binary path or alternative download path. Following parameters are supported by node-sass:
Variable name | .npmrc parameter | Process argument | Value
-------------------------|--------------------------|----------------------------|------
SASS_BINARY_NAME | sass_binary_name | --sass-binary-name | path
SASS_BINARY_SITE | sass_binary_site | --sass-binary-site | URL
SASS_BINARY_PATH | sass_binary_path | --sass-binary-path | path
SASS_BINARY_DIR | sass_binary_dir | --sass-binary-dir | path
SASS_REJECT_UNAUTHORIZED | sass_reject_unauthorized | --sass-reject-unauthorized | value
These parameters can be used as environment variable:
* E.g. `export SASS_BINARY_SITE=http://example.com/`
As local or global [.npmrc](https://docs.npmjs.com/misc/config) configuration file:
* E.g. `sass_binary_site=http://example.com/`
As a process argument:
* E.g. `npm install node-sass --sass-binary-site=http://example.com/`
If you are using self-signed certificates for your binary then `SASS_REJECT_UNAUTHORIZED` will override (rejectUnauthorized)[https://nodejs.org/docs/latest/api/tls.html#tls_tls_createserver_options_secureconnectionlistener].
## Post-install Build
Install runs only two Mocha tests to see if your machine can use the pre-built [LibSass] which will save some time during install. If any tests fail it will build from source.
## Maintainers
This module is brought to you and maintained by the following people:
* Michael Mifsud - Project Lead ([Github](https://github.com/xzyfer) / [Twitter](https://twitter.com/xzyfer))
* Andrew Nesbitt ([Github](https://github.com/andrew) / [Twitter](https://twitter.com/teabass))
* Dean Mao ([Github](https://github.com/deanmao) / [Twitter](https://twitter.com/deanmao))
* Brett Wilkins ([Github](https://github.com/bwilkins) / [Twitter](https://twitter.com/bjmaz))
* Keith Cirkel ([Github](https://github.com/keithamus) / [Twitter](https://twitter.com/Keithamus))
* Laurent Goderre ([Github](https://github.com/laurentgoderre) / [Twitter](https://twitter.com/laurentgoderre))
* Nick Schonning ([Github](https://github.com/nschonni) / [Twitter](https://twitter.com/nschonni))
* Adeel Mujahid ([Github](https://github.com/am11) / [Twitter](https://twitter.com/adeelbm))
## Contributors
We <3 our contributors! A special thanks to all those who have clocked in some dev time on this project, we really appreciate your hard work. You can find [a full list of those people here.](https://github.com/sass/node-sass/graphs/contributors)
### Note on Patches/Pull Requests
Check out our [Contributing guide](/.github/CONTRIBUTING.md)
## Copyright
Copyright (c) 2015 Andrew Nesbitt. See [LICENSE](https://github.com/sass/node-sass/blob/master/LICENSE) for details.
[LibSass]: https://github.com/sass/libsass
================================================
FILE: TROUBLESHOOTING.md
================================================
# Troubleshooting
This document covers some common node-sass issues and how to resolve them. You
should always follow these steps before opening a new issue.
## TOC
- [Installation problems](#installation-problems)
- [404 downloading binding.node file](#404s)
- [Glossary](#glossary)
- [Which node runtime am I using?](#which-node-runtime-am-i-using)
- [Which version of node am I using?](#which-version-of-node-am-i-using)
- [Debugging installation issues.](#debugging-installation-issues)
- [Windows](#windows)
- [Linux/OSX](#linuxosx)
- [Using node-sass with Visual Studio 2015 Task Runner.](#using-node-sass-with-visual-studio-2015-task-runner)
- [Installing node-sass 4.x with Node < 4](#installing-node-sass-4x-with-node--4)
## Installation
### 404s
If you see a 404 when trying to install node-sass, this indicates that you're trying
to install a version of node-sass that doesn't support your version of NodeJS, or
uses an alternate V8 environment (Meteor, Electron, etc...) that isn't supported
by node-sass.
```console
> node-sass@4.6.1 install /src/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releas…
Cannot download "https://github.com/sass/node-sass/releas…":
HTTP error 404 Not Found
```
If you encounter this, please check what version of NodeJs you're running (`node -v`)
and check for a supported version of node-sass for your NodeJs by checking our
[release page](https://github.com/sass/node-sass/releases).
### Proxy issues
If you work in behind a corporate proxy try setting the proxy variables. The
following is a [guide for setting this up](https://jjasonclark.com/how-to-setup-node-behind-web-proxy/).
### Running with sudo or as root
This can happen if you are install node-sass as `root`, or globally with `sudo`.
This is a security feature of `npm`. You should always avoid running `npm` as
`sudo` because install scripts can be unintentionally malicious.
Please check [npm documentation on fixing permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions).
If you must however, you can work around this error by using the `--unsafe-perm`
flag with npm install i.e.
```sh
sudo npm install --unsafe-perm -g node-sass
```
If this didn't solve your problem please open an issue with the output from
[our debugging script](#debugging-installation-issues).
### npm
Some users upgrading from previous versions of npm before 5 have found conflicts with
old lock file formats. This may be show up as a URL instead of the actual version
number when downloading the binary. EX:
```console
Downloading binary from https://github.com/sass/node-sass/releases/download/vhttps://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/vhttps://registry.npmjs.org/node-sass/-/node-sass-4.5.3.tgz/win32-x64-57_binding.node":
HTTP error 404 Not Found
```
The easiest way to get around this is just to cleanup the npm files and reinstall.
```console
rm -rf node_modules
rm package-lock.json
npm cache clean
npm install
```
## Helping us, help you
### Find what version of Node you're running
To determine which version of Node.js or io.js you are currently using run the
following command in a terminal.
```console
node -v
```
The resulting value the version you are running.
### Debugging installation issues
Node sass runs some install scripts to make it as easy to use as possible, but
some times there can be issues. Before opening a new issue please follow the
instructions for [Windows](#windows) or [Linux/OSX](#linuxosx) and provide
their output in you [GitHub issue](https://github.com/sass/node-sass/issues).
**Remember to always search before opening a new issue**.
#### Windows
Firstly create a clean work space.
```console
mkdir \temp1
cd \temp1
```
Check your `COMSPEC` environment variable.
```console
node -p process.env.comspec
```
Please make sure the variable points to `C:\WINDOWS\System32\cmd.exe`
Gather some basic diagnostic information.
```console
npm -v
node -v
node -p process.versions
node -p process.platform
node -p process.arch
```
Clean npm cache
```console
npm cache clean
```
Install the latest node-sass
```console
npm install node-sass@latest
```
Note which version was installed by running
```console
npm ls node-sass
```
```console
y@1.0.0 /tmp
└── node-sass@3.8.0
```
If node-sass couldn't be installed successfully, please publish your `npm.log`
and `npm.err` files for analysis.
You can [download reference known-good logfiles](https://gist.github.com/saper/62b6e5ea41695c1883e3)
to compare your log against.
If node-sass install successfully lets gather some basic installation information.
```console
node -p "require('node-sass').info"
```
```console
node-sass 3.8.0 (Wrapper) [JavaScript]
libsass 3.3.6 (Sass Compiler) [C/C++]
```
If the node-sass installation process produced an error, open the vendor folder.
```console
cd node_modules\node-sass\vendor
```
Then, using the version number we gather at the beginning, go to `https://github.com/sass/node-sass/releases/tag/v<your-version>`.
There you should see a folder with same name as the one in the `vendor` folder.
Download the `binding.node` file from that folder and replace your own with it.
Test if that worked by gathering some basic installation information.
```console
node -p "require('node-sass').info"
```
```console
node-sass 3.8.0 (Wrapper) [JavaScript]
libsass 3.3.6 (Sass Compiler) [C/C++]
```
If this still produces an error please open an issue with the output from these
steps.
#### Linux/OSX
Firstly create a clean work space.
```sh
mkdir ~/temp1
cd ~/temp1
```
Gather some basic diagnostic information.
```sh
npm -v
node -v
node -p process.versions
node -p process.platform
node -p process.arch
```
Install the latest node-sass
```sh
npm install node-sass@latest
```
Note which version was installed by running
```sh
npm ls node-sass
```
```sh
y@1.0.0 /tmp
└── node-sass@3.8.0
```
If node-sass install successfully lets gather some basic installation information.
```sh
node -p "require('node-sass').info"
```
```sh
node-sass 3.8.0 (Wrapper) [JavaScript]
libsass 3.3.6 (Sass Compiler) [C/C++]
```
If the node-sass installation process produced an error, open the vendor folder.
```sh
cd node_modules/node-sass/vendor
```
Then, using the version number we gather at the beginning, go to `https://github.com/sass/node-sass/releases/tag/v<your-version>`.
There you should see a folder with same name as the one in the `vendor` folder.
Download the `binding.node` file from that folder and replace your own with it.
Test if that worked by gathering some basic installation information.
```sh
node -p "require('node-sass').info"
```
```sh
node-sass 3.8.0 (Wrapper) [JavaScript]
libsass 3.3.6 (Sass Compiler) [C/C++]
```
If this still produces an error please open an issue with the output from these
steps.
### Using node-sass with Visual Studio 2015 Task Runner
If you are using node-sass with VS2015 Task Runner Explorer, you need to make
sure that the version of node.js is same as the one you installed node-sass
with. This is because for each node.js runtime modules version (`node -p process.versions.modules`)
, we have a separate build of native binary. See [#532](https://github.com/sass/node-sass/issues/532).
Alternatively, if you prefer using system-installed node.js (supposedly higher
version than one bundles with VS2015), you may want to point Visual Studio 2015
to use it for task runner jobs by [following the guidelines](http://blogs.msdn.com/b/webdev/archive/2015/03/19/customize-external-web-tools-in-visual-studio-2015.aspx).
### Installing node-sass 4.x with Node < 4
See the discussion in [this comment](https://github.com/sass/node-sass/issues/2100#issuecomment-334651235)
for a workaround. As of node-sass@v5 only Node 6 and above will be officially supported.
================================================
FILE: appveyor.yml
================================================
-
branches:
only:
- release
- /v\d\.\d\.\d/
except:
- master
os: Visual Studio 2017
configuration: release
platform:
- x86
version: "{build}"
build: off
clone_folder: c:\projects\node_modules\node-sass
# http://www.wintellect.com/devcenter/jrobbins/pdb-files-what-every-developer-must-know
# http://help.appveyor.com/discussions/kb/32-how-to-build-on-logical-drive-created-by-subst
init:
- cmd: >-
subst s: c:\projects
- ps: set-location -path s:\node_modules\node-sass
cache:
- '%userprofile%\.node-gyp'
- '%AppData%\npm-cache'
environment:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true
matrix:
- nodejs_version: 16
GYP_MSVS_VERSION: 2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- nodejs_version: 18
GYP_MSVS_VERSION: 2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- nodejs_version: 19
GYP_MSVS_VERSION: 2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- nodejs_version: 20
GYP_MSVS_VERSION: 2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
install:
# https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform
- node --version
- npm --version
- npm install
test: off
before_deploy:
# Save artifacts with full qualified names of binding.node and binding.pdb
# (which we use in node-sass-binaries repo)
- ps: >-
Get-ChildItem .\vendor\**\*.node | % {
( $BindingName = $_.FullName ).Split('\\') |
Select-Object -Last 2 | Select-Object -First 1 } |
.{ process { (
@( $BindingName,
( ( $_, "binding.node" ) -join '_' ) ),
@( ".\build\Release\binding.pdb",
( ( $_, "binding.pdb" ) -join '_' ) )
) } } | % { Push-AppveyorArtifact $_[0] -FileName $_[1] }
deploy:
- provider: GitHub
description: $(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)
artifact:
auth_token:
secure: IZIifH990iABY3PQUtkRscTU/NOyYYwptGB6B1y2b618vpphV/2KD/4IWJzSAYAi
on:
appveyor_repo_tag: true # deploy on tag push only
================================================
FILE: bin/node-sass
================================================
#!/usr/bin/env node
var Emitter = require('events').EventEmitter,
forEach = require('async-foreach').forEach,
Gaze = require('gaze'),
meow = require('meow'),
util = require('util'),
path = require('path'),
glob = require('glob'),
sass = require('../lib'),
render = require('../lib/render'),
watcher = require('../lib/watcher'),
stdout = require('stdout-stream'),
stdin = require('get-stdin'),
fs = require('fs');
/**
* Initialize CLI
*/
var cli = meow(`
Usage:
node-sass [options] <input.scss>
cat <input.scss> | node-sass [options] > output.css
Example: Compile foobar.scss to foobar.css
node-sass --output-style compressed foobar.scss > foobar.css
cat foobar.scss | node-sass --output-style compressed > foobar.css
Example: Watch the sass directory for changes, compile with sourcemaps to the css directory
node-sass --watch --recursive --output css
--source-map true --source-map-contents sass
Options
-w, --watch Watch a directory or file
-r, --recursive Recursively watch directories or files
-o, --output Output directory
-x, --omit-source-map-url Omit source map URL comment from output
-i, --indented-syntax Treat data from stdin as sass code (versus scss)
-q, --quiet Suppress log output except on error
-v, --version Prints version info
--output-style CSS output style (nested | expanded | compact | compressed)
--indent-type Indent type for output CSS (space | tab)
--indent-width Indent width; number of spaces or tabs (maximum value: 10)
--linefeed Linefeed style (cr | crlf | lf | lfcr)
--source-comments Include debug info in output
--source-map Emit source map (boolean, or path to output .map file)
--source-map-contents Embed include contents in map
--source-map-embed Embed sourceMappingUrl as data URI
--source-map-root Base path, will be emitted in source-map as is
--include-path Path to look for imported files
--follow Follow symlinked directories
--precision The amount of precision allowed in decimal numbers
--error-bell Output a bell character on errors
--importer Path to .js file containing custom importer
--functions Path to .js file containing custom functions
--help Print usage info
`, {
version: sass.info,
flags: {
errorBell: {
type: 'boolean',
},
functions: {
type: 'string',
},
follow: {
type: 'boolean',
},
importer: {
type: 'string',
},
includePath: {
type: 'string',
default: [process.cwd()],
isMultiple: true,
},
indentType: {
type: 'string',
default: 'space',
},
indentWidth: {
type: 'number',
default: 2,
},
indentedSyntax: {
type: 'boolean',
alias: 'i',
},
linefeed: {
type: 'string',
default: 'lf',
},
omitSourceMapUrl: {
type: 'boolean',
alias: 'x',
},
output: {
type: 'string',
alias: 'o',
},
outputStyle: {
type: 'string',
default: 'nested',
},
precision: {
type: 'number',
default: 5,
},
quiet: {
type: 'boolean',
default: false,
alias: 'q',
},
recursive: {
type: 'boolean',
default: true,
alias: 'r',
},
sourceMapContents: {
type: 'boolean',
},
sourceMapEmbed: {
type: 'boolean',
},
sourceMapRoot: {
type: 'string',
},
sourceComments: {
type: 'boolean',
alias: 'c',
},
version: {
type: 'boolean',
alias: 'v',
},
watch: {
type: 'boolean',
alias: 'w',
},
},
});
/**
* Is a Directory
*
* @param {String} filePath
* @returns {Boolean}
* @api private
*/
function isDirectory(filePath) {
var isDir = false;
try {
var absolutePath = path.resolve(filePath);
isDir = fs.statSync(absolutePath).isDirectory();
} catch (e) {
isDir = e.code === 'ENOENT';
}
return isDir;
}
/**
* Get correct glob pattern
*
* @param {Object} options
* @returns {String}
* @api private
*/
function globPattern(options) {
return options.recursive ? '**/*.{sass,scss}' : '*.{sass,scss}';
}
/**
* Create emitter
*
* @api private
*/
function getEmitter() {
var emitter = new Emitter();
emitter.on('error', function(err) {
if (options.errorBell) {
err += '\x07';
}
console.error(err);
if (!options.watch) {
process.exit(1);
}
});
emitter.on('warn', function(data) {
if (!options.quiet) {
console.warn(data);
}
});
emitter.on('info', function(data) {
if (!options.quiet) {
console.info(data);
}
});
emitter.on('log', stdout.write.bind(stdout));
return emitter;
}
/**
* Construct options
*
* @param {Array} arguments
* @param {Object} options
* @api private
*/
function getOptions(args, options) {
var cssDir, sassDir, file, mapDir;
options.src = args[0];
if (args[1]) {
options.dest = path.resolve(args[1]);
} else if (options.output) {
options.dest = path.join(
path.resolve(options.output),
[path.basename(options.src, path.extname(options.src)), '.css'].join('')); // replace ext.
}
if (options.directory) {
sassDir = path.resolve(options.directory);
file = path.relative(sassDir, args[0]);
cssDir = path.resolve(options.output);
options.dest = path.join(cssDir, file).replace(path.extname(file), '.css');
}
if (options.sourceMap) {
if(!options.sourceMapOriginal) {
options.sourceMapOriginal = options.sourceMap;
}
if (options.sourceMapOriginal === 'true') {
options.sourceMap = options.dest + '.map';
} else {
// check if sourceMap path ends with .map to avoid isDirectory false-positive
var sourceMapIsDirectory = options.sourceMapOriginal.indexOf('.map', options.sourceMapOriginal.length - 4) === -1 && isDirectory(options.sourceMapOriginal);
if (!sourceMapIsDirectory) {
options.sourceMap = path.resolve(options.sourceMapOriginal);
} else if (!options.directory) {
options.sourceMap = path.resolve(options.sourceMapOriginal, path.basename(options.dest) + '.map');
} else {
sassDir = path.resolve(options.directory);
file = path.relative(sassDir, args[0]);
mapDir = path.resolve(options.sourceMapOriginal);
options.sourceMap = path.join(mapDir, file).replace(path.extname(file), '.css.map');
}
}
}
return options;
}
/**
* Watch
*
* @param {Object} options
* @param {Object} emitter
* @api private
*/
function watch(options, emitter) {
var handler = function(files) {
files.added.forEach(function(file) {
var watch = gaze.watched();
Object.keys(watch).forEach(function (dir) {
if (watch[dir].indexOf(file) !== -1) {
gaze.add(file);
}
});
});
files.changed.forEach(function(file) {
if (path.basename(file)[0] !== '_') {
renderFile(file, options, emitter);
}
});
files.removed.forEach(function(file) {
gaze.remove(file);
});
};
var gaze = new Gaze();
gaze.add(watcher.reset(options));
gaze.on('error', emitter.emit.bind(emitter, 'error'));
gaze.on('changed', function(file) {
handler(watcher.changed(file));
});
gaze.on('added', function(file) {
handler(watcher.added(file));
});
gaze.on('deleted', function(file) {
handler(watcher.removed(file));
});
}
/**
* Run
*
* @param {Object} options
* @param {Object} emitter
* @api private
*/
function run(options, emitter) {
if (options.directory) {
if (!options.output) {
emitter.emit('error', 'An output directory must be specified when compiling a directory');
}
if (!isDirectory(options.output)) {
emitter.emit('error', 'An output directory must be specified when compiling a directory');
}
}
if (options.sourceMapOriginal && options.directory && !isDirectory(options.sourceMapOriginal) && options.sourceMapOriginal !== 'true') {
emitter.emit('error', 'The --source-map option must be either a boolean or directory when compiling a directory');
}
if (options.importer) {
if ((path.resolve(options.importer) === path.normalize(options.importer).replace(/(.+)([/|\\])$/, '$1'))) {
options.importer = require(options.importer);
} else {
options.importer = require(path.resolve(options.importer));
}
}
if (options.functions) {
if ((path.resolve(options.functions) === path.normalize(options.functions).replace(/(.+)([/|\\])$/, '$1'))) {
options.functions = require(options.functions);
} else {
options.functions = require(path.resolve(options.functions));
}
}
if (options.watch) {
watch(options, emitter);
} else if (options.directory) {
renderDir(options, emitter);
} else {
render(options, emitter);
}
}
/**
* Render a file
*
* @param {String} file
* @param {Object} options
* @param {Object} emitter
* @api private
*/
function renderFile(file, options, emitter) {
options = getOptions([path.resolve(file)], options);
if (options.watch && !options.quiet) {
emitter.emit('info', util.format('=> changed: %s', file));
}
render(options, emitter);
}
/**
* Render all sass files in a directory
*
* @param {Object} options
* @param {Object} emitter
* @api private
*/
function renderDir(options, emitter) {
var globPath = path.resolve(options.directory, globPattern(options));
glob(globPath, { ignore: '**/_*', follow: options.follow }, function(err, files) {
if (err) {
return emitter.emit('error', util.format('You do not have permission to access this path: %s.', err.path));
} else if (!files.length) {
return emitter.emit('error', 'No input file was found.');
}
forEach(files, function(subject) {
emitter.once('done', this.async());
renderFile(subject, options, emitter);
}, function(successful, arr) {
var outputDir = path.join(process.cwd(), options.output);
if (!options.quiet) {
emitter.emit('info', util.format('Wrote %s CSS files to %s', arr.length, outputDir));
}
process.exit();
});
});
}
/**
* Arguments and options
*/
var options = getOptions(cli.input, cli.flags);
var emitter = getEmitter();
/**
* Show usage if no arguments are supplied
*/
if (!options.src && process.stdin.isTTY) {
emitter.emit('error', [
'Provide a Sass file to render',
'',
'Example: Compile foobar.scss to foobar.css',
' node-sass --output-style compressed foobar.scss > foobar.css',
' cat foobar.scss | node-sass --output-style compressed > foobar.css',
'',
'Example: Watch the sass directory for changes, compile with sourcemaps to the css directory',
' node-sass --watch --recursive --output css',
' --source-map true --source-map-contents sass',
].join('\n'));
}
/**
* Apply arguments
*/
if (options.src) {
if (isDirectory(options.src)) {
options.directory = options.src;
}
run(options, emitter);
} else if (!process.stdin.isTTY) {
stdin(function(data) {
options.data = data;
options.stdin = true;
run(options, emitter);
});
}
================================================
FILE: binding.gyp
================================================
{
'variables': {
'libsass_ext%': '',
},
'targets': [
{
'target_name': 'binding',
'win_delay_load_hook': 'true',
'sources': [
'src/binding.cpp',
'src/create_string.cpp',
'src/custom_function_bridge.cpp',
'src/custom_importer_bridge.cpp',
'src/sass_context_wrapper.cpp',
'src/sass_types/boolean.cpp',
'src/sass_types/color.cpp',
'src/sass_types/error.cpp',
'src/sass_types/factory.cpp',
'src/sass_types/list.cpp',
'src/sass_types/map.cpp',
'src/sass_types/null.cpp',
'src/sass_types/number.cpp',
'src/sass_types/string.cpp'
],
'msvs_settings': {
'VCLinkerTool': {
'SetChecksum': 'true'
}
},
'xcode_settings': {
'CLANG_CXX_LIBRARY': 'libc++',
'OTHER_LDFLAGS': [],
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
'MACOSX_DEPLOYMENT_TARGET': '10.11'
},
'include_dirs': [
'<!(node -e "require(\'nan\')")',
],
'conditions': [
['libsass_ext == "" or libsass_ext == "no"', {
'dependencies': [
'src/libsass.gyp:libsass',
]
}],
['libsass_ext == "auto"', {
'cflags_cc': [
'<!(pkg-config --cflags libsass)',
],
'link_settings': {
'ldflags': [
'<!(pkg-config --libs-only-other --libs-only-L libsass)',
],
'libraries': [
'<!(pkg-config --libs-only-l libsass)',
],
}
}],
['libsass_ext == "yes"', {
'cflags_cc': [
'<(libsass_cflags)',
],
'link_settings': {
'ldflags': [
'<(libsass_ldflags)',
],
'libraries': [
'<(libsass_library)',
],
}
}]
]
}
]
}
================================================
FILE: lib/binding.js
================================================
/*!
* node-sass: lib/binding.js
*/
var errors = require('./errors');
/**
* Require binding
*/
module.exports = function(ext) {
if (!ext.hasBinary(ext.getBinaryPath())) {
if (!ext.isSupportedEnvironment()) {
throw new Error(errors.unsupportedEnvironment());
} else {
throw new Error(errors.missingBinary());
}
}
return require(ext.getBinaryPath());
};
================================================
FILE: lib/errors.js
================================================
/*!
* node-sass: lib/errors.js
*/
var sass = require('./extensions'),
pkg = require('../package.json');
function humanEnvironment() {
return sass.getHumanEnvironment(sass.getBinaryName());
}
function foundBinaries() {
return [
'Found bindings for the following environments:',
foundBinariesList(),
].join('\n');
}
function foundBinariesList() {
return sass.getInstalledBinaries().map(function(env) {
return ' - ' + sass.getHumanEnvironment(env);
}).join('\n');
}
function missingBinaryFooter() {
return [
'This usually happens because your environment has changed since running `npm install`.',
'Run `npm rebuild node-sass` to download the binding for your current environment.',
].join('\n');
}
module.exports.unsupportedEnvironment = function() {
return [
'Node Sass does not yet support your current environment: ' + humanEnvironment(),
'For more information on which environments are supported please see:',
'https://github.com/sass/node-sass/releases/tag/v' + pkg.version
].join('\n');
};
module.exports.missingBinary = function() {
return [
'Missing binding ' + sass.getBinaryPath(),
'Node Sass could not find a binding for your current environment: ' + humanEnvironment(),
'',
foundBinaries(),
'',
missingBinaryFooter(),
].join('\n');
};
================================================
FILE: lib/extensions.js
================================================
/*!
* node-sass: lib/extensions.js
*/
var eol = require('os').EOL,
fs = require('fs'),
path = require('path'),
trueCasePathSync = require('true-case-path').trueCasePathSync,
pkg = require('../package.json'),
defaultBinaryDir = path.join(__dirname, '..', 'vendor');
/**
* Get the human readable name of the Platform that is running
*
* @param {string} platform - An OS platform to match, or null to fallback to
* the current process platform
* @return {Object} The name of the platform if matched, false otherwise
*
* @api public
*/
function getHumanPlatform(platform) {
switch (platform || process.platform) {
case 'darwin': return 'OS X';
case 'freebsd': return 'FreeBSD';
case 'linux': return 'Linux';
case 'linux_musl': return 'Linux/musl';
case 'win32': return 'Windows';
default: return false;
}
}
/**
* Provides a more readable version of the architecture
*
* @param {string} arch - An instruction architecture name to match, or null to
* lookup the current process architecture
* @return {Object} The value of the process architecture, or false if unknown
*
* @api public
*/
function getHumanArchitecture(arch) {
switch (arch || process.arch) {
case 'ia32': return '32-bit';
case 'x86': return '32-bit';
case 'x64': return '64-bit';
default: return false;
}
}
/**
* Get the friendly name of the Node environment being run
*
* @param {Object} abi - A Node Application Binary Interface value, or null to
* fallback to the current Node ABI
* @return {Object} Returns a string name of the Node environment or false if
* unmatched
*
* @api public
*/
function getHumanNodeVersion(abi) {
switch (parseInt(abi || process.versions.modules, 10)) {
case 11: return 'Node 0.10.x';
case 14: return 'Node 0.12.x';
case 42: return 'io.js 1.x';
case 43: return 'io.js 1.1.x';
case 44: return 'io.js 2.x';
case 45: return 'io.js 3.x';
case 46: return 'Node.js 4.x';
case 47: return 'Node.js 5.x';
case 48: return 'Node.js 6.x';
case 49: return 'Electron 1.3.x';
case 50: return 'Electron 1.4.x';
case 51: return 'Node.js 7.x';
case 53: return 'Electron 1.6.x';
case 57: return 'Node.js 8.x';
case 59: return 'Node.js 9.x';
case 64: return 'Node.js 10.x';
case 67: return 'Node.js 11.x';
case 72: return 'Node.js 12.x';
case 79: return 'Node.js 13.x';
case 83: return 'Node.js 14.x';
case 88: return 'Node.js 15.x';
case 93: return 'Node.js 16.x';
case 102: return 'Node.js 17.x';
case 108: return 'Node.js 18.x';
case 111: return 'Node.js 19.x';
case 115: return 'Node.js 20.x';
default: return false;
}
}
/**
* Get a human readable description of where node-sass is running to support
* user error reporting when something goes wrong
*
* @param {string} env - The name of the native bindings that is to be parsed
* @return {string} A description of what os, architecture, and Node version
* that is being run
*
* @api public
*/
function getHumanEnvironment(env) {
var binding = env.replace(/_binding\.node$/, ''),
parts = binding.split('-'),
platform = getHumanPlatform(parts[0]),
arch = getHumanArchitecture(parts[1]),
runtime = getHumanNodeVersion(parts[2]);
if (parts.length !== 3) {
return 'Unknown environment (' + binding + ')';
}
if (!platform) {
platform = 'Unsupported platform (' + parts[0] + ')';
}
if (!arch) {
arch = 'Unsupported architecture (' + parts[1] + ')';
}
if (!runtime) {
runtime = 'Unsupported runtime (' + parts[2] + ')';
}
return [
platform, arch, 'with', runtime,
].join(' ');
}
/**
* Get the value of the binaries under the default path
*
* @return {Array} The currently installed node-sass bindings
*
* @api public
*/
function getInstalledBinaries() {
return fs.readdirSync(getBinaryDir());
}
/**
* Check that an environment matches the allowlisted values or the current
* environment if no parameters are passed
*
* @param {string} platform - The name of the OS platform(darwin, win32, etc...)
* @param {string} arch - The instruction set architecture of the Node environment
* @param {string} abi - The Node Application Binary Interface
* @return {Boolean} True, if node-sass supports the current platform, false otherwise
*
* @api public
*/
function isSupportedEnvironment(platform, arch, abi) {
return (
false !== getHumanPlatform(platform) &&
false !== getHumanArchitecture(arch) &&
false !== getHumanNodeVersion(abi)
);
}
/**
* Get the value of a CLI argument
*
* @param {String} name
* @param {Array} args
* @api private
*/
function getArgument(name, args) {
var flags = args || process.argv.slice(2),
index = flags.lastIndexOf(name);
if (index === -1 || index + 1 >= flags.length) {
return null;
}
return flags[index + 1];
}
/**
* Get binary name.
* If environment variable SASS_BINARY_NAME,
* .npmrc variable sass_binary_name or
* process argument --binary-name is provided,
* return it as is, otherwise make default binary
* name: {platform}-{arch}-{v8 version}.node
*
* @api public
*/
function getBinaryName() {
var binaryName,
variant,
platform = process.platform;
if (getArgument('--sass-binary-name')) {
binaryName = getArgument('--sass-binary-name');
} else if (process.env.SASS_BINARY_NAME) {
binaryName = process.env.SASS_BINARY_NAME;
} else if (process.env.npm_config_sass_binary_name) {
binaryName = process.env.npm_config_sass_binary_name;
} else if (pkg.nodeSassConfig && pkg.nodeSassConfig.binaryName) {
binaryName = pkg.nodeSassConfig.binaryName;
} else {
variant = getPlatformVariant();
if (variant) {
platform += '_' + variant;
}
binaryName = [
platform, '-',
process.arch, '-',
process.versions.modules
].join('');
}
return [binaryName, 'binding.node'].join('_');
}
/**
* Determine the URL to fetch binary file from.
* By default fetch from the node-sass distribution
* site on GitHub.
*
* The default URL can be overridden using
* the environment variable SASS_BINARY_SITE,
* .npmrc variable sass_binary_site or
* or a command line option --sass-binary-site:
*
* node scripts/install.js --sass-binary-site http://example.com/
*
* The URL should to the mirror of the repository
* laid out as follows:
*
* SASS_BINARY_SITE/
*
* v3.0.0
* v3.0.0/freebsd-x64-14_binding.node
* ....
* v3.0.0
* v3.0.0/freebsd-ia32-11_binding.node
* v3.0.0/freebsd-x64-42_binding.node
* ... etc. for all supported versions and platforms
*
* @api public
*/
function getBinaryUrl() {
var site = getArgument('--sass-binary-site') ||
process.env.SASS_BINARY_SITE ||
process.env.npm_config_sass_binary_site ||
(pkg.nodeSassConfig && pkg.nodeSassConfig.binarySite) ||
'https://github.com/sass/node-sass/releases/download';
return [site, 'v' + pkg.version, getBinaryName()].join('/');
}
/**
* Get binary dir.
* If environment variable SASS_BINARY_DIR,
* .npmrc variable sass_binary_dir or
* process argument --sass-binary-dir is provided,
* select it by appending binary name, otherwise
* use default binary dir.
* Once the primary selection is made, check if
* callers wants to throw if file not exists before
* returning.
*
* @api public
*/
function getBinaryDir() {
var binaryDir;
if (getArgument('--sass-binary-dir')) {
binaryDir = getArgument('--sass-binary-dir');
} else if (process.env.SASS_BINARY_DIR) {
binaryDir = process.env.SASS_BINARY_DIR;
} else if (process.env.npm_config_sass_binary_dir) {
binaryDir = process.env.npm_config_sass_binary_dir;
} else if (pkg.nodeSassConfig && pkg.nodeSassConfig.binaryDir) {
binaryDir = pkg.nodeSassConfig.binaryDir;
} else {
binaryDir = defaultBinaryDir;
}
return binaryDir;
}
/**
* Get binary path.
* If environment variable SASS_BINARY_PATH,
* .npmrc variable sass_binary_path or
* process argument --sass-binary-path is provided,
* select it by appending binary name, otherwise
* make default binary path using binary name.
* Once the primary selection is made, check if
* callers wants to throw if file not exists before
* returning.
*
* @api public
*/
function getBinaryPath() {
var binaryPath;
if (getArgument('--sass-binary-path')) {
binaryPath = getArgument('--sass-binary-path');
} else if (process.env.SASS_BINARY_PATH) {
binaryPath = process.env.SASS_BINARY_PATH;
} else if (process.env.npm_config_sass_binary_path) {
binaryPath = process.env.npm_config_sass_binary_path;
} else if (pkg.nodeSassConfig && pkg.nodeSassConfig.binaryPath) {
binaryPath = pkg.nodeSassConfig.binaryPath;
} else {
binaryPath = path.join(getBinaryDir(), getBinaryName().replace(/_(?=binding\.node)/, '/'));
}
try {
return trueCasePathSync(binaryPath) || binaryPath;
} catch (e) {
return binaryPath;
}
}
/**
* An array of paths suitable for use as a local disk cache of the binding.
*
* @return {[]String} an array of paths
* @api public
*/
function getCachePathCandidates() {
return [
process.env.npm_config_sass_binary_cache,
process.env.npm_config_cache,
].filter(function(_) { return _; });
}
/**
* The most suitable location for caching the binding on disk.
*
* Given the candidates directories provided by `getCachePathCandidates()` this
* returns the first writable directory. By treating the candidate directories
* as a prioritised list this method is deterministic, assuming no change to the
* local environment.
*
* @return {String} directory to cache binding
* @api public
*/
function getBinaryCachePath() {
var i,
cachePath,
cachePathCandidates = getCachePathCandidates();
for (i = 0; i < cachePathCandidates.length; i++) {
cachePath = path.join(cachePathCandidates[i], pkg.name, pkg.version);
try {
fs.mkdirSync(cachePath, {recursive: true});
return cachePath;
} catch (e) {
// Directory is not writable, try another
}
}
return '';
}
/**
* The cached binding
*
* Check the candidates directories provided by `getCachePathCandidates()` for
* the binding file, if it exists. By treating the candidate directories
* as a prioritised list this method is deterministic, assuming no change to the
* local environment.
*
* @return {String} path to cached binary
* @api public
*/
function getCachedBinary() {
var i,
cachePath,
cacheBinary,
cachePathCandidates = getCachePathCandidates(),
binaryName = getBinaryName();
for (i = 0; i < cachePathCandidates.length; i++) {
cachePath = path.join(cachePathCandidates[i], pkg.name, pkg.version);
cacheBinary = path.join(cachePath, binaryName);
if (fs.existsSync(cacheBinary)) {
return cacheBinary;
}
}
return '';
}
/**
* Does the supplied binary path exist
*
* @param {String} binaryPath
* @api public
*/
function hasBinary(binaryPath) {
return fs.existsSync(binaryPath);
}
/**
* Get Sass version information
*
* @api public
*/
function getVersionInfo(binding) {
return [
['node-sass', pkg.version, '(Wrapper)', '[JavaScript]'].join('\t'),
['libsass ', binding.libsassVersion(), '(Sass Compiler)', '[C/C++]'].join('\t'),
].join(eol);
}
/**
* Gets the platform variant, currently either an empty string or 'musl' for Linux/musl platforms.
*
* @api public
*/
function getPlatformVariant() {
var contents = '';
if (process.platform !== 'linux') {
return '';
}
try {
contents = fs.readFileSync(process.execPath);
if (contents.indexOf('libc.musl-x86_64.so.1') !== -1) {
return 'musl';
}
} catch (err) { } // eslint-disable-line no-empty
return '';
}
module.exports.hasBinary = hasBinary;
module.exports.getBinaryUrl = getBinaryUrl;
module.exports.getBinaryName = getBinaryName;
module.exports.getBinaryDir = getBinaryDir;
module.exports.getBinaryPath = getBinaryPath;
module.exports.getBinaryCachePath = getBinaryCachePath;
module.exports.getCachedBinary = getCachedBinary;
module.exports.getCachePathCandidates = getCachePathCandidates;
module.exports.getVersionInfo = getVersionInfo;
module.exports.getHumanEnvironment = getHumanEnvironment;
module.exports.getInstalledBinaries = getInstalledBinaries;
module.exports.isSupportedEnvironment = isSupportedEnvironment;
================================================
FILE: lib/index.js
================================================
/*!
* node-sass: lib/index.js
*/
var path = require('path'),
clonedeep = require('lodash/cloneDeep'),
sass = require('./extensions');
/**
* Require binding
*/
var binding = require('./binding')(sass);
/**
* Get input file
*
* @param {Object} options
* @api private
*/
function getInputFile(options) {
return options.file ? path.resolve(options.file) : null;
}
/**
* Get output file
*
* @param {Object} options
* @api private
*/
function getOutputFile(options) {
var outFile = options.outFile;
if (!outFile || typeof outFile !== 'string' || (!options.data && !options.file)) {
return null;
}
return path.resolve(outFile);
}
/**
* Get source map
*
* @param {Object} options
* @api private
*/
function getSourceMap(options) {
var sourceMap = options.sourceMap;
if (sourceMap && typeof sourceMap !== 'string' && options.outFile) {
sourceMap = options.outFile + '.map';
}
return sourceMap && typeof sourceMap === 'string' ? path.resolve(sourceMap) : null;
}
/**
* Get stats
*
* @param {Object} options
* @api private
*/
function getStats(options) {
var stats = {};
stats.entry = options.file || 'data';
stats.start = Date.now();
return stats;
}
/**
* End stats
*
* @param {Object} stats
* @param {Object} sourceMap
* @api private
*/
function endStats(stats) {
stats.end = Date.now();
stats.duration = stats.end - stats.start;
return stats;
}
/**
* Get style
*
* @param {Object} options
* @api private
*/
function getStyle(options) {
var styles = {
nested: 0,
expanded: 1,
compact: 2,
compressed: 3
};
return styles[options.outputStyle] || 0;
}
/**
* Get indent width
*
* @param {Object} options
* @api private
*/
function getIndentWidth(options) {
var width = parseInt(options.indentWidth) || 2;
return width > 10 ? 2 : width;
}
/**
* Get indent type
*
* @param {Object} options
* @api private
*/
function getIndentType(options) {
var types = {
space: 0,
tab: 1
};
return types[options.indentType] || 0;
}
/**
* Get linefeed
*
* @param {Object} options
* @api private
*/
function getLinefeed(options) {
var feeds = {
cr: '\r',
crlf: '\r\n',
lf: '\n',
lfcr: '\n\r'
};
return feeds[options.linefeed] || '\n';
}
/**
* Build an includePaths string
* from the options.includePaths array and the SASS_PATH environment variable
*
* @param {Object} options
* @api private
*/
function buildIncludePaths(options) {
options.includePaths = options.includePaths || [];
if (Object.prototype.hasOwnProperty.call(process.env, 'SASS_PATH')) {
options.includePaths = options.includePaths.concat(
process.env.SASS_PATH.split(path.delimiter)
);
}
// Preserve the behaviour people have come to expect.
// This behaviour was removed from Sass in 3.4 and
// LibSass in 3.5.
options.includePaths.unshift(process.cwd());
return options.includePaths.join(path.delimiter);
}
/**
* Get options
*
* @param {Object} options
* @api private
*/
function getOptions(opts, cb) {
if (typeof opts !== 'object') {
throw new Error('Invalid: options is not an object.');
}
var options = clonedeep(opts || {});
options.sourceComments = options.sourceComments || false;
if (Object.prototype.hasOwnProperty.call(options, 'file')) {
options.file = getInputFile(options);
}
options.outFile = getOutputFile(options);
options.includePaths = buildIncludePaths(options);
options.precision = parseInt(options.precision) || 5;
options.sourceMap = getSourceMap(options);
options.style = getStyle(options);
options.indentWidth = getIndentWidth(options);
options.indentType = getIndentType(options);
options.linefeed = getLinefeed(options);
// context object represents node-sass environment
options.context = { options: options, callback: cb };
options.result = {
stats: getStats(options)
};
return options;
}
/**
* Executes a callback and transforms any exception raised into a sass error
*
* @param {Function} callback
* @param {Array} arguments
* @api private
*/
function tryCallback(callback, args) {
try {
return callback.apply(this, args);
} catch (e) {
if (typeof e === 'string') {
return new binding.types.Error(e);
} else if (e instanceof Error) {
return new binding.types.Error(e.message);
} else {
return new binding.types.Error('An unexpected error occurred');
}
}
}
/**
* Normalizes the signature of custom functions to make it possible to just supply the
* function name and have the signature default to `fn(...)`. The callback is adjusted
* to transform the input sass list into discrete arguments.
*
* @param {String} signature
* @param {Function} callback
* @return {Object}
* @api private
*/
function normalizeFunctionSignature(signature, callback) {
if (!/^\*|@warn|@error|@debug|\w+\(.*\)$/.test(signature)) {
if (!/\w+/.test(signature)) {
throw new Error('Invalid function signature format "' + signature + '"');
}
return {
signature: signature + '(...)',
callback: function() {
var args = Array.prototype.slice.call(arguments),
list = args.shift(),
i;
for (i = list.getLength() - 1; i >= 0; i--) {
args.unshift(list.getValue(i));
}
return callback.apply(this, args);
}
};
}
return {
signature: signature,
callback: callback
};
}
/**
* Render
*
* @param {Object} options
* @api public
*/
module.exports.render = function(opts, cb) {
var options = getOptions(opts, cb);
// options.error and options.success are for libsass binding
options.error = function(err) {
var payload = Object.assign(new Error(), JSON.parse(err));
if (cb) {
options.context.callback.call(options.context, payload, null);
}
};
options.success = function() {
var result = options.result;
var stats = endStats(result.stats);
var payload = {
css: result.css,
stats: stats
};
if (result.map) {
payload.map = result.map;
}
if (cb) {
options.context.callback.call(options.context, null, payload);
}
};
var importer = options.importer;
if (importer) {
if (Array.isArray(importer)) {
options.importer = [];
importer.forEach(function(subject, index) {
options.importer[index] = function(file, prev, bridge) {
function done(result) {
bridge.success(result === module.exports.NULL ? null : result);
}
var result = subject.call(options.context, file, prev, done);
if (result !== undefined) {
done(result);
}
};
});
} else {
options.importer = function(file, prev, bridge) {
function done(result) {
bridge.success(result === module.exports.NULL ? null : result);
}
var result = importer.call(options.context, file, prev, done);
if (result !== undefined) {
done(result);
}
};
}
}
var functions = clonedeep(options.functions);
if (functions) {
options.functions = {};
Object.keys(functions).forEach(function(subject) {
var cb = normalizeFunctionSignature(subject, functions[subject]);
options.functions[cb.signature] = function() {
var args = Array.prototype.slice.call(arguments),
bridge = args.pop();
function done(data) {
bridge.success(data);
}
var result = tryCallback(cb.callback.bind(options.context), args.concat(done));
if (result) {
done(result);
}
};
});
}
if (options.data) {
binding.render(options);
} else if (options.file) {
binding.renderFile(options);
} else {
cb({status: 3, message: 'No input specified: provide a file name or a source string to process' });
}
};
/**
* Render sync
*
* @param {Object} options
* @api public
*/
module.exports.renderSync = function(opts) {
var options = getOptions(opts);
var importer = options.importer;
if (importer) {
if (Array.isArray(importer)) {
options.importer = [];
importer.forEach(function(subject, index) {
options.importer[index] = function(file, prev) {
var result = subject.call(options.context, file, prev);
return result === module.exports.NULL ? null : result;
};
});
} else {
options.importer = function(file, prev) {
var result = importer.call(options.context, file, prev);
return result === module.exports.NULL ? null : result;
};
}
}
var functions = clonedeep(options.functions);
if (options.functions) {
options.functions = {};
Object.keys(functions).forEach(function(signature) {
var cb = normalizeFunctionSignature(signature, functions[signature]);
options.functions[cb.signature] = function() {
return tryCallback(cb.callback.bind(options.context), arguments);
};
});
}
var status;
if (options.data) {
status = binding.renderSync(options);
} else if (options.file) {
status = binding.renderFileSync(options);
} else {
throw new Error('No input specified: provide a file name or a source string to process');
}
var result = options.result;
if (status) {
result.stats = endStats(result.stats);
return result;
}
throw Object.assign(new Error(), JSON.parse(result.error));
};
/**
* API Info
*
* @api public
*/
module.exports.info = sass.getVersionInfo(binding);
/**
* Expose sass types
*/
module.exports.types = binding.types;
module.exports.TRUE = binding.types.Boolean.TRUE;
module.exports.FALSE = binding.types.Boolean.FALSE;
module.exports.NULL = binding.types.Null.NULL;
================================================
FILE: lib/render.js
================================================
/*!
* node-sass: lib/render.js
*/
var chalk = require('chalk'),
fs = require('fs'),
path = require('path'),
sass = require('./');
/**
* Render
*
* @param {Object} options
* @param {Object} emitter
* @api public
*/
module.exports = function(options, emitter) {
var renderOptions = {
includePaths: options.includePath,
omitSourceMapUrl: options.omitSourceMapUrl,
indentedSyntax: options.indentedSyntax,
outFile: options.dest,
outputStyle: options.outputStyle,
precision: options.precision,
sourceComments: options.sourceComments,
sourceMapEmbed: options.sourceMapEmbed,
sourceMapContents: options.sourceMapContents,
sourceMap: options.sourceMap,
sourceMapRoot: options.sourceMapRoot,
importer: options.importer,
functions: options.functions,
indentWidth: options.indentWidth,
indentType: options.indentType,
linefeed: options.linefeed
};
if (options.data) {
renderOptions.data = options.data;
} else if (options.src) {
renderOptions.file = options.src;
}
var sourceMap = options.sourceMap;
var destination = options.dest;
var stdin = options.stdin;
var success = function(result) {
var todo = 1;
var done = function() {
if (--todo <= 0) {
emitter.emit('done');
}
};
if (!destination || stdin) {
emitter.emit('log', result.css.toString());
if (sourceMap && !options.sourceMapEmbed) {
emitter.emit('log', result.map.toString());
}
return done();
}
emitter.emit('info', chalk.green('Rendering Complete, saving .css file...'));
fs.mkdir(path.dirname(destination), {recursive: true}, function(err) {
if (err) {
return emitter.emit('error', chalk.red(err));
}
fs.writeFile(destination, result.css.toString(), function(err) {
if (err) {
return emitter.emit('error', chalk.red(err));
}
emitter.emit('info', chalk.green('Wrote CSS to ' + destination));
emitter.emit('write', err, destination, result.css.toString());
done();
});
});
if (sourceMap) {
todo++;
fs.mkdir(path.dirname(sourceMap), {recursive: true}, function(err) {
if (err) {
return emitter.emit('error', chalk.red(err));
}
fs.writeFile(sourceMap, result.map, function(err) {
if (err) {
return emitter.emit('error', chalk.red('Error' + err));
}
emitter.emit('info', chalk.green('Wrote Source Map to ' + sourceMap));
emitter.emit('write-source-map', err, sourceMap, result.map);
done();
});
});
}
emitter.emit('render', result.css.toString());
};
var error = function(error) {
emitter.emit('error', chalk.red(JSON.stringify(error, null, 2)));
};
var renderCallback = function(err, result) {
if (err) {
error(err);
}
else {
success(result);
}
};
sass.render(renderOptions, renderCallback);
};
================================================
FILE: lib/watcher.js
================================================
var grapher = require('sass-graph'),
clonedeep = require('lodash/cloneDeep'),
path = require('path'),
config = {},
watcher = {},
graph = null;
watcher.reset = function(opts) {
config = clonedeep(opts || config || {});
var options = {
loadPaths: config.includePath,
extensions: ['scss', 'sass', 'css'],
follow: config.follow,
};
if (config.directory) {
graph = grapher.parseDir(config.directory, options);
} else {
graph = grapher.parseFile(config.src, options);
}
return Object.keys(graph.index);
};
watcher.changed = function(absolutePath) {
var files = {
added: [],
changed: [],
removed: [],
};
this.reset();
if (absolutePath && path.basename(absolutePath)[0] !== '_') {
files.changed.push(absolutePath);
}
graph.visitAncestors(absolutePath, function(parent) {
if (path.basename(parent)[0] !== '_') {
files.changed.push(parent);
}
});
graph.visitDescendents(absolutePath, function(child) {
files.added.push(child);
});
return files;
};
watcher.added = function(absolutePath) {
var files = {
added: [],
changed: [],
removed: [],
};
this.reset();
if (Object.keys(graph.index).indexOf(absolutePath) === -1) {
files.added.push(absolutePath);
}
graph.visitDescendents(absolutePath, function(child) {
files.added.push(child);
});
return files;
};
watcher.removed = function(absolutePath) {
var files = {
added: [],
changed: [],
removed: [],
};
graph.visitAncestors(absolutePath, function(parent) {
if (path.basename(parent)[0] !== '_') {
files.changed.push(parent);
}
});
if (Object.keys(graph.index).indexOf(absolutePath) !== -1) {
files.removed.push(absolutePath);
}
this.reset();
return files;
};
module.exports = watcher;
================================================
FILE: memory-tests/_measure.js
================================================
"use strict";
module.exports = function iterateAndMeasure(fn, mod = 1000000) {
let count = 0;
while (true) {
count++;
fn();
if (count % mod === 0) {
console.log(process.memoryUsage().rss / 1000000);
}
}
}
================================================
FILE: memory-tests/boolean.js
================================================
'use strict';
var types = require('../').types;
var iterateAndMeasure = require('./_measure');
iterateAndMeasure(function() { return types.Boolean(true).getValue(); });
================================================
FILE: memory-tests/function-bridge.js
================================================
"use strict";
var sass = require("../");
var iterateAndMeasure = require('./_measure');
iterateAndMeasure(function() {
sass.renderSync({
data: '#{headings()} { color: #08c; }',
functions: {
'headings()': function() {
return new sass.types.String('hi');
}
}
});
}, 10000);
================================================
FILE: memory-tests/map.js
================================================
'use strict';
var types = require('../').types;
var iterateAndMeasure = require('./_measure');
iterateAndMeasure(function() {
var key = new types.String('the-key');
var value = new types.String('the-value');
var map = new types.Map(1);
map.setKey(0, key);
map.setValue(0, value);
map.getKey(0);
}, 100000);
================================================
FILE: memory-tests/string.js
================================================
'use strict';
var types = require('../').types;
var iterateAndMeasure = require('./_measure');
iterateAndMeasure(function() { return new types.String('hi'); });
================================================
FILE: package.json
================================================
{
"name": "node-sass",
"version": "9.0.0",
"libsass": "3.5.5",
"description": "Wrapper around libsass",
"license": "MIT",
"bugs": "https://github.com/sass/node-sass/issues",
"homepage": "https://github.com/sass/node-sass",
"repository": {
"type": "git",
"url": "https://github.com/sass/node-sass"
},
"author": {
"name": "Andrew Nesbitt",
"email": "andrewnez@gmail.com",
"url": "http://andrew.github.com"
},
"engines": {
"node": ">=16"
},
"main": "lib/index.js",
"nodeSassConfig": {
"binarySite": "https://github.com/sass/node-sass/releases/download"
},
"bin": {
"node-sass": "bin/node-sass"
},
"gypfile": true,
"scripts": {
"coverage": "nyc npm run test",
"install": "node scripts/install.js",
"postinstall": "node scripts/build.js",
"lint": "eslint bin/node-sass lib scripts test",
"test": "mocha test/{*,**/**}.js",
"build": "node scripts/build.js --force",
"prepublishOnly ": "scripts/prepublish.js"
},
"files": [
"bin",
"binding.gyp",
"lib",
"scripts",
"src",
"test",
"vendor"
],
"keywords": [
"css",
"libsass",
"preprocessor",
"sass",
"scss",
"style"
],
"dependencies": {
"async-foreach": "^0.1.3",
"chalk": "^4.1.2",
"cross-spawn": "^7.0.3",
"gaze": "^1.0.0",
"get-stdin": "^4.0.1",
"glob": "^7.0.3",
"lodash": "^4.17.15",
"make-fetch-happen": "^10.0.4",
"meow": "^9.0.0",
"nan": "^2.17.0",
"node-gyp": "^10.0.1",
"sass-graph": "^4.0.1",
"stdout-stream": "^1.4.0",
"true-case-path": "^2.2.1"
},
"devDependencies": {
"eslint": "^8.0.0",
"fs-extra": "^10.0.0",
"mocha": "^9.0.1",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"unique-temp-dir": "^1.0.0"
}
}
================================================
FILE: scripts/build.js
================================================
/*!
* node-sass: scripts/build.js
*/
var fs = require('fs'),
path = require('path'),
spawn = require('cross-spawn'),
sass = require('../lib/extensions');
/**
* After build
*
* @param {Object} options
* @api private
*/
function afterBuild(options) {
var install = sass.getBinaryPath();
var target = path.join(__dirname, '..', 'build',
options.debug ? 'Debug' :
process.config.target_defaults
? process.config.target_defaults.default_configuration
: 'Release',
'binding.node');
fs.mkdir(path.dirname(install), {recursive: true}, function(err) {
if (err && err.code !== 'EEXIST') {
console.error(err.message);
return;
}
fs.stat(target, function(err) {
if (err) {
console.error('Build succeeded but target not found');
return;
}
fs.rename(target, install, function(err) {
if (err) {
console.error(err.message);
return;
}
console.log('Installed to', install);
});
});
});
}
/**
* Build
*
* @param {Object} options
* @api private
*/
function build(options) {
var args = [require.resolve(path.join('node-gyp', 'bin', 'node-gyp.js')), 'rebuild', '--verbose'].concat(
['libsass_ext', 'libsass_cflags', 'libsass_ldflags', 'libsass_library'].map(function(subject) {
return ['--', subject, '=', process.env[subject.toUpperCase()] || ''].join('');
})).concat(options.args);
console.log('Building:', [process.execPath].concat(args).join(' '));
var proc = spawn(process.execPath, args, {
stdio: [0, 1, 2]
});
proc.on('exit', function(errorCode) {
if (!errorCode) {
afterBuild(options);
return;
}
if (errorCode === 127 ) {
console.error('node-gyp not found!');
} else {
console.error('Build failed with error code:', errorCode);
}
process.exit(1);
});
}
/**
* Parse arguments
*
* @param {Array} args
* @api private
*/
function parseArgs(args) {
var options = {
arch: process.arch,
platform: process.platform,
force: process.env.npm_config_force === 'true',
};
options.args = args.filter(function(arg) {
if (arg === '-f' || arg === '--force') {
options.force = true;
return false;
} else if (arg.substring(0, 13) === '--target_arch') {
options.arch = arg.substring(14);
} else if (arg === '-d' || arg === '--debug') {
options.debug = true;
} else if (arg.substring(0, 13) === '--libsass_ext' && arg.substring(14) !== 'no') {
options.libsassExt = true;
}
return true;
});
return options;
}
/**
* Test for pre-built library
*
* @param {Object} options
* @api private
*/
function testBinary(options) {
if (options.force || process.env.SASS_FORCE_BUILD) {
return build(options);
}
if (!sass.hasBinary(sass.getBinaryPath())) {
return build(options);
}
console.log('Binary found at', sass.getBinaryPath());
console.log('Testing binary');
try {
require('../').renderSync({
data: 's { a: ss }'
});
console.log('Binary is fine');
} catch (e) {
console.log('Binary has a problem:', e);
console.log('Building the binary locally');
return build(options);
}
}
/**
* Apply arguments and run
*/
testBinary(parseArgs(process.argv.slice(2)));
================================================
FILE: scripts/install.js
================================================
/*!
* node-sass: scripts/install.js
*/
var fs = require('fs'),
eol = require('os').EOL,
path = require('path'),
fetch = require('make-fetch-happen'),
sass = require('../lib/extensions'),
downloadOptions = require('./util/downloadoptions');
/**
* Download file, if succeeds save, if not delete
*
* @param {String} url
* @param {String} dest
* @param {Function} cb
* @api private
*/
function download(url, dest, cb) {
var reportError = function(err) {
cb(['Cannot download "', url, '": ', eol, eol,
typeof err.message === 'string' ? err.message : err, eol, eol,
'Hint: If github.com is not accessible in your location', eol,
' try setting a proxy via HTTP_PROXY, e.g. ', eol, eol,
' export HTTP_PROXY=http://example.com:1234',eol, eol,
'or configure npm proxy via', eol, eol,
' npm config set proxy http://example.com:8080'].join(''));
};
var successful = function(response) {
return response.status >= 200 && response.status < 300;
};
console.log('Downloading binary from', url);
try {
fetch(url, downloadOptions()).then(function (response) {
return response.buffer();
}).then(function (buffer) {
fs.createWriteStream(dest).on('error', cb).end(buffer, cb);
console.log('Download complete');
}).catch(function(err) {
if(!successful(err)) {
reportError(['HTTP error', err.code, err.message].join(' '));
} else {
reportError(err);
}
});
} catch (err) {
cb(err);
}
}
/**
* Check and download binary
*
* @api private
*/
function checkAndDownloadBinary() {
if (process.env.SKIP_SASS_BINARY_DOWNLOAD_FOR_CI) {
console.log('Skipping downloading binaries on CI builds');
return;
}
var cachedBinary = sass.getCachedBinary(),
cachePath = sass.getBinaryCachePath(),
binaryPath = sass.getBinaryPath();
if (sass.hasBinary(binaryPath)) {
console.log('node-sass build', 'Binary found at', binaryPath);
return;
}
try {
fs.mkdirSync(path.dirname(binaryPath), {recursive: true});
} catch (err) {
console.error('Unable to save binary', path.dirname(binaryPath), ':', err);
return;
}
if (cachedBinary) {
console.log('Cached binary found at', cachedBinary);
fs.createReadStream(cachedBinary).pipe(fs.createWriteStream(binaryPath));
return;
}
download(sass.getBinaryUrl(), binaryPath, function(err) {
if (err) {
console.error(err);
return;
}
console.log('Binary saved to', binaryPath);
cachedBinary = path.join(cachePath, sass.getBinaryName());
if (cachePath) {
console.log('Caching binary to', cachedBinary);
try {
fs.mkdirSync(path.dirname(cachedBinary), {recursive: true});
fs.createReadStream(binaryPath)
.pipe(fs.createWriteStream(cachedBinary))
.on('error', function (err) {
console.log('Failed to cache binary:', err);
});
} catch (err) {
console.log('Failed to cache binary:', err);
}
}
});
}
/**
* If binary does not exist, download it
*/
checkAndDownloadBinary();
================================================
FILE: scripts/prepublish.js
================================================
/*!
* node-sass: scripts/install.js
*/
var path = require('path'),
rimraf = require('rimraf');
function prepublish() {
var vendorPath = path.resolve(__dirname, '..', 'vendor');
rimraf.sync(vendorPath);
}
/**
* Run
*/
prepublish();
================================================
FILE: scripts/util/downloadoptions.js
================================================
var proxy = require('./proxy'),
userAgent = require('./useragent'),
rejectUnauthorized = require('./rejectUnauthorized');
/**
* The options passed to make-fetch-happen when downloading the binary
*
* @return {Object} an options object for make-fetch-happen
* @api private
*/
module.exports = function() {
var options = {
strictSSL: rejectUnauthorized(),
timeout: 60000,
headers: {
'User-Agent': userAgent(),
},
};
var proxyConfig = proxy();
if (proxyConfig) {
options.proxy = proxyConfig;
}
return options;
};
================================================
FILE: scripts/util/proxy.js
================================================
/**
* Determine the proxy settings configured by npm
*
* It's possible to configure npm to use a proxy different
* from the system defined proxy. This can be done via the
* `npm config` CLI or the `.npmrc` config file.
*
* If a proxy has been configured in this way we must
* tell request explicitly to use it.
*
* Otherwise we can trust request to the right thing.
*
* @return {String} the proxy configured by npm or an empty string
* @api private
*/
module.exports = function() {
return process.env.npm_config_https_proxy ||
process.env.npm_config_proxy ||
process.env.npm_config_http_proxy ||
'';
};
================================================
FILE: scripts/util/rejectUnauthorized.js
================================================
var pkg = require('../../package.json');
/**
* Get the value of a CLI argument
*
* @param {String} name
* @param {Array} args
* @api private
*/
function getArgument(name, args) {
var flags = args || process.argv.slice(2),
index = flags.lastIndexOf(name);
if (index === -1 || index + 1 >= flags.length) {
return null;
}
return flags[index + 1];
}
/**
* Get the value of reject-unauthorized
* If environment variable SASS_REJECT_UNAUTHORIZED is non-zero,
* .npmrc variable sass_reject_unauthorized or
* process argument --sass-reject_unauthorized is provided,
* set rejectUnauthorized to true
* Else set to false by default
*
* @return {Boolean} The value of rejectUnauthorized
* @api private
*/
module.exports = function() {
var rejectUnauthorized = false;
if (getArgument('--sass-reject-unauthorized')) {
rejectUnauthorized = getArgument('--sass-reject-unauthorized');
} else if (process.env.SASS_REJECT_UNAUTHORIZED !== '0') {
rejectUnauthorized = true;
} else if (process.env.npm_config_sass_reject_unauthorized) {
rejectUnauthorized = process.env.npm_config_sass_reject_unauthorized;
} else if (pkg.nodeSassConfig && pkg.nodeSassConfig.rejectUnauthorized) {
rejectUnauthorized = pkg.nodeSassConfig.rejectUnauthorized;
}
return rejectUnauthorized;
};
================================================
FILE: scripts/util/useragent.js
================================================
var pkg = require('../../package.json');
/**
* A custom user agent use for binary downloads.
*
* @api private
*/
module.exports = function() {
return [
'node/', process.version, ' ',
'node-sass-installer/', pkg.version
].join('');
};
================================================
FILE: src/binding.cpp
================================================
#include <nan.h>
#include <vector>
#include "sass_context_wrapper.h"
#include "custom_function_bridge.h"
#include "create_string.h"
#include "sass_types/factory.h"
Sass_Import_List sass_importer(const char* cur_path, Sass_Importer_Entry cb, struct Sass_Compiler* comp)
{
void* cookie = sass_importer_get_cookie(cb);
struct Sass_Import* previous = sass_compiler_get_last_import(comp);
const char* prev_path = sass_import_get_abs_path(previous);
CustomImporterBridge& bridge = *(static_cast<CustomImporterBridge*>(cookie));
std::vector<void*> argv;
argv.push_back((void*)cur_path);
argv.push_back((void*)prev_path);
return bridge(argv);
}
union Sass_Value* sass_custom_function(const union Sass_Value* s_args, Sass_Function_Entry cb, struct Sass_Compiler* comp)
{
void* cookie = sass_function_get_cookie(cb);
CustomFunctionBridge& bridge = *(static_cast<CustomFunctionBridge*>(cookie));
std::vector<void*> argv;
for (unsigned l = sass_list_get_length(s_args), i = 0; i < l; i++) {
argv.push_back((void*)sass_list_get_value(s_args, i));
}
return bridge(argv);
}
int ExtractOptions(v8::Local<v8::Object> options, void* cptr, sass_context_wrapper* ctx_w, bool is_file, bool is_sync) {
Nan::HandleScope scope;
struct Sass_Context* ctx;
v8::Local<v8::Value> result_ = Nan::Get(
options,
Nan::New("result").ToLocalChecked()
).ToLocalChecked();
if (!result_->IsObject()) {
Nan::ThrowTypeError("\"result\" element is not an object");
return -1;
}
ctx_w->result.Reset(result_.As<v8::Object>());
if (is_file) {
ctx_w->fctx = (struct Sass_File_Context*) cptr;
ctx = sass_file_context_get_context(ctx_w->fctx);
}
else {
ctx_w->dctx = (struct Sass_Data_Context*) cptr;
ctx = sass_data_context_get_context(ctx_w->dctx);
}
struct Sass_Options* sass_options = sass_context_get_options(ctx);
ctx_w->is_sync = is_sync;
if (!is_sync) {
ctx_w->request.data = ctx_w;
// async (callback) style
v8::Local<v8::Function> success_callback = v8::Local<v8::Function>::Cast(Nan::Get(options, Nan::New("success").ToLocalChecked()).ToLocalChecked());
v8::Local<v8::Function> error_callback = v8::Local<v8::Function>::Cast(Nan::Get(options, Nan::New("error").ToLocalChecked()).ToLocalChecked());
ctx_w->success_callback = new Nan::Callback(success_callback);
ctx_w->error_callback = new Nan::Callback(error_callback);
}
if (!is_file) {
ctx_w->file = create_string(Nan::Get(options, Nan::New("file").ToLocalChecked()));
sass_option_set_input_path(sass_options, ctx_w->file);
}
int indent_len = Nan::To<int32_t>(
Nan::Get(
options,
Nan::New("indentWidth").ToLocalChecked()
).ToLocalChecked()).FromJust();
ctx_w->indent = (char*)malloc(indent_len + 1);
strcpy(ctx_w->indent, std::string(
indent_len,
Nan::To<int32_t>(
Nan::Get(
options,
Nan::New("indentType").ToLocalChecked()
).ToLocalChecked()).FromJust() == 1 ? '\t' : ' '
).c_str());
ctx_w->linefeed = create_string(Nan::Get(options, Nan::New("linefeed").ToLocalChecked()));
ctx_w->include_path = create_string(Nan::Get(options, Nan::New("includePaths").ToLocalChecked()));
ctx_w->out_file = create_string(Nan::Get(options, Nan::New("outFile").ToLocalChecked()));
ctx_w->source_map = create_string(Nan::Get(options, Nan::New("sourceMap").ToLocalChecked()));
ctx_w->source_map_root = create_string(Nan::Get(options, Nan::New("sourceMapRoot").ToLocalChecked()));
sass_option_set_output_path(sass_options, ctx_w->out_file);
sass_option_set_output_style(sass_options, (Sass_Output_Style)Nan::To<int32_t>(Nan::Get(options, Nan::New("style").ToLocalChecked()).ToLocalChecked()).FromJust());
sass_option_set_is_indented_syntax_src(sass_options, Nan::To<bool>(Nan::Get(options, Nan::New("indentedSyntax").ToLocalChecked()).ToLocalChecked()).FromJust());
sass_option_set_source_comments(sass_options, Nan::To<bool>(Nan::Get(options, Nan::New("sourceComments").ToLocalChecked()).ToLocalChecked()).FromJust());
sass_option_set_omit_source_map_url(sass_options, Nan::To<bool>(Nan::Get(options, Nan::New("omitSourceMapUrl").ToLocalChecked()).ToLocalChecked()).FromJust());
sass_option_set_source_map_embed(sass_options, Nan::To<bool>(Nan::Get(options, Nan::New("sourceMapEmbed").ToLocalChecked()).ToLocalChecked()).FromJust());
sass_option_set_source_map_contents(sass_options, Nan::To<bool>(Nan::Get(options, Nan::New("sourceMapContents").ToLocalChecked()).ToLocalChecked()).FromJust());
sass_option_set_source_map_file(sass_options, ctx_w->source_map);
sass_option_set_source_map_root(sass_options, ctx_w->source_map_root);
sass_option_set_include_path(sass_options, ctx_w->include_path);
sass_option_set_precision(sass_options, Nan::To<int32_t>(Nan::Get(options, Nan::New("precision").ToLocalChecked()).ToLocalChecked()).FromJust());
sass_option_set_indent(sass_options, ctx_w->indent);
sass_option_set_linefeed(sass_options, ctx_w->linefeed);
v8::Local<v8::Value> importer_callback = Nan::Get(options, Nan::New("importer").ToLocalChecked()).ToLocalChecked();
if (importer_callback->IsFunction()) {
v8::Local<v8::Function> importer = importer_callback.As<v8::Function>();
CustomImporterBridge *bridge = new CustomImporterBridge(importer, ctx_w->is_sync);
ctx_w->importer_bridges.push_back(bridge);
Sass_Importer_List c_importers = sass_make_importer_list(1);
c_importers[0] = sass_make_importer(sass_importer, 0, bridge);
sass_option_set_c_importers(sass_options, c_importers);
}
else if (importer_callback->IsArray()) {
v8::Local<v8::Array> importers = importer_callback.As<v8::Array>();
Sass_Importer_List c_importers = sass_make_importer_list(importers->Length());
for (size_t i = 0; i < importers->Length(); ++i) {
v8::Local<v8::Function> callback = v8::Local<v8::Function>::Cast(Nan::Get(importers, static_cast<uint32_t>(i)).ToLocalChecked());
CustomImporterBridge *bridge = new CustomImporterBridge(callback, ctx_w->is_sync);
ctx_w->importer_bridges.push_back(bridge);
c_importers[i] = sass_make_importer(sass_importer, importers->Length() - i - 1, bridge);
}
sass_option_set_c_importers(sass_options, c_importers);
}
v8::Local<v8::Value> custom_functions = Nan::Get(options, Nan::New("functions").ToLocalChecked()).ToLocalChecked();
if (custom_functions->IsObject()) {
v8::Local<v8::Object> functions = custom_functions.As<v8::Object>();
v8::Local<v8::Array> signatures = Nan::GetOwnPropertyNames(functions).ToLocalChecked();
unsigned num_signatures = signatures->Length();
Sass_Function_List fn_list = sass_make_function_list(num_signatures);
for (unsigned i = 0; i < num_signatures; i++) {
v8::Local<v8::String> signature = v8::Local<v8::String>::Cast(Nan::Get(signatures, Nan::New(i)).ToLocalChecked());
v8::Local<v8::Function> callback = v8::Local<v8::Function>::Cast(Nan::Get(functions, signature).ToLocalChecked());
CustomFunctionBridge *bridge = new CustomFunctionBridge(callback, ctx_w->is_sync);
ctx_w->function_bridges.push_back(bridge);
char* sig = create_string(signature);
Sass_Function_Entry fn = sass_make_function(sig, sass_custom_function, bridge);
free(sig);
sass_function_set_list_entry(fn_list, i, fn);
}
sass_option_set_c_functions(sass_options, fn_list);
}
return 0;
}
void GetStats(sass_context_wrapper* ctx_w, Sass_Context* ctx) {
Nan::HandleScope scope;
char** included_files = sass_context_get_included_files(ctx);
v8::Local<v8::Array> arr = Nan::New<v8::Array>();
if (included_files) {
for (int i = 0; included_files[i] != nullptr; ++i) {
Nan::Set(arr, i, Nan::New<v8::String>(included_files[i]).ToLocalChecked());
}
}
v8::Local<v8::Object> result = Nan::New(ctx_w->result);
assert(result->IsObject());
v8::Local<v8::Value> stats = Nan::Get(
result,
Nan::New("stats").ToLocalChecked()
).ToLocalChecked();
if (stats->IsObject()) {
Nan::Set(
stats.As<v8::Object>(),
Nan::New("includedFiles").ToLocalChecked(),
arr
);
} else {
Nan::ThrowTypeError("\"result.stats\" element is not an object");
}
}
int GetResult(sass_context_wrapper* ctx_w, Sass_Context* ctx, bool is_sync = false) {
Nan::HandleScope scope;
v8::Local<v8::Object> result;
int status = sass_context_get_error_status(ctx);
result = Nan::New(ctx_w->result);
assert(result->IsObject());
if (status == 0) {
const char* css = sass_context_get_output_string(ctx);
const char* map = sass_context_get_source_map_string(ctx);
Nan::Set(result, Nan::New("css").ToLocalChecked(), Nan::CopyBuffer(css, static_cast<uint32_t>(strlen(css))).ToLocalChecked());
GetStats(ctx_w, ctx);
if (map) {
Nan::Set(result, Nan::New("map").ToLocalChecked(), Nan::CopyBuffer(map, static_cast<uint32_t>(strlen(map))).ToLocalChecked());
}
}
else if (is_sync) {
Nan::Set(result, Nan::New("error").ToLocalChecked(), Nan::New<v8::String>(sass_context_get_error_json(ctx)).ToLocalChecked());
}
return status;
}
void PerformCall(sass_context_wrapper* ctx_w, Nan::Callback* callback, int argc, v8::Local<v8::Value> argv[]) {
if (ctx_w->is_sync) {
Nan::Call(*callback, argc, argv);
} else {
callback->Call(argc, argv, ctx_w->async_resource);
}
}
void MakeCallback(uv_work_t* req) {
Nan::HandleScope scope;
Nan::TryCatch try_catch;
sass_context_wrapper* ctx_w = static_cast<sass_context_wrapper*>(req->data);
struct Sass_Context* ctx;
if (ctx_w->dctx) {
ctx = sass_data_context_get_context(ctx_w->dctx);
}
else {
ctx = sass_file_context_get_context(ctx_w->fctx);
}
int status = GetResult(ctx_w, ctx);
if (status == 0 && ctx_w->success_callback) {
// if no error, do callback(null, result)
PerformCall(ctx_w, ctx_w->success_callback, 0, 0);
}
else if (ctx_w->error_callback) {
// if error, do callback(error)
const char* err = sass_context_get_error_json(ctx);
v8::Local<v8::Value> argv[] = {
Nan::New<v8::String>(err).ToLocalChecked()
};
PerformCall(ctx_w, ctx_w->error_callback, 1, argv);
}
if (try_catch.HasCaught()) {
Nan::FatalException(try_catch);
}
sass_free_context_wrapper(ctx_w);
}
NAN_METHOD(render) {
v8::Local<v8::Object> options = Nan::To<v8::Object>(info[0]).ToLocalChecked();
char* source_string = create_string(Nan::Get(options, Nan::New("data").ToLocalChecked()));
struct Sass_Data_Context* dctx = sass_make_data_context(source_string);
sass_context_wrapper* ctx_w = sass_make_context_wrapper();
ctx_w->async_resource = new Nan::AsyncResource("node-sass:sass_context_wrapper:render");
if (ExtractOptions(options, dctx, ctx_w, false, false) >= 0) {
int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
assert(status == 0);
}
}
NAN_METHOD(render_sync) {
v8::Local<v8::Object> options = Nan::To<v8::Object>(info[0]).ToLocalChecked();
char* source_string = create_string(Nan::Get(options, Nan::New("data").ToLocalChecked()));
struct Sass_Data_Context* dctx = sass_make_data_context(source_string);
struct Sass_Context* ctx = sass_data_context_get_context(dctx);
sass_context_wrapper* ctx_w = sass_make_context_wrapper();
int result = -1;
if ((result = ExtractOptions(options, dctx, ctx_w, false, true)) >= 0) {
compile_data(dctx);
result = GetResult(ctx_w, ctx, true);
}
sass_free_context_wrapper(ctx_w);
info.GetReturnValue().Set(result == 0);
}
NAN_METHOD(render_file) {
v8::Local<v8::Object> options = Nan::To<v8::Object>(info[0]).ToLocalChecked();
char* input_path = create_string(Nan::Get(options, Nan::New("file").ToLocalChecked()));
struct Sass_File_Context* fctx = sass_make_file_context(input_path);
sass_context_wrapper* ctx_w = sass_make_context_wrapper();
ctx_w->async_resource = new Nan::AsyncResource("node-sass:sass_context_wrapper:render_file");
if (ExtractOptions(options, fctx, ctx_w, true, false) >= 0) {
int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
assert(status == 0);
}
}
NAN_METHOD(render_file_sync) {
v8::Local<v8::Object> options = Nan::To<v8::Object>(info[0]).ToLocalChecked();
char* input_path = create_string(Nan::Get(options, Nan::New("file").ToLocalChecked()));
struct Sass_File_Context* fctx = sass_make_file_context(input_path);
struct Sass_Context* ctx = sass_file_context_get_context(fctx);
sass_context_wrapper* ctx_w = sass_make_context_wrapper();
int result = -1;
if ((result = ExtractOptions(options, fctx, ctx_w, true, true)) >= 0) {
compile_file(fctx);
result = GetResult(ctx_w, ctx, true);
};
free(input_path);
sass_free_context_wrapper(ctx_w);
info.GetReturnValue().Set(result == 0);
}
NAN_METHOD(libsass_version) {
info.GetReturnValue().Set(Nan::New<v8::String>(libsass_version()).ToLocalChecked());
}
NAN_MODULE_INIT(RegisterModule) {
Nan::SetMethod(target, "render", render);
Nan::SetMethod(target, "renderSync", render_sync);
Nan::SetMethod(target, "renderFile", render_file);
Nan::SetMethod(target, "renderFileSync", render_file_sync);
Nan::SetMethod(target, "libsassVersion", libsass_version);
SassTypes::Factory::initExports(target);
}
NODE_MODULE(binding, RegisterModule);
================================================
FILE: src/callback_bridge.h
================================================
#ifndef CALLBACK_BRIDGE_H
#define CALLBACK_BRIDGE_H
#include <vector>
#include <nan.h>
#include <algorithm>
#include <uv.h>
#define COMMA ,
template <typename T, typename L = void*>
class CallbackBridge {
public:
CallbackBridge(v8::Local<v8::Function>, bool);
virtual ~CallbackBridge();
// Executes the callback
T operator()(std::vector<void*>);
protected:
// We will expose a bridge object to the JS callback that wraps this instance so we don't loose context.
// This is the V8 constructor for such objects.
static Nan::MaybeLocal<v8::Function> get_wrapper_constructor();
static void async_gone(uv_handle_t *handle);
static NAN_METHOD(New);
static NAN_METHOD(ReturnCallback);
static Nan::Persistent<v8::Function> wrapper_constructor;
Nan::Persistent<v8::Object> wrapper;
// The callback that will get called in the main thread after the worker thread used for the sass
// compilation step makes a call to uv_async_send()
static void dispatched_async_uv_callback(uv_async_t*);
// The V8 values sent to our ReturnCallback must be read on the main thread not the sass worker thread.
// This gives a chance to specialized subclasses to transform those values into whatever makes sense to
// sass before we resume the worker thread.
virtual T post_process_return_value(v8::Local<v8::Value>) const =0;
virtual std::vector<v8::Local<v8::Value>> pre_process_args(std::vector<L>) const =0;
Nan::Callback* callback;
Nan::AsyncResource* async_resource;
bool is_sync;
uv_mutex_t cv_mutex;
uv_cond_t condition_variable;
uv_async_t *async;
std::vector<L> argv;
bool has_returned;
T return_value;
};
template <typename T, typename L>
Nan::Persistent<v8::Function> CallbackBridge<T, L>::wrapper_constructor;
template <typename T, typename L>
CallbackBridge<T, L>::CallbackBridge(v8::Local<v8::Function> callback, bool is_sync) : callback(new Nan::Callback(callback)), is_sync(is_sync) {
/*
* This is invoked from the main JavaScript thread.
* V8 context is available.
*/
Nan::HandleScope scope;
uv_mutex_init(&this->cv_mutex);
uv_cond_init(&this->condition_variable);
if (!is_sync) {
this->async = new uv_async_t;
this->async->data = (void*) this;
uv_async_init(uv_default_loop(), this->async, (uv_async_cb) dispatched_async_uv_callback);
this->async_resource = new Nan::AsyncResource("node-sass:CallbackBridge");
}
v8::Local<v8::Function> func = CallbackBridge<T, L>::get_wrapper_constructor().ToLocalChecked();
wrapper.Reset(Nan::NewInstance(func).ToLocalChecked());
Nan::SetInternalFieldPointer(Nan::New(wrapper), 0, this);
}
template <typename T, typename L>
CallbackBridge<T, L>::~CallbackBridge() {
delete this->callback;
this->wrapper.Reset();
uv_cond_destroy(&this->condition_variable);
uv_mutex_destroy(&this->cv_mutex);
if (!is_sync) {
uv_close((uv_handle_t*)this->async, &async_gone);
delete this->async_resource;
}
}
template <typename T, typename L>
T CallbackBridge<T, L>::operator()(std::vector<void*> argv) {
// argv.push_back(wrapper);
if (this->is_sync) {
/*
* This is invoked from the main JavaScript thread.
* V8 context is available.
*
* Establish Local<> scope for all functions
* from types invoked by pre_process_args() and
* post_process_args().
*/
Nan::HandleScope scope;
Nan::TryCatch try_catch;
std::vector<v8::Local<v8::Value>> argv_v8 = pre_process_args(argv);
if (try_catch.HasCaught()) {
Nan::FatalException(try_catch);
}
argv_v8.push_back(Nan::New(wrapper));
return this->post_process_return_value(
Nan::Call(*this->callback, argv_v8.size(), &argv_v8[0]).ToLocalChecked()
);
} else {
/*
* This is invoked from the worker thread.
* No V8 context and functions available.
* Just wait for response from asynchronously
* scheduled JavaScript code
*
* XXX Issue #1048: We block here even if the
* event loop stops and the callback
* would never be executed.
* XXX Issue #857: By waiting here we occupy
* one of the threads taken from the
* uv threadpool. Might deadlock if
* async I/O executed from JavaScript callbacks.
*/
this->argv = argv;
uv_mutex_lock(&this->cv_mutex);
this->has_returned = false;
uv_async_send(this->async);
while (!this->has_returned) {
uv_cond_wait(&this->condition_variable, &this->cv_mutex);
}
uv_mutex_unlock(&this->cv_mutex);
return this->return_value;
}
}
template <typename T, typename L>
void CallbackBridge<T, L>::dispatched_async_uv_callback(uv_async_t *req) {
CallbackBridge* bridge = static_cast<CallbackBridge*>(req->data);
/*
* Function scheduled via uv_async mechanism, therefore
* it is invoked from the main JavaScript thread.
* V8 context is available.
*
* Establish Local<> scope for all functions
* from types invoked by pre_process_args() and
* post_process_args().
*/
Nan::HandleScope scope;
Nan::TryCatch try_catch;
std::vector<v8::Local<v8::Value>> argv_v8 = bridge->pre_process_args(bridge->argv);
if (try_catch.HasCaught()) {
Nan::FatalException(try_catch);
}
argv_v8.push_back(Nan::New(bridge->wrapper));
bridge->callback->Call(argv_v8.size(), &argv_v8[0], bridge->async_resource);
if (try_catch.HasCaught()) {
Nan::FatalException(try_catch);
}
}
template <typename T, typename L>
NAN_METHOD(CallbackBridge<T COMMA L>::ReturnCallback) {
/*
* Callback function invoked by the user code.
* It is invoked from the main JavaScript thread.
* V8 context is available.
*
* Implicit Local<> handle scope created by NAN_METHOD(.)
*/
CallbackBridge<T, L>* bridge = static_cast<CallbackBridge<T, L>*>(Nan::GetInternalFieldPointer(info.This(), 0));
Nan::TryCatch try_catch;
bridge->return_value = bridge->post_process_return_value(info[0]);
{
uv_mutex_lock(&bridge->cv_mutex);
bridge->has_returned = true;
uv_mutex_unlock(&bridge->cv_mutex);
}
uv_cond_broadcast(&bridge->condition_variable);
if (try_catch.HasCaught()) {
Nan::FatalException(try_catch);
}
}
template <typename T, typename L>
Nan::MaybeLocal<v8::Function> CallbackBridge<T, L>::get_wrapper_constructor() {
/* Uses handle scope created in the CallbackBridge<T, L> constructor */
if (wrapper_constructor.IsEmpty()) {
v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
tpl->SetClassName(Nan::New("CallbackBridge").ToLocalChecked());
tpl->InstanceTemplate()->SetInternalFieldCount(1);
Nan::SetPrototypeTemplate(tpl, "success",
Nan::New<v8::FunctionTemplate>(ReturnCallback)
);
wrapper_constructor.Reset(Nan::GetFunction(tpl).ToLocalChecked());
}
return Nan::New(wrapper_constructor);
}
template <typename T, typename L>
NAN_METHOD(CallbackBridge<T COMMA L>::New) {
info.GetReturnValue().Set(info.This());
}
template <typename T, typename L>
void CallbackBridge<T, L>::async_gone(uv_handle_t *handle) {
delete (uv_async_t *)handle;
}
#endif
================================================
FILE: src/create_string.cpp
================================================
#include <nan.h>
#include <stdlib.h>
#include <string.h>
#include "create_string.h"
char* create_string(Nan::MaybeLocal<v8::Value> maybevalue) {
v8::Local<v8::Value> value;
if (maybevalue.ToLocal(&value)) {
if (value->IsNull() || !value->IsString()) {
return 0;
}
} else {
return 0;
}
Nan::Utf8String string(value);
char *str = (char *)malloc(string.length() + 1);
strcpy(str, *string);
return str;
}
================================================
FILE: src/create_string.h
================================================
#ifndef CREATE_STRING_H
#define CREATE_STRING_H
#include <nan.h>
char* create_string(Nan::MaybeLocal<v8::Value>);
#endif
================================================
FILE: src/custom_function_bridge.cpp
================================================
#include <nan.h>
#include <stdexcept>
#include "custom_function_bridge.h"
#include "sass_types/factory.h"
#include "sass_types/value.h"
Sass_Value* CustomFunctionBridge::post_process_return_value(v8::Local<v8::Value> _val) const {
SassTypes::Value *value = SassTypes::Factory::unwrap(_val);
if (value) {
return value->get_sass_value();
} else {
return sass_make_error("A SassValue object was expected.");
}
}
std::vector<v8::Local<v8::Value>> CustomFunctionBridge::pre_process_args(std::vector<void*> in) const {
std::vector<v8::Local<v8::Value>> argv = std::vector<v8::Local<v8::Value>>();
for (void* value : in) {
Sass_Value* x = static_cast<Sass_Value*>(value);
SassTypes::Value* y = SassTypes::Factory::create(x);
argv.push_back(y->get_js_object());
}
return argv;
}
================================================
FILE: src/custom_function_bridge.h
================================================
#ifndef CUSTOM_FUNCTION_BRIDGE_H
#define CUSTOM_FUNCTION_BRIDGE_H
#include <nan.h>
#include <sass/values.h>
#include <sass/functions.h>
#include "callback_bridge.h"
class CustomFunctionBridge : public CallbackBridge<Sass_Value*> {
public:
CustomFunctionBridge(v8::Local<v8::Function> cb, bool is_sync) : CallbackBridge<Sass_Value*>(cb, is_sync) {}
private:
Sass_Value* post_process_return_value(v8::Local<v8::Value>) const;
std::vector<v8::Local<v8::Value>> pre_process_args(std::vector<void*>) const;
};
#endif
================================================
FILE: src/custom_importer_bridge.cpp
================================================
#include <nan.h>
#include <stdexcept>
#include "custom_importer_bridge.h"
#include "create_string.h"
SassImportList CustomImporterBridge::post_process_return_value(v8::Local<v8::Value> returned_value) const {
SassImportList imports = 0;
Nan::HandleScope scope;
if (returned_value->IsArray()) {
v8::Local<v8::Array> array = returned_value.As<v8::Array>();
imports = sass_make_import_list(array->Length());
for (size_t i = 0; i < array->Length(); ++i) {
v8::Local<v8::Value> value;
Nan::MaybeLocal<v8::Value> unchecked = Nan::Get(array, static_cast<uint32_t>(i));
if (!unchecked.ToLocal(&value) || !value->IsObject()) {
imports[i] = sass_make_import_entry(0, 0, 0);
sass_import_set_error(imports[i], "returned array must only contain object literals", -1, -1);
continue;
}
v8::Local<v8::Object> object = value.As<v8::Object>();
if (value->IsNativeError()) {
char* message = create_string(Nan::Get(object, Nan::New<v8::String>("message").ToLocalChecked()));
imports[i] = sass_make_import_entry(0, 0, 0);
sass_import_set_error(imports[i], message, -1, -1);
free(message);
}
else {
imports[i] = get_importer_entry(object);
}
}
}
else if (returned_value->IsNativeError()) {
imports = sass_make_import_list(1);
v8::Local<v8::Object> object = returned_value.As<v8::Object>();
char* message = create_string(Nan::Get(object, Nan::New<v8::String>("message").ToLocalChecked()));
imports[0] = sass_make_import_entry(0, 0, 0);
sass_import_set_error(imports[0], message, -1, -1);
free(message);
}
else if (returned_value->IsObject()) {
imports = sass_make_import_list(1);
imports[0] = get_importer_entry(returned_value.As<v8::Object>());
}
return imports;
}
Sass_Import* CustomImporterBridge::check_returned_string(Nan::MaybeLocal<v8::Value> value, const char *msg) const
{
v8::Local<v8::Value> checked;
if (value.ToLocal(&checked)) {
if (!checked->IsUndefined() && !checked->IsString()) {
goto err;
} else {
return nullptr;
}
}
err:
auto entry = sass_make_import_entry(0, 0, 0);
sass_import_set_error(entry, msg, -1, -1);
return entry;
}
Sass_Import* CustomImporterBridge::get_importer_entry(const v8::Local<v8::Object>& object) const {
Nan::MaybeLocal<v8::Value> returned_file = Nan::Get(object, Nan::New<v8::String>("file").ToLocalChecked());
Nan::MaybeLocal<v8::Value> returned_contents = Nan::Get(object, Nan::New<v8::String>("contents").ToLocalChecked());
Nan::MaybeLocal<v8::Value> returned_map = Nan::Get(object, Nan::New<v8::String>("map").ToLocalChecked());
Sass_Import *err;
if ((err = check_returned_string(returned_file, "returned value of `file` must be a string")))
return err;
if ((err = check_returned_string(returned_contents, "returned value of `contents` must be a string")))
return err;
if ((err = check_returned_string(returned_map, "returned value of `returned_map` must be a string")))
return err;
char* path = create_string(returned_file);
char* contents = create_string(returned_contents);
char* srcmap = create_string(returned_map);
return sass_make_import_entry(path, contents, srcmap);
}
std::vector<v8::Local<v8::Value>> CustomImporterBridge::pre_process_args(std::vector<void*> in) const {
std::vector<v8::Local<v8::Value>> out;
for (void* ptr : in) {
out.push_back(Nan::New<v8::String>((char const*)ptr).ToLocalChecked());
}
return out;
}
================================================
FILE: src/custom_importer_bridge.h
================================================
#ifndef CUSTOM_IMPORTER_BRIDGE_H
#define CUSTOM_IMPORTER_BRIDGE_H
#include <nan.h>
#include <sass/functions.h>
#include <sass/values.h>
#include "callback_bridge.h"
typedef Sass_Import_List SassImportList;
class CustomImporterBridge : public CallbackBridge<SassImportList> {
public:
CustomImporterBridge(v8::Local<v8::Function> cb, bool is_sync) : CallbackBridge<SassImportList>(cb, is_sync) {}
private:
SassImportList post_process_return_value(v8::Local<v8::Value>) const;
Sass_Import* check_returned_string(Nan::MaybeLocal<v8::Value> value, const char *msg) const;
Sass_Import* get_importer_entry(const v8::Local<v8::Object>&) const;
std::vector<v8::Local<v8::Value>> pre_process_args(std::vector<void*>) const;
};
#endif
================================================
FILE: src/libsass/.editorconfig
================================================
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
[{Makefile, GNUmakefile.am}]
indent_style = tab
indent_size = 4
================================================
FILE: src/libsass/.gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
================================================
FILE: src/libsass/.github/CONTRIBUTING.md
================================================
# Contributing to LibSass
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
The following is a set of guidelines for contributing to LibSass, which is hosted in the [Sass Organization](https://github.com/sass) on GitHub.
These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.
LibSass is a library that implements a [sass language][8] compiler. As such it does not directly interface with end users (frontend developers).
For direct contributions to the LibSass code base you will need to have at least a rough idea of C++, we will not lie about that.
But there are other ways to contribute to the progress of LibSass. All contributions are done via github pull requests.
You can also contribute to the LibSass [documentation][9] or provide additional [spec tests][10] (and we will gladly point you in the
direction for corners that lack test coverage). Foremost we rely on good and concise bug reports for issues the spec tests do not yet catch.
## Precheck: My Sass isn't compiling
- [ ] Check if you can reproduce the issue via [SourceMap Inspector][5] (updated regularly).
- [ ] Validate official ruby sass compiler via [SassMeister][6] produces your expected result.
- [ ] Search for similar issue in [LibSass][1] and [node-sass][2] (include closed tickets)
- [ ] Optionally test your code directly with [sass][7] or [sassc][3] ([installer][4])
## Precheck: My build/install fails
- [ ] Problems with building or installing libsass should be directed to implementors first!
- [ ] Except for issues directly verified via sassc or LibSass own build (make/autotools9
## Craft a meaningfull error report
- [ ] Include the version of libsass and the implementor (i.e. node-sass or sassc)
- [ ] Include information about your operating system and environment (i.e. io.js)
- [ ] Either create a self contained sample that shows your issue ...
- [ ] ... or provide it as a fetchable (github preferred) archive/repo
- [ ] ... and include a step by step list of command to get all dependencies
- [ ] Make it clear if you use indented or/and scss syntax
## My error is hiding in a big code base
1. we do not have time to support your code base!
2. to fix occuring issues we need precise bug reports
3. the more precise you are, the faster we can help you
4. lazy reports get overlooked even when exposing serious bugs
5. it's not hard to do, it only takes time
- [ ] Make sure you saved the current state (i.e. commit to git)
- [ ] Start by uncommenting blocks in the initial source file
- [ ] Check if the problem is still there after each edit
- [ ] Repeat until the problem goes away
- [ ] Inline imported files as you go along
- [ ] Finished once you cannot remove more
- [ ] The emphasis is on the word "repeat" ...
## What makes a code test case
Important is that someone else can get the test case up and running to reproduce it locally. For this
we urge you to verify that your sample yields the expected result by testing it via [SassMeister][6]
or directly via ruby sass or node-sass (or any other libsass implementor) before submitting your bug
report. Once you verified all of the above, you may use the template below to file your bug report.
[1]: https://github.com/sass/libsass/issues?utf8=%E2%9C%93&q=is%3Aissue
[2]: https://github.com/sass/node-sass/issues?utf8=%E2%9C%93&q=is%3Aissue
[3]: https://github.com/sass/sassc
[4]: http://libsass.ocbnet.ch/installer/
[5]: http://libsass.ocbnet.ch/srcmap/
[6]: http://www.sassmeister.com/
[7]: https://rubygems.org/gems/sass
[8]: http://sass-lang.com/
[9]: https://github.com/sass/libsass/tree/master/docs
[10]: https://github.com/sass/sass-spec
================================================
FILE: src/libsass/.github/ISSUE_TEMPLATE.md
================================================
[todo]: # (Title: Be as meaningful as possible)
[todo]: # (Title: Try to use 60 or less chars)
[todo]: # (This is only a template!)
[todo]: # (remove unneeded bits)
[todo]: # (use github preview!)
## input.scss
[todo]: # (always test and report with scss syntax)
[todo]: # (use sass only when results differ from scss)
```scss
test {
content: bar
}
```
## Actual results
[todo]: # (update version info!)
[libsass 3.X.y][1]
```css
test {
content: bar; }
```
## Expected result
[todo]: # (update version info!)
ruby sass 3.X.y
```css
test {
content: bar; }
```
[todo]: # (update version info!)
[todo]: # (example for node-sass!)
version info:
```cmd
$ node-sass --version
node-sass 3.X.y (Wrapper) [JavaScript]
libsass 3.X.y (Sass Compiler) [C/C++]
```
[todo]: # (Go to http://libsass.ocbnet.ch/srcmap)
[todo]: # (Enter your SCSS code and hit compile)
[todo]: # (Click `bookmark` and replace the url)
[todo]: # (link is used in actual results above)
[1]: http://libsass.ocbnet.ch/srcmap/#dGVzdCB7CiAgY29udGVudDogYmFyOyB9Cg==
================================================
FILE: src/libsass/.gitignore
================================================
# Miscellaneous stuff
/sassc
/sass-spec
VERSION
.DS_Store
.sass-cache
*.gem
*.gcno
.svn/*
.cproject
.project
.settings/
*.db
*.aps
# Configuration stuff
GNUmakefile.in
GNUmakefile
/aclocal.m4
/autom4te.cache/
/src/config.h
/config.h.in
/config.log
/config.status
/configure
/libtool
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/script/ar-lib
/script/compile
/script/config.guess
/script/config.sub
/script/depcomp
/script/install-sh
/script/ltmain.sh
/script/missing
/script/test-driver
/src/stamp-h1
/src/Makefile.in
/src/Makefile
libsass/*
# Build stuff
*.o
*.lo
*.so
*.dll
*.a
*.suo
*.sdf
*.opendb
*.opensdf
a.out
libsass.js
tester
tester.exe
build/
config.h.in*
lib/pkgconfig/
bin/*
.deps/
.libs/
win/bin
*.user
win/*.db
# Final results
sassc++
libsass.la
src/support/libsass.pc
# Cloned testing dirs
sassc/
sass-spec/
installer/
================================================
FILE: src/libsass/.travis.yml
================================================
language: cpp
sudo: false
# don't create redundant code coverage reports
# - AUTOTOOLS=yes COVERAGE=yes BUILD=static
# - AUTOTOOLS=no COVERAGE=yes BUILD=shared
# - AUTOTOOLS=no COVERAGE=no BUILD=static
# further speed up day by day travis-ci builds
# re-enable this if you change the makefiles
# this will still catch all coding errors!
# - AUTOTOOLS=yes COVERAGE=no BUILD=static
# currenty there are various issues when
# built with coverage, clang and autotools
# - AUTOTOOLS=yes COVERAGE=yes BUILD=shared
matrix:
include :
- os: linux
compiler: gcc
env: AUTOTOOLS=no COVERAGE=yes BUILD=static
- os: linux
compiler: g++-5
env: AUTOTOOLS=yes COVERAGE=no BUILD=shared
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- os: linux
compiler: clang++-3.7
env: AUTOTOOLS=no COVERAGE=yes BUILD=static
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- clang-3.7
- os: linux
compiler: clang
env: AUTOTOOLS=yes COVERAGE=no BUILD=shared
- os: osx
compiler: clang
env: AUTOTOOLS=no COVERAGE=no BUILD=shared
- os: osx
compiler: clang
env: AUTOTOOLS=no COVERAGE=yes BUILD=static
- os: osx
compiler: clang
env: AUTOTOOLS=yes COVERAGE=no BUILD=shared
script:
- ./script/ci-build-libsass
- ./script/ci-build-plugin math
- ./script/ci-build-plugin glob
- ./script/ci-build-plugin digest
- ./script/ci-build-plugin tests
before_install: ./script/ci-install-deps
install: ./script/ci-install-compiler
after_success: ./script/ci-report-coverage
================================================
FILE: src/libsass/COPYING
================================================
Copyright (C) 2012 by Hampton Catlin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The following files in the spec were taken from the original Ruby Sass project which
is copyright Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein and under
the same license.
================================================
FILE: src/libsass/GNUmakefile.am
================================================
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -I script
AM_COPT = -Wall -O2
AM_COVLDFLAGS =
if ENABLE_COVERAGE
AM_COPT = -Wall -O1 -fno-omit-frame-pointer --coverage
AM_COVLDFLAGS += -lgcov
endif
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = $(AM_COPT)
AM_CXXFLAGS = $(AM_COPT)
AM_LDFLAGS = $(AM_COPT) $(AM_COVLDFLAGS)
# only needed to support old source tree
# we have moved the files to src folder
AM_CPPFLAGS += -I$(top_srcdir)
RESOURCES =
if COMPILER_IS_MINGW32
RESOURCES += res/libsass.rc
AM_CXXFLAGS += -std=gnu++0x
else
AM_CXXFLAGS += -std=c++0x
endif
TEST_EXTENSIONS = .rb
if ENABLE_TESTS
SASS_SASSC_PATH ?= $(top_srcdir)/sassc
SASS_SPEC_PATH ?= $(top_srcdir)/sass-spec
noinst_PROGRAMS = tester
tester_LDADD = src/libsass.la
tester_LDFLAGS = $(AM_LDFLAGS)
nodist_tester_SOURCES = $(SASS_SASSC_PATH)/sassc.c
SASS_SASSC_VERSION ?= `cd "$(SASS_SASSC_PATH)" && ./version.sh`
tester_CFLAGS = $(AM_CFLAGS) -DSASSC_VERSION="\"$(SASS_SASSC_VERSION)\""
tester_CXXFLAGS = $(AM_CXXFLAGS) -DSASSC_VERSION="\"$(SASS_SASSC_VERSION)\""
if ENABLE_COVERAGE
nodist_EXTRA_tester_SOURCES = non-existent-file-to-force-CXX-linking.cxx
endif
TESTS = $(SASS_SPEC_PATH)/sass-spec.rb
RB_LOG_COMPILER = ./script/tap-runner
AM_RB_LOG_FLAGS = $(RUBY)
SASS_TEST_FLAGS = -V 3.5 --impl libsass
SASS_TEST_FLAGS += -r $(SASS_SPEC_PATH)
SASS_TEST_FLAGS += -c $(top_srcdir)/tester$(EXEEXT)
AM_TESTS_ENVIRONMENT = TEST_FLAGS='$(SASS_TEST_FLAGS)'
SASS_TESTER = $(RUBY) $(SASS_SPEC_PATH)/sass-spec.rb
test:
$(SASS_TESTER) $(SASS_TEST_FLAGS)
test_build:
$(SASS_TESTER) $(SASS_TEST_FLAGS)
test_full:
$(SASS_TESTER) --run-todo $(SASS_TEST_FLAGS)
test_probe:
$(SASS_TESTER) --probe-todo $(SASS_TEST_FLAGS)
.PHONY: test test_build test_full test_probe
endif
SUBDIRS = src
================================================
FILE: src/libsass/INSTALL
================================================
// Autotools requires us to have this file. Boo.
================================================
FILE: src/libsass/LICENSE
================================================
Copyright (C) 2012-2016 by the Sass Open Source Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The following files in the spec were taken from the original Ruby Sass project which
is copyright Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein and under
the same license.
================================================
FILE: src/libsass/Makefile
================================================
OS ?= $(shell uname -s)
CC ?= gcc
CXX ?= g++
RM ?= rm -f
CP ?= cp -a
MKDIR ?= mkdir
RMDIR ?= rmdir
WINDRES ?= windres
# Solaris/Illumos flavors
# ginstall from coreutils
ifeq ($(OS),SunOS)
INSTALL ?= ginstall
endif
INSTALL ?= install
CFLAGS ?= -Wall
CXXFLAGS ?= -Wall
LDFLAGS ?= -Wall
ifeq "x$(COVERAGE)" "x"
CFLAGS += -O2
CXXFLAGS += -O2
LDFLAGS += -O2
else
CFLAGS += -O1 -fno-omit-frame-pointer
CXXFLAGS += -O1 -fno-omit-frame-pointer
LDFLAGS += -O1 -fno-omit-frame-pointer
endif
LDFLAGS += -Wl,-undefined,error
CAT ?= $(if $(filter $(OS),Windows_NT),type,cat)
ifneq (,$(findstring /cygdrive/,$(PATH)))
UNAME := Cygwin
else
ifneq (,$(findstring Windows_NT,$(OS)))
UNAME := Windows
else
ifneq (,$(findstring mingw32,$(MAKE)))
UNAME := Windows
else
ifneq (,$(findstring MINGW32,$(shell uname -s)))
UNAME = Windows
else
UNAME := $(shell uname -s)
endif
endif
endif
endif
ifeq ($(SASS_LIBSASS_PATH),)
SASS_LIBSASS_PATH = $(abspath $(CURDIR))
endif
ifeq ($(LIBSASS_VERSION),)
ifneq ($(wildcard ./.git/ ),)
LIBSASS_VERSION ?= $(shell git describe --abbrev=4 --dirty --always --tags)
endif
endif
ifeq ($(LIBSASS_VERSION),)
ifneq ($(wildcard VERSION),)
LIBSASS_VERSION ?= $(shell $(CAT) VERSION)
endif
endif
ifneq ($(LIBSASS_VERSION),)
CFLAGS += -DLIBSASS_VERSION="\"$(LIBSASS_VERSION)\""
CXXFLAGS += -DLIBSASS_VERSION="\"$(LIBSASS_VERSION)\""
endif
# enable mandatory flag
ifeq (Windows,$(UNAME))
ifneq ($(BUILD),shared)
STATIC_ALL ?= 1
endif
STATIC_LIBGCC ?= 1
STATIC_LIBSTDCPP ?= 1
CXXFLAGS += -std=gnu++0x
LDFLAGS += -std=gnu++0x
else
STATIC_ALL ?= 0
STATIC_LIBGCC ?= 0
STATIC_LIBSTDCPP ?= 0
CXXFLAGS += -std=c++0x
LDFLAGS += -std=c++0x
endif
ifneq ($(SASS_LIBSASS_PATH),)
CFLAGS += -I $(SASS_LIBSASS_PATH)/include
CXXFLAGS += -I $(SASS_LIBSASS_PATH)/include
else
# this is needed for mingw
CFLAGS += -I include
CXXFLAGS += -I include
endif
ifneq ($(EXTRA_CFLAGS),)
CFLAGS += $(EXTRA_CFLAGS)
endif
ifneq ($(EXTRA_CXXFLAGS),)
CXXFLAGS += $(EXTRA_CXXFLAGS)
endif
ifneq ($(EXTRA_LDFLAGS),)
LDFLAGS += $(EXTRA_LDFLAGS)
endif
LDLIBS = -lm
ifneq ($(BUILD),shared)
LDLIBS += -lstdc++
endif
# link statically into lib
# makes it a lot more portable
# increases size by about 50KB
ifeq ($(STATIC_ALL),1)
LDFLAGS += -static
endif
ifeq ($(STATIC_LIBGCC),1)
LDFLAGS += -static-libgcc
endif
ifeq ($(STATIC_LIBSTDCPP),1)
LDFLAGS += -static-libstdc++
endif
ifeq ($(UNAME),Darwin)
CFLAGS += -stdlib=libc++
CXXFLAGS += -stdlib=libc++
LDFLAGS += -stdlib=libc++
endif
ifneq (Windows,$(UNAME))
ifneq (FreeBSD,$(UNAME))
ifneq (OpenBSD,$(UNAME))
LDFLAGS += -ldl
LDLIBS += -ldl
endif
endif
endif
ifneq ($(BUILD),shared)
BUILD := static
endif
ifeq ($(DEBUG),1)
BUILD := debug-$(BUILD)
endif
ifeq (,$(TRAVIS_BUILD_DIR))
ifeq ($(OS),SunOS)
PREFIX ?= /opt/local
else
PREFIX ?= /usr/local
endif
else
PREFIX ?= $(TRAVIS_BUILD_DIR)
endif
SASS_SASSC_PATH ?= sassc
SASS_SPEC_PATH ?= sass-spec
SASS_SPEC_SPEC_DIR ?= spec
SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc
RUBY_BIN = ruby
LIB_STATIC = $(SASS_LIBSASS_PATH)/lib/libsass.a
LIB_SHARED = $(SASS_LIBSASS_PATH)/lib/libsass.so
ifeq (Windows,$(UNAME))
ifeq (shared,$(BUILD))
CFLAGS += -D ADD_EXPORTS
CXXFLAGS += -D ADD_EXPORTS
LIB_SHARED = $(SASS_LIBSASS_PATH)/lib/libsass.dll
endif
else
ifneq (Cygwin,$(UNAME))
CFLAGS += -fPIC
CXXFLAGS += -fPIC
LDFLAGS += -fPIC
endif
endif
ifeq (Windows,$(UNAME))
SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc.exe
endif
include Makefile.conf
RESOURCES =
STATICLIB = lib/libsass.a
SHAREDLIB = lib/libsass.so
ifeq (Windows,$(UNAME))
RESOURCES += res/resource.rc
SHAREDLIB = lib/libsass.dll
ifeq (shared,$(BUILD))
CFLAGS += -D ADD_EXPORTS
CXXFLAGS += -D ADD_EXPORTS
endif
else
ifneq (Cygwin,$(UNAME))
CFLAGS += -fPIC
CXXFLAGS += -fPIC
LDFLAGS += -fPIC
endif
endif
OBJECTS = $(addprefix src/,$(SOURCES:.cpp=.o))
COBJECTS = $(addprefix src/,$(CSOURCES:.c=.o))
RCOBJECTS = $(RESOURCES:.rc=.o)
DEBUG_LVL ?= NONE
CLEANUPS ?=
CLEANUPS += $(RCOBJECTS)
CLEANUPS += $(COBJECTS)
CLEANUPS += $(OBJECTS)
CLEANUPS += $(LIBSASS_LIB)
all: $(BUILD)
debug: $(BUILD)
debug-static: LDFLAGS := -g $(filter-out -O2,$(LDFLAGS))
debug-static: CFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CFLAGS))
debug-static: CXXFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CXXFLAGS))
debug-static: static
debug-shared: LDFLAGS := -g $(filter-out -O2,$(LDFLAGS))
debug-shared: CFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CFLAGS))
debug-shared: CXXFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CXXFLAGS))
debug-shared: shared
lib:
$(MKDIR) lib
lib/libsass.a: lib $(COBJECTS) $(OBJECTS)
$(AR) rcvs $@ $(COBJECTS) $(OBJECTS)
lib/libsass.so: lib $(COBJECTS) $(OBJECTS)
$(CXX) -shared $(LDFLAGS) -o $@ $(COBJECTS) $(OBJECTS) $(LDLIBS)
lib/libsass.dll: lib $(COBJECTS) $(OBJECTS) $(RCOBJECTS)
$(CXX) -shared $(LDFLAGS) -o $@ $(COBJECTS) $(OBJECTS) $(RCOBJECTS) $(LDLIBS) -s -Wl,--subsystem,windows,--out-implib,lib/libsass.a
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
%.o: %.rc
$(WINDRES) -i $< -o $@
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
%: %.o static
$(CXX) $(CXXFLAGS) -o $@ $+ $(LDFLAGS) $(LDLIBS)
install: install-$(BUILD)
static: $(STATICLIB)
shared: $(SHAREDLIB)
$(DESTDIR)$(PREFIX):
$(MKDIR) $(DESTDIR)$(PREFIX)
$(DESTDIR)$(PREFIX)/lib: $(DESTDIR)$(PREFIX)
$(MKDIR) $(DESTDIR)$(PREFIX)/lib
$(DESTDIR)$(PREFIX)/include: $(DESTDIR)$(PREFIX)
$(MKDIR) $(DESTDIR)$(PREFIX)/include
$(DESTDIR)$(PREFIX)/include/sass: $(DESTDIR)$(PREFIX)/include
$(MKDIR) $(DESTDIR)$(PREFIX)/include/sass
$(DESTDIR)$(PREFIX)/include/%.h: include/%.h \
$(DESTDIR)$(PREFIX)/include \
$(DESTDIR)$(PREFIX)/include/sass
$(INSTALL) -v -m0644 "$<" "$@"
install-headers: $(DESTDIR)$(PREFIX)/include/sass.h \
$(DESTDIR)$(PREFIX)/include/sass2scss.h \
$(DESTDIR)$(PREFIX)/include/sass/base.h \
$(DESTDIR)$(PREFIX)/include/sass/version.h \
$(DESTDIR)$(PREFIX)/include/sass/values.h \
$(DESTDIR)$(PREFIX)/include/sass/context.h \
$(DESTDIR)$(PREFIX)/include/sass/functions.h
$(DESTDIR)$(PREFIX)/lib/%.a: lib/%.a \
$(DESTDIR)$(PREFIX)/lib
@$(INSTALL) -v -m0755 "$<" "$@"
$(DESTDIR)$(PREFIX)/lib/%.so: lib/%.so \
$(DESTDIR)$(PREFIX)/lib
@$(INSTALL) -v -m0755 "$<" "$@"
$(DESTDIR)$(PREFIX)/lib/%.dll: lib/%.dll \
$(DESTDIR)$(PREFIX)/lib
@$(INSTALL) -v -m0755 "$<" "$@"
install-static: $(DESTDIR)$(PREFIX)/lib/libsass.a
install-shared: $(DESTDIR)$(PREFIX)/lib/libsass.so \
install-headers
$(SASSC_BIN): $(BUILD)
$(MAKE) -C $(SASS_SASSC_PATH) build-$(BUILD)-dev
sassc: $(SASSC_BIN)
$(SASSC_BIN) -v
version: $(SASSC_BIN)
$(SASSC_BIN) -h
$(SASSC_BIN) -v
test: $(SASSC_BIN)
$(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -V 3.5 -c $(SASSC_BIN) --impl libsass $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
test_build: $(SASSC_BIN)
$(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -V 3.5 -c $(SASSC_BIN) --impl libsass $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
test_full: $(SASSC_BIN)
$(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -V 3.5 -c $(SASSC_BIN) --impl libsass --run-todo $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
test_probe: $(SASSC_BIN)
$(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -V 3.5 -c $(SASSC_BIN) --impl libsass --probe-todo $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
clean-objects: lib
-$(RM) lib/*.a lib/*.so lib/*.dll lib/*.la
-$(RMDIR) lib
clean: clean-objects
$(RM) $(CLEANUPS)
clean-all:
$(MAKE) -C $(SASS_SASSC_PATH) clean
lib-file: lib-file-$(BUILD)
lib-opts: lib-opts-$(BUILD)
lib-file-static:
@echo $(LIB_STATIC)
lib-file-shared:
@echo $(LIB_SHARED)
lib-opts-static:
@echo -L"$(SASS_LIBSASS_PATH)/lib"
lib-opts-shared:
@echo -L"$(SASS_LIBSASS_PATH)/lib -lsass"
.PHONY: all static shared sassc \
version install-headers \
clean clean-all clean-objects \
debug debug-static debug-shared \
install install-static install-shared \
lib-opts lib-opts-shared lib-opts-static \
lib-file lib-file-shared lib-file-static
.DELETE_ON_ERROR:
================================================
FILE: src/libsass/Makefile.conf
================================================
# this is merely a common Makefile multiple implementers can use
# bigger files (in terms of compile time) tend to go to the top,
# so they don't end up as the last compile unit when compiling
# in parallel. But we also want to mix them a little too avoid
# heavy RAM usage peaks. Other than that the order is arbitrary.
SOURCES = \
ast.cpp \
node.cpp \
context.cpp \
constants.cpp \
functions.cpp \
color_maps.cpp \
environment.cpp \
ast_fwd_decl.cpp \
bind.cpp \
file.cpp \
util.cpp \
json.cpp \
units.cpp \
values.cpp \
plugins.cpp \
position.cpp \
lexer.cpp \
parser.cpp \
prelexer.cpp \
eval.cpp \
expand.cpp \
listize.cpp \
cssize.cpp \
extend.cpp \
output.cpp \
inspect.cpp \
emitter.cpp \
check_nesting.cpp \
remove_placeholders.cpp \
sass.cpp \
sass_util.cpp \
sass_values.cpp \
sass_context.cpp \
sass_functions.cpp \
sass2scss.cpp \
backtrace.cpp \
operators.cpp \
to_c.cpp \
to_value.cpp \
source_map.cpp \
subset_map.cpp \
error_handling.cpp \
memory/SharedPtr.cpp \
utf8_string.cpp \
base64vlq.cpp
CSOURCES = cencode.c
================================================
FILE: src/libsass/Readme.md
================================================
LibSass - Sass compiler written in C++
======================================
Currently maintained by Marcel Greter ([@mgreter]) and Michael Mifsud ([@xzyfer])
Originally created by Aaron Leung ([@akhleung]) and Hampton Catlin ([@hcatlin])
[](https://travis-ci.org/sass/libsass "Travis CI")
[](https://ci.appveyor.com/project/sass/libsass/branch/master "Appveyor CI")
[](https://coveralls.io/r/sass/libsass?branch=feature%2Ftest-travis-ci-3 "Code coverage of spec tests")
[](http://isitmaintained.com/project/sass/libsass "Percentage of issues still open")
[](http://isitmaintained.com/project/sass/libsass "Average time to resolve an issue")
[](https://www.bountysource.com/trackers/283068-libsass?utm_source=283068&utm_medium=shield&utm_campaign=TRACKER_BADGE "Bountysource")
[](https://libsass-slack.herokuapp.com/ "Slack communication channels")
[LibSass](https://github.com/sass/libsass "LibSass GitHub Project") is just a library!
If you want to use LibSass to compile Sass, you need an implementer. Some
implementations are only bindings into other programming languages. But most also
ship with a command line interface (CLI) you can use directly. There is also
[SassC](https://github.com/sass/sassc), which is the official lightweight
CLI tool built by the same people as LibSass.
### Excerpt of "sanctioned" implementations:
- https://github.com/sass/node-sass (Node.js)
- https://github.com/sass/perl-libsass (Perl)
- https://github.com/sass/libsass-python (Python)
- https://github.com/wellington/go-libsass (Go)
- https://github.com/sass/sassc-ruby (Ruby)
- https://github.com/sass/libsass-net (C#)
- https://github.com/medialize/sass.js (JS)
- https://github.com/bit3/jsass (Java)
This list does not say anything about the quality of either the listed or not listed [implementations](docs/implementations.md)!
The authors of the listed projects above are just known to work regularly together with LibSass developers.
About
-----
LibSass is a C++ port of the original Ruby Sass CSS compiler with a [C API](docs/api-doc.md).
We coded LibSass with portability and efficiency in mind. You can expect LibSass to be a lot
faster than Ruby Sass and on par or faster than the best alternative CSS compilers around.
Developing
----------
As noted above, the LibSass repository does not contain any binaries or other way to execute
LibSass. Therefore, you need an implementer to develop LibSass. Easiest is to start with
the official [SassC](http://github.com/sass/sassc) CLI wrapper. It is *guaranteed* to compile
with the latest code in LibSass master, since it is also used in the CI process. There is no
limitation here, as you may use any other LibSass implementer to test your LibSass branch!
Testing
-------
Since LibSass is a pure library, tests are run through the [Sass-Spec](https://github.com/sass/sass-spec)
project using the [SassC](http://github.com/sass/sassc) CLI wrapper. To run the tests against LibSass while
developing, you can run `./script/spec`. This will clone SassC and Sass-Spec under the project folder and
then run the Sass-Spec test suite. You may want to update the clones to ensure you have the latest version.
Note that the scripts in the `./script` folder are mainly intended for our CI needs.
Building
--------
To build LibSass you need GCC 4.6+ or Clang/LLVM. If your OS is older, you may need to upgrade
them first (or install clang as an alternative). On Windows, you need MinGW with GCC 4.6+ or VS 2013
Update 4+. It is also possible to build LibSass with Clang/LLVM on Windows with various build chains
and/or command line interpreters.
See the [build docs for further instructions](docs/build.md)!
Compatibility
-------------
Current LibSass 3.4 should be compatible with Sass 3.4. Please refer to the [sass compatibility
page](http://sass-compatibility.github.io/) for a more detailed comparison. But note that there
are still a few incomplete edges which we are aware of. Otherwise LibSass has reached a good level
of stability, thanks to our ever growing [Sass-Spec test suite](https://github.com/sass/sass-spec).
About Sass
----------
Sass is a CSS pre-processor language to add on exciting, new, awesome features to CSS. Sass was
the first language of its kind and by far the most mature and up to date codebase.
Sass was originally conceived of by the co-creator of this library, Hampton Catlin ([@hcatlin]).
Most of the language has been the result of years of work by Natalie Weizenbaum ([@nex3]) and
Chris Eppstein ([@chriseppstein]).
For more information about Sass itself, please visit http://sass-lang.com
Initial development of LibSass by Aaron Leung and Hampton Catlin was supported by [Moovweb](http://www.moovweb.com).
Licensing
---------
Our [MIT license](LICENSE) is designed to be as simple and liberal as possible.
[@hcatlin]: https://github.com/hcatlin
[@akhleung]: https://github.com/akhleung
[@chriseppstein]: https://github.com/chriseppstein
[@nex3]: https://github.com/nex3
[@mgreter]: https://github.com/mgreter
[@xzyfer]: https://github.com/xzyfer
================================================
FILE: src/libsass/SECURITY.md
================================================
Serious about security
======================
The LibSass team recognizes the important contributions the security research
community can make. We therefore encourage reporting security issues with the
code contained in this repository.
If you believe you have discovered a security vulnerability, please report it at
https://hackerone.com/libsass instead of GitHub.
================================================
FILE: src/libsass/appveyor.yml
================================================
os: Visual Studio 2013
environment:
CTEST_OUTPUT_ON_FAILURE: 1
ruby_version: 22-x64
TargetPath: sassc/bin/sassc.exe
matrix:
- Compiler: msvc
Config: Release
Platform: Win32
- Compiler: msvc
Config: Debug
Platform: Win32
- Compiler: msvc
Config: Release
Platform: Win64
- Compiler: mingw
Build: static
- Compiler: mingw
Build: shared
cache:
- C:\Ruby%ruby_version%\lib\ruby\gems
- C:\mingw64
install:
- git clone https://github.com/sass/sassc.git
- git clone https://github.com/sass/sass-spec.git
- set PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ps: |
if(!(gem which minitest 2>$nul)) { gem install minitest --no-ri --no-rdoc }
if ($env:Compiler -eq "mingw" -AND -Not (Test-Path "C:\mingw64")) {
# Install MinGW.
$file = "x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z"
wget https://bintray.com/artifact/download/drewwells/generic/$file -OutFile $file
&7z x -oC:\ $file > $null
}
- set PATH=C:\mingw64\bin;%PATH%
- set CC=gcc
build_script:
- ps: |
if ($env:Compiler -eq "mingw") {
mingw32-make -j4 sassc
} else {
msbuild /m:4 /p:"Configuration=$env:Config;Platform=$env:Platform" sassc\win\sassc.sln
}
# print the branding art
mv script/branding script/branding.ps1
script/branding.ps1
# print the version info
&$env:TargetPath -v
ruby -v
test_script:
- ps: |
$PRNR = $env:APPVEYOR_PULL_REQUEST_NUMBER
if ($PRNR) {
echo "Fetching info for PR $PRNR"
wget https://api.github.com/repos/sass/libsass/pulls/$PRNR -OutFile pr.json
$json = cat pr.json -Raw
$SPEC_PR = [regex]::match($json,'sass\/sass-spec(#|\/pull\/)([0-9]+)').Groups[2].Value
if ($SPEC_PR) {
echo "Checkout sass spec PR $SPEC_PR"
git -C sass-spec fetch -q -u origin pull/$SPEC_PR/head:ci-spec-pr-$SPEC_PR
git -C sass-spec checkout -q --force ci-spec-pr-$SPEC_PR
}
}
$env:TargetPath = Join-Path $pwd.Path $env:TargetPath
If (Test-Path "$env:TargetPath") {
ruby sass-spec/sass-spec.rb -V 3.5 --probe-todo --impl libsass -c $env:TargetPath -s sass-spec/spec
if(-not($?)) {
echo "sass-spec tests failed"
exit 1
}
} else {
echo "spec runner not found (compile error?)"
exit 1
}
Write-Host "Explicitly testing the case when cwd has Cyrillic characters: " -nonewline
# See comments in gh-1774 for details.
cd sass-spec/spec/libsass/Sáss-UŢF8/
&$env:TargetPath ./input.scss 2>&1>$null
if(-not($?)) {
echo "Failed!"
exit 1
} else {
echo "Success!"
}
================================================
FILE: src/libsass/configure.ac
================================================
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT([libsass], m4_esyscmd_s([./version.sh]), [support@moovweb.com])
AC_CONFIG_SRCDIR([src/ast.hpp])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_FILES([include/sass/version.h])
AC_CONFIG_AUX_DIR([script])
# These are flags passed to automake
# Though they look like gcc flags!
AM_INIT_AUTOMAKE([foreign parallel-tests -Wall])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_LANG_PUSH([C])
AC_LANG_PUSH([C++])
AC_GNU_SOURCE
# Check fails on Travis, but it works fine
# AX_CXX_COMPILE_STDCXX_11([ext],[optional])
AC_CHECK_TOOL([AR], [ar], [false])
AC_CHECK_TOOL([DLLTOOL], [dlltool], [false])
AC_CHECK_TOOL([DLLWRAP], [dllwrap], [false])
AC_CHECK_TOOL([WINDRES], [windres], [false])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT([dlopen])
# Checks for header files.
AC_CHECK_HEADERS([unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([floor getcwd strtol])
# Checks for testing.
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests], [enable testing the build]),
[enable_tests="$enableval"], [enable_tests=no])
AS_CASE([$host], [*-*-mingw*], [is_mingw32=yes], [is_mingw32=no])
AM_CONDITIONAL(COMPILER_IS_MINGW32, test "x$is_mingw32" = "xyes")
dnl The dlopen() function is in the C library for *BSD and in
dnl libdl on GLIBC-based systems
if test "x$is_mingw32" != "xyes"; then
AC_SEARCH_LIBS([dlopen], [dl dld], [], [
AC_MSG_ERROR([unable to find the dlopen() function])
])
fi
if test "x$enable_tests" = "xyes"; then
AC_PROG_CC
AC_PROG_AWK
# test need minitest gem
AC_PATH_PROG(RUBY, [ruby])
AC_PATH_PROG(TAPOUT, [tapout])
AC_REQUIRE_AUX_FILE([tap-driver])
AC_REQUIRE_AUX_FILE([tap-runner])
AC_ARG_WITH(sassc-dir,
AS_HELP_STRING([--with-sassc-dir=<dir>], [specify directory of sassc sources for testing (default: sassc)]),
[sassc_dir="$withval"], [sassc_dir="sassc"])
AC_CHECK_FILE([$sassc_dir/sassc.c], [], [
AC_MSG_ERROR([Unable to find sassc directory.
You must clone the sassc repository in this directory or specify
the --with-sassc-dir=<dir> argument.
])
])
SASS_SASSC_PATH=$sassc_dir
AC_SUBST(SASS_SASSC_PATH)
AC_ARG_WITH(sass-spec-dir,
AS_HELP_STRING([--with-sass-spec-dir=<dir>], [specify directory of sass-spec for testing (default: sass-spec)]),
[sass_spec_dir="$withval"], [sass_spec_dir="sass-spec"])
AC_CHECK_FILE([$sass_spec_dir/sass-spec.rb], [], [
AC_MSG_ERROR([Unable to find sass-spec directory.
You must clone the sass-spec repository in this directory or specify
the --with-sass-spec-dir=<dir> argument.
])
])
# Automake doesn't like its tests in an absolute path, so we make it relative.
case $sass_spec_dir in
/*)
SASS_SPEC_PATH=`$RUBY -e "require 'pathname'; puts Pathname.new('$sass_spec_dir').relative_path_from(Pathname.new('$PWD')).to_s"`
;;
*)
SASS_SPEC_PATH="$sass_spec_dir"
;;
esac
AC_SUBST(SASS_SPEC_PATH)
else
# we do not really need these paths for non test build
# but automake may error if we do not define them here
SASS_SPEC_PATH=sass-spec
SASS_SASSC_PATH=sassc
AC_SUBST(SASS_SPEC_PATH)
AC_SUBST(SASS_SASSC_PATH)
fi
AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes")
AC_ARG_ENABLE([coverage],
[AS_HELP_STRING([--enable-coverage],
[enable coverage report for test suite])],
[enable_cov=$enableval],
[enable_cov=no])
if test "x$enable_cov" = "xyes"; then
AC_CHECK_PROG(GCOV, gcov, gcov)
# Remove all optimization flags from C[XX]FLAGS
changequote({,})
CFLAGS=`echo "$CFLAGS -O1 -fno-omit-frame-pointer" | $SED -e 's/-O[0-9]*//g'`
CXXFLAGS=`echo "$CXXFLAGS -O1 -fno-omit-frame-pointer" | $SED -e 's/-O[0-9]*//g'`
changequote([,])
AC_SUBST(GCOV)
fi
AM_CONDITIONAL(ENABLE_COVERAGE, test "x$enable_cov" = "xyes")
AC_SUBST(PACKAGE_VERSION)
AC_MSG_NOTICE([Building libsass ($VERSION)])
AC_CONFIG_FILES([GNUmakefile src/GNUmakefile src/support/libsass.pc])
AC_OUTPUT
================================================
FILE: src/libsass/contrib/libsass.spec
================================================
Name: libsass
Version: %{version}
Release: 1%{?dist}
Summary: A C/C++ implementation of a Sass compiler
License: MIT
URL: http://libsass.org
Source0: %{name}-%{version}.tar.gz
BuildRequires: gcc-c++ >= 4.7
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
%description
LibSass is a C/C++ port of the Sass engine. The point is to be simple, fast, and easy to integrate.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
autoreconf --force --install
%build
%configure --disable-static \
--disable-tests \
--enable-shared
make %{?_smp_mflags}
%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc Readme.md LICENSE
%{_libdir}/*.so.*
%files devel
%doc
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog
* Tue Feb 10 2015 Gawain Lynch <gawain.lynch@gmail.com> - 3.1.0-1
- Initial SPEC file
================================================
FILE: src/libsass/contrib/plugin.cpp
================================================
#include <cstring>
#include <iostream>
#include <stdint.h>
#include <sass.h>
// gcc: g++ -shared plugin.cpp -o plugin.so -fPIC -Llib -lsass
// mingw: g++ -shared plugin.cpp -o plugin.dll -Llib -lsass
extern "C" const char* ADDCALL libsass_get_version() {
return libsass_version();
}
union Sass_Value* custom_function(const union Sass_Value* s_args, Sass_Function_Entry cb, struct Sass_Compiler* comp)
{
// get context/option struct associated with this compiler
struct Sass_Context* ctx = sass_compiler_get_context(comp);
struct Sass_Options* opts = sass_compiler_get_options(comp);
// get the cookie from function descriptor
void* cookie = sass_function_get_cookie(cb);
// we actually abuse the void* to store an "int"
return sass_make_number((intptr_t)cookie, "px");
}
extern "C" Sass_Function_List ADDCALL libsass_load_functions()
{
// allocate a custom function caller
Sass_Function_Entry c_func =
sass_make_function("foo()", custom_function, (void*)42);
// create list of all custom functions
Sass_Function_List fn_list = sass_make_function_list(1);
// put the only function in this plugin to the list
sass_function_set_list_entry(fn_list, 0, c_func);
// return the list
return fn_list;
}
Sass_Import_List custom_importer(const char* cur_path, Sass_Importer_Entry cb, struct Sass_Compiler* comp)
{
// get the cookie from importer descriptor
void* cookie = sass_importer_get_cookie(cb);
// create a list to hold our import entries
Sass_Import_List incs = sass_make_import_list(1);
// create our only import entry (route path back)
incs[0] = sass_make_import_entry(cur_path, 0, 0);
// return imports
return incs;
}
extern "C" Sass_Importer_List ADDCALL libsass_load_importers()
{
// allocate a custom function caller
Sass_Importer_Entry c_imp =
sass_make_importer(custom_importer, - 99, (void*)42);
// create list of all custom functions
Sass_Importer_List imp_list = sass_make_importer_list(1);
// put the only function in this plugin to the list
sass_importer_set_list_entry(imp_list, 0, c_imp);
// return the list
return imp_list;
}
================================================
FILE: src/libsass/docs/README.md
================================================
Welcome to the LibSass documentation!
## First Off
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!
We're working hard on moving to full parity with Ruby Sass... learn more at the [The-LibSass-Compatibility-Plan](compatibility-plan.md)!
### Implementing LibSass
If you're interested in implementing LibSass in your own project see the [API Documentation](api-doc.md) which now includes implementing
your own [Sass functions](api-function.md). You may wish to [look at other implementations](implementations.md) for your language of choice.
Or make your own!
### Contributing to LibSass
| Issue Tracker | Issue Triage | Community Guidelines |
|-------------------|----------------------------------|-----------------------------|
| 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! |
Please refer to the steps on [Building LibSass](build.md)
================================================
FILE: src/libsass/docs/api-context-example.md
================================================
## Example main.c
```C
#include <stdio.h>
#include "sass/context.h"
int main( int argc, const char* argv[] )
{
// get the input file from first argument or use default
const char* input = argc > 1 ? argv[1] : "styles.scss";
// create the file context and get all related structs
struct Sass_File_Context* file_ctx = sass_make_file_context(input);
struct Sass_Context* ctx = sass_file_context_get_context(file_ctx);
struct Sass_Options* ctx_opt = sass_context_get_options(ctx);
// configure some options ...
sass_option_set_precision(ctx_opt, 10);
// context is set up, call the compile step now
int status = sass_compile_file_context(file_ctx);
// print the result or the error to the stdout
if (status == 0) puts(sass_context_get_output_string(ctx));
else puts(sass_context_get_error_message(ctx));
// release allocated memory
sass_delete_file_context(file_ctx);
// exit status
return status;
}
```
### Compile main.c
```bash
gcc -c main.c -o main.o
gcc -o sample main.o -lsass
echo "foo { margin: 21px * 2; }" > foo.scss
./sample foo.scss => "foo { margin: 42px }"
```
================================================
FILE: src/libsass/docs/api-context-internal.md
================================================
```C
// Input behaviours
enum Sass_Input_Style {
SASS_CONTEXT_NULL,
SASS_CONTEXT_FILE,
SASS_CONTEXT_DATA,
SASS_CONTEXT_FOLDER
};
// sass config options structure
struct Sass_Inspect_Options {
// Output style for the generated css code
// A value from above SASS_STYLE_* constants
enum Sass_Output_Style output_style;
// Precision for fractional numbers
int precision;
};
// sass config options structure
struct Sass_Output_Options : Sass_Inspect_Options {
// String to be used for indentation
const char* indent;
// String to be used to for line feeds
const char* linefeed;
// Emit comments in the generated CSS indicating
// the corresponding source line.
bool source_comments;
};
// sass config options structure
struct Sass_Options : Sass_Output_Options {
// embed sourceMappingUrl as data uri
bool source_map_embed;
// embed include contents in maps
bool source_map_contents;
// create file urls for sources
bool source_map_file_urls;
// Disable sourceMappingUrl in css output
bool omit_source_map_url;
// Treat source_string as sass (as opposed to scss)
bool is_indented_syntax_src;
// The input path is used for source map
// generation. It can be used to define
// something with string compilation or to
// overload the input file path. It is
// set to "stdin" for data contexts and
// to the input file on file contexts.
char* input_path;
// The output path is used for source map
// generation. LibSass will not write to
// this file, it is just used to create
// information in source-maps etc.
char* output_path;
// Colon-separated list of paths
// Semicolon-separated on Windows
// Maybe use array interface instead?
char* include_path;
char* plugin_path;
// Include paths (linked string list)
struct string_list* include_paths;
// Plugin paths (linked string list)
struct string_list* plugin_paths;
// Path to source map file
// Enables source map generation
// Used to create sourceMappingUrl
char* source_map_file;
// Directly inserted in source maps
char* source_map_root;
// Custom functions that can be called from sccs code
Sass_Function_List c_functions;
// Callback to overload imports
Sass_Importer_List c_importers;
// List of custom headers
Sass_Importer_List c_headers;
};
// base for all contexts
struct Sass_Context : Sass_Options
{
// store context type info
enum Sass_Input_Style type;
// generated output data
char* output_string;
// generated source map json
char* source_map_string;
// error status
int error_status;
char* error_json;
char* error_text;
char* error_message;
// error position
char* error_file;
size_t error_line;
size_t error_column;
const char* error_src;
// report imported files
char** included_files;
};
// struct for file compilation
struct Sass_File_Context : Sass_Context {
// no additional fields required
// input_path is already on options
};
// struct for data compilation
struct Sass_Data_Context : Sass_Context {
// provided source string
char* source_string;
char* srcmap_string;
};
// Compiler states
enum Sass_Compiler_State {
SASS_COMPILER_CREATED,
SASS_COMPILER_PARSED,
SASS_COMPILER_EXECUTED
};
// link c and cpp context
struct Sass_Compiler {
// progress status
Sass_Compiler_State state;
// original c context
Sass_Context* c_ctx;
// Sass::Context
Sass::Context* cpp_ctx;
// Sass::Block
Sass::Block_Obj root;
};
```
================================================
FILE: src/libsass/docs/api-context.md
================================================
Sass Contexts come in two flavors:
- `Sass_File_Context`
- `Sass_Data_Context`
### Basic Usage
```C
#include "sass/context.h"
```
***Sass_Options***
```C
// Precision for fractional numbers
int precision;
```
```C
// Output style for the generated css code
// A value from above SASS_STYLE_* constants
int output_style;
```
```C
// Emit comments in the generated CSS indicating
// the corresponding source line.
bool source_comments;
```
```C
// embed sourceMappingUrl as data uri
bool source_map_embed;
```
```C
// embed include contents in maps
bool source_map_contents;
```
```C
// create file urls for sources
bool source_map_file_urls;
```
```C
// Disable sourceMappingUrl in css output
bool omit_source_map_url;
```
```C
// Treat source_string as sass (as opposed to scss)
bool is_indented_syntax_src;
```
```C
// The input path is used for source map
// generating. It can be used to define
// something with string compilation or to
// overload the input file path. It is
// set to "stdin" for data contexts and
// to the input file on file contexts.
char* input_path;
```
```C
// The output path is used for source map
// generating. LibSass will not write to
// this file, it is just used to create
// information in source-maps etc.
char* output_path;
```
```C
// String to be used for indentation
const char* indent;
```
```C
// String to be used to for line feeds
const char* linefeed;
```
```C
// Colon-separated list of paths
// Semicolon-separated on Windows
char* include_path;
char* plugin_path;
```
```C
// Additional include paths
// Must be null delimited
char** include_paths;
char** plugin_paths;
```
```C
// Path to source map file
// Enables the source map generating
// Used to create sourceMappingUrl
char* source_map_file;
```
```C
// Directly inserted in source maps
char* source_map_root;
```
```C
// Custom functions that can be called from Sass code
Sass_C_Function_List c_functions;
```
```C
// Callback to overload imports
Sass_C_Import_Callback importer;
```
***Sass_Context***
```C
// store context type info
enum Sass_Input_Style type;
````
```C
// generated output data
char* output_string;
```
```C
// generated source map json
char* source_map_string;
```
```C
// error status
int error_status;
char* error_json;
char* error_text;
char* error_message;
// error position
char* error_file;
size_t error_line;
size_t error_column;
```
```C
// report imported files
char** included_files;
```
***Sass_File_Context***
```C
// no additional fields required
// input_path is already on options
```
***Sass_Data_Context***
```C
// provided source string
char* source_string;
```
### Sass Context API
```C
// Forward declaration
struct Sass_Compiler;
// Forward declaration
struct Sass_Options;
struct Sass_Context; // : Sass_Options
struct Sass_File_Context; // : Sass_Context
struct Sass_Data_Context; // : Sass_Context
// Create and initialize an option struct
struct Sass_Options* sass_make_options (void);
// Create and initialize a specific context
struct Sass_File_Context* sass_make_file_context (const char* input_path);
struct Sass_Data_Context* sass_make_data_context (char* source_string);
// Call the compilation step for the specific context
int sass_compile_file_context (struct Sass_File_Context* ctx);
int sass_compile_data_context (struct Sass_Data_Context* ctx);
// Create a sass compiler instance for more control
struct Sass_Compiler* sass_make_file_compiler (struct Sass_File_Context* file_ctx);
struct Sass_Compiler* sass_make_data_compiler (struct Sass_Data_Context* data_ctx);
// Execute the different compilation steps individually
// Usefull if you only want to query the included files
int sass_compiler_parse (struct Sass_Compiler* compiler);
int sass_compiler_execute (struct Sass_Compiler* compiler);
// Release all memory allocated with the compiler
// This does _not_ include any contexts or options
void sass_delete_compiler (struct Sass_Compiler* compiler);
void sass_delete_options(struct Sass_Options* options);
// Release all memory allocated and also ourself
void sass_delete_file_context (struct Sass_File_Context* ctx);
void sass_delete_data_context (struct Sass_Data_Context* ctx);
// Getters for Context from specific implementation
struct Sass_Context* sass_file_context_get_context (struct Sass_File_Context* file_ctx);
struct Sass_Context* sass_data_context_get_context (struct Sass_Data_Context* data_ctx);
// Getters for Context_Options from Sass_Context
struct Sass_Options* sass_context_get_options (struct Sass_Context* ctx);
struct Sass_Options* sass_file_context_get_options (struct Sass_File_Context* file_ctx);
struct Sass_Options* sass_data_context_get_options (struct Sass_Data_Context* data_ctx);
void sass_file_context_set_options (struct Sass_File_Context* file_ctx, struct Sass_Options* opt);
void sass_data_context_set_options (struct Sass_Data_Context* data_ctx, struct Sass_Options* opt);
// Getters for Sass_Context values
const char* sass_context_get_output_string (struct Sass_Context* ctx);
int sass_context_get_error_status (struct Sass_Context* ctx);
const char* sass_context_get_error_json (struct Sass_Context* ctx);
const char* sass_context_get_error_text (struct Sass_Context* ctx);
const char* sass_context_get_error_message (struct Sass_Context* ctx);
const char* sass_context_get_error_file (struct Sass_Context* ctx);
size_t sass_context_get_error_line (struct Sass_Context* ctx);
size_t sass_context_get_error_column (struct Sass_Context* ctx);
const char* sass_context_get_source_map_string (struct Sass_Context* ctx);
char** sass_context_get_included_files (struct Sass_Context* ctx);
// Getters for Sass_Compiler options (query import stack)
size_t sass_compiler_get_import_stack_size(struct Sass_Compiler* compiler);
Sass_Import_Entry sass_compiler_get_last_import(struct Sass_Compiler* compiler);
Sass_Import_Entry sass_compiler_get_import_entry(struct Sass_Compiler* compiler, size_t idx);
// Getters for Sass_Compiler options (query function stack)
size_t sass_compiler_get_callee_stack_size(struct Sass_Compiler* compiler);
Sass_Callee_Entry sass_compiler_get_last_callee(struct Sass_Compiler* compiler);
Sass_Callee_Entry sass_compiler_get_callee_entry(struct Sass_Compiler* compiler, size_t idx);
// Take ownership of memory (value on context is set to 0)
char* sass_context_take_error_json (struct Sass_Context* ctx);
char* sass_context_take_error_text (struct Sass_Context* ctx);
char* sass_context_take_error_message (struct Sass_Context* ctx);
char* sass_context_take_error_file (struct Sass_Context* ctx);
char* sass_context_take_output_string (struct Sass_Context* ctx);
char* sass_context_take_source_map_string (struct Sass_Context* ctx);
```
### Sass Options API
```C
// Getters for Context_Option values
int sass_option_get_precision (struct Sass_Options* options);
enum Sass_Output_Style sass_option_get_output_style (struct Sass_Options* options);
bool sass_option_get_source_comments (struct Sass_Options* options);
bool sass_option_get_source_map_embed (struct Sass_Options* options);
bool sass_option_get_source_map_contents (struct Sass_Options* options);
bool sass_option_get_source_map_file_urls (struct Sass_Options* options);
bool sass_option_get_omit_source_map_url (struct Sass_Options* options);
bool sass_option_get_is_indented_syntax_src (struct Sass_Options* options);
const char* sass_option_get_indent (struct Sass_Options* options);
const char* sass_option_get_linefeed (struct Sass_Options* options);
const char* sass_option_get_input_path (struct Sass_Options* options);
const char* sass_option_get_output_path (struct Sass_Options* options);
const char* sass_option_get_source_map_file (struct Sass_Options* options);
const char* sass_option_get_source_map_root (struct Sass_Options* options);
Sass_C_Function_List sass_option_get_c_functions (struct Sass_Options* options);
Sass_C_Import_Callback sass_option_get_importer (struct Sass_Options* options);
// Getters for Context_Option include path array
size_t sass_option_get_include_path_size(struct Sass_Options* options);
const char* sass_option_get_include_path(struct Sass_Options* options, size_t i);
// Plugin paths to load dynamic libraries work the same
size_t sass_option_get_plugin_path_size(struct Sass_Options* options);
const char* sass_option_get_plugin_path(struct Sass_Options* options, size_t i);
// Setters for Context_Option values
void sass_option_set_precision (struct Sass_Options* options, int precision);
void sass_option_set_output_style (struct Sass_Options* options, enum Sass_Output_Style output_style);
void sass_option_set_source_comments (struct Sass_Options* options, bool source_comments);
void sass_option_set_source_map_embed (struct Sass_Options* options, bool source_map_embed);
void sass_option_set_source_map_contents (struct Sass_Options* options, bool source_map_contents);
void sass_option_set_source_map_file_urls (struct Sass_Options* options, bool source_map_file_urls);
void sass_option_set_omit_source_map_url (struct Sass_Options* options, bool omit_source_map_url);
void sass_option_set_is_indented_syntax_src (struct Sa
gitextract_uxldy4j8/
├── .editorconfig
├── .eslintrc.json
├── .gitattributes
├── .github/
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE/
│ │ ├── Bug_report.md
│ │ └── Feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── alpine.yml
│ ├── coverage.yml
│ ├── lint-js.yml
│ ├── linux.yml
│ ├── macos.yml
│ └── windows.yml
├── .gitignore
├── .mailmap
├── .nycrc.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── TROUBLESHOOTING.md
├── appveyor.yml
├── bin/
│ └── node-sass
├── binding.gyp
├── lib/
│ ├── binding.js
│ ├── errors.js
│ ├── extensions.js
│ ├── index.js
│ ├── render.js
│ └── watcher.js
├── memory-tests/
│ ├── _measure.js
│ ├── boolean.js
│ ├── function-bridge.js
│ ├── map.js
│ └── string.js
├── package.json
├── scripts/
│ ├── build.js
│ ├── install.js
│ ├── prepublish.js
│ └── util/
│ ├── downloadoptions.js
│ ├── proxy.js
│ ├── rejectUnauthorized.js
│ └── useragent.js
├── src/
│ ├── binding.cpp
│ ├── callback_bridge.h
│ ├── create_string.cpp
│ ├── create_string.h
│ ├── custom_function_bridge.cpp
│ ├── custom_function_bridge.h
│ ├── custom_importer_bridge.cpp
│ ├── custom_importer_bridge.h
│ ├── libsass/
│ │ ├── .editorconfig
│ │ ├── .gitattributes
│ │ ├── .github/
│ │ │ ├── CONTRIBUTING.md
│ │ │ └── ISSUE_TEMPLATE.md
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── COPYING
│ │ ├── GNUmakefile.am
│ │ ├── INSTALL
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── Makefile.conf
│ │ ├── Readme.md
│ │ ├── SECURITY.md
│ │ ├── appveyor.yml
│ │ ├── configure.ac
│ │ ├── contrib/
│ │ │ ├── libsass.spec
│ │ │ └── plugin.cpp
│ │ ├── docs/
│ │ │ ├── README.md
│ │ │ ├── api-context-example.md
│ │ │ ├── api-context-internal.md
│ │ │ ├── api-context.md
│ │ │ ├── api-doc.md
│ │ │ ├── api-function-example.md
│ │ │ ├── api-function-internal.md
│ │ │ ├── api-function.md
│ │ │ ├── api-importer-example.md
│ │ │ ├── api-importer-internal.md
│ │ │ ├── api-importer.md
│ │ │ ├── api-value-example.md
│ │ │ ├── api-value-internal.md
│ │ │ ├── api-value.md
│ │ │ ├── build-on-darwin.md
│ │ │ ├── build-on-gentoo.md
│ │ │ ├── build-on-windows.md
│ │ │ ├── build-shared-library.md
│ │ │ ├── build-with-autotools.md
│ │ │ ├── build-with-makefiles.md
│ │ │ ├── build-with-mingw.md
│ │ │ ├── build-with-visual-studio.md
│ │ │ ├── build.md
│ │ │ ├── compatibility-plan.md
│ │ │ ├── contributing.md
│ │ │ ├── custom-functions-internal.md
│ │ │ ├── dev-ast-memory.md
│ │ │ ├── implementations.md
│ │ │ ├── plugins.md
│ │ │ ├── setup-environment.md
│ │ │ ├── source-map-internals.md
│ │ │ ├── trace.md
│ │ │ ├── triage.md
│ │ │ └── unicode.md
│ │ ├── extconf.rb
│ │ ├── include/
│ │ │ ├── sass/
│ │ │ │ ├── base.h
│ │ │ │ ├── context.h
│ │ │ │ ├── functions.h
│ │ │ │ ├── values.h
│ │ │ │ ├── version.h
│ │ │ │ └── version.h.in
│ │ │ ├── sass.h
│ │ │ └── sass2scss.h
│ │ ├── m4/
│ │ │ ├── .gitkeep
│ │ │ └── m4-ax_cxx_compile_stdcxx_11.m4
│ │ ├── res/
│ │ │ └── resource.rc
│ │ ├── script/
│ │ │ ├── bootstrap
│ │ │ ├── branding
│ │ │ ├── ci-build-libsass
│ │ │ ├── ci-build-plugin
│ │ │ ├── ci-install-compiler
│ │ │ ├── ci-install-deps
│ │ │ ├── ci-report-coverage
│ │ │ ├── spec
│ │ │ ├── tap-driver
│ │ │ ├── tap-runner
│ │ │ └── test-leaks.pl
│ │ ├── src/
│ │ │ ├── GNUmakefile.am
│ │ │ ├── ast.cpp
│ │ │ ├── ast.hpp
│ │ │ ├── ast_def_macros.hpp
│ │ │ ├── ast_fwd_decl.cpp
│ │ │ ├── ast_fwd_decl.hpp
│ │ │ ├── b64/
│ │ │ │ ├── cencode.h
│ │ │ │ └── encode.h
│ │ │ ├── backtrace.cpp
│ │ │ ├── backtrace.hpp
│ │ │ ├── base64vlq.cpp
│ │ │ ├── base64vlq.hpp
│ │ │ ├── bind.cpp
│ │ │ ├── bind.hpp
│ │ │ ├── c99func.c
│ │ │ ├── cencode.c
│ │ │ ├── check_nesting.cpp
│ │ │ ├── check_nesting.hpp
│ │ │ ├── color_maps.cpp
│ │ │ ├── color_maps.hpp
│ │ │ ├── constants.cpp
│ │ │ ├── constants.hpp
│ │ │ ├── context.cpp
│ │ │ ├── context.hpp
│ │ │ ├── cssize.cpp
│ │ │ ├── cssize.hpp
│ │ │ ├── debug.hpp
│ │ │ ├── debugger.hpp
│ │ │ ├── emitter.cpp
│ │ │ ├── emitter.hpp
│ │ │ ├── environment.cpp
│ │ │ ├── environment.hpp
│ │ │ ├── error_handling.cpp
│ │ │ ├── error_handling.hpp
│ │ │ ├── eval.cpp
│ │ │ ├── eval.hpp
│ │ │ ├── expand.cpp
│ │ │ ├── expand.hpp
│ │ │ ├── extend.cpp
│ │ │ ├── extend.hpp
│ │ │ ├── file.cpp
│ │ │ ├── file.hpp
│ │ │ ├── functions.cpp
│ │ │ ├── functions.hpp
│ │ │ ├── inspect.cpp
│ │ │ ├── inspect.hpp
│ │ │ ├── json.cpp
│ │ │ ├── json.hpp
│ │ │ ├── kwd_arg_macros.hpp
│ │ │ ├── lexer.cpp
│ │ │ ├── lexer.hpp
│ │ │ ├── listize.cpp
│ │ │ ├── listize.hpp
│ │ │ ├── mapping.hpp
│ │ │ ├── memory/
│ │ │ │ ├── SharedPtr.cpp
│ │ │ │ └── SharedPtr.hpp
│ │ │ ├── node.cpp
│ │ │ ├── node.hpp
│ │ │ ├── operation.hpp
│ │ │ ├── operators.cpp
│ │ │ ├── operators.hpp
│ │ │ ├── output.cpp
│ │ │ ├── output.hpp
│ │ │ ├── parser.cpp
│ │ │ ├── parser.hpp
│ │ │ ├── paths.hpp
│ │ │ ├── plugins.cpp
│ │ │ ├── plugins.hpp
│ │ │ ├── position.cpp
│ │ │ ├── position.hpp
│ │ │ ├── prelexer.cpp
│ │ │ ├── prelexer.hpp
│ │ │ ├── remove_placeholders.cpp
│ │ │ ├── remove_placeholders.hpp
│ │ │ ├── sass.cpp
│ │ │ ├── sass.hpp
│ │ │ ├── sass2scss.cpp
│ │ │ ├── sass_context.cpp
│ │ │ ├── sass_context.hpp
│ │ │ ├── sass_functions.cpp
│ │ │ ├── sass_functions.hpp
│ │ │ ├── sass_util.cpp
│ │ │ ├── sass_util.hpp
│ │ │ ├── sass_values.cpp
│ │ │ ├── sass_values.hpp
│ │ │ ├── source_map.cpp
│ │ │ ├── source_map.hpp
│ │ │ ├── subset_map.cpp
│ │ │ ├── subset_map.hpp
│ │ │ ├── support/
│ │ │ │ └── libsass.pc.in
│ │ │ ├── to_c.cpp
│ │ │ ├── to_c.hpp
│ │ │ ├── to_value.cpp
│ │ │ ├── to_value.hpp
│ │ │ ├── units.cpp
│ │ │ ├── units.hpp
│ │ │ ├── utf8/
│ │ │ │ ├── checked.h
│ │ │ │ ├── core.h
│ │ │ │ └── unchecked.h
│ │ │ ├── utf8.h
│ │ │ ├── utf8_string.cpp
│ │ │ ├── utf8_string.hpp
│ │ │ ├── util.cpp
│ │ │ ├── util.hpp
│ │ │ ├── values.cpp
│ │ │ └── values.hpp
│ │ ├── test/
│ │ │ ├── test_node.cpp
│ │ │ ├── test_paths.cpp
│ │ │ ├── test_selector_difference.cpp
│ │ │ ├── test_specificity.cpp
│ │ │ ├── test_subset_map.cpp
│ │ │ ├── test_superselector.cpp
│ │ │ └── test_unification.cpp
│ │ ├── version.sh
│ │ └── win/
│ │ ├── libsass.sln
│ │ ├── libsass.sln.DotSettings
│ │ ├── libsass.targets
│ │ ├── libsass.vcxproj
│ │ └── libsass.vcxproj.filters
│ ├── libsass.gyp
│ ├── sass_context_wrapper.cpp
│ ├── sass_context_wrapper.h
│ └── sass_types/
│ ├── boolean.cpp
│ ├── boolean.h
│ ├── color.cpp
│ ├── color.h
│ ├── error.cpp
│ ├── error.h
│ ├── factory.cpp
│ ├── factory.h
│ ├── list.cpp
│ ├── list.h
│ ├── map.cpp
│ ├── map.h
│ ├── null.cpp
│ ├── null.h
│ ├── number.cpp
│ ├── number.h
│ ├── sass_value_wrapper.h
│ ├── string.cpp
│ ├── string.h
│ └── value.h
└── test/
├── api.js
├── binding.js
├── cli.js
├── downloadoptions.js
├── errors.js
├── fixtures/
│ ├── compressed/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── custom-functions/
│ │ ├── setter-expected.css
│ │ ├── setter.scss
│ │ ├── string-conversion-expected.css
│ │ └── string-conversion.scss
│ ├── cwd-include-path/
│ │ ├── expected.css
│ │ ├── outside.scss
│ │ └── root/
│ │ └── index.scss
│ ├── depth-first/
│ │ ├── _common.scss
│ │ ├── _struct.scss
│ │ ├── _vars.scss
│ │ ├── a.scss
│ │ ├── a1.scss
│ │ ├── b.scss
│ │ ├── b1.scss
│ │ ├── expected.css
│ │ └── index.scss
│ ├── extras/
│ │ ├── my_custom_arrays_of_importers.js
│ │ ├── my_custom_functions_setter.js
│ │ ├── my_custom_functions_string_conversion.js
│ │ ├── my_custom_importer_data.js
│ │ ├── my_custom_importer_data_cb.js
│ │ ├── my_custom_importer_error.js
│ │ ├── my_custom_importer_file.js
│ │ ├── my_custom_importer_file_and_data.js
│ │ ├── my_custom_importer_file_and_data_cb.js
│ │ └── my_custom_importer_file_cb.js
│ ├── follow/
│ │ └── foo/
│ │ └── bar/
│ │ └── index.scss
│ ├── include-files/
│ │ ├── bar.scss
│ │ ├── chained-imports-with-custom-importer.scss
│ │ ├── expected-data-importer.css
│ │ ├── expected-file-importer.css
│ │ ├── expected-importer.css
│ │ ├── file-not-processed-by-loader.scss
│ │ ├── file-processed-by-loader.scss
│ │ ├── foo.scss
│ │ └── index.scss
│ ├── include-path/
│ │ ├── expected.css
│ │ ├── functions/
│ │ │ └── colorBlue.scss
│ │ ├── index.scss
│ │ └── lib/
│ │ └── vars.scss
│ ├── indent/
│ │ ├── expected.css
│ │ └── index.sass
│ ├── input-directory/
│ │ └── sass/
│ │ ├── _skipped.scss
│ │ ├── nested/
│ │ │ └── three.scss
│ │ ├── one.scss
│ │ └── two.scss
│ ├── invalid/
│ │ └── index.scss
│ ├── output-directory/
│ │ └── index.scss
│ ├── precision/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── sass-path/
│ │ ├── expected-orange.css
│ │ ├── expected-red.css
│ │ ├── index.scss
│ │ ├── orange/
│ │ │ └── colors.scss
│ │ └── red/
│ │ └── colors.scss
│ ├── simple/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── source-comments/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── source-map/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── source-map-embed/
│ │ ├── expected.css
│ │ └── index.scss
│ ├── watcher/
│ │ ├── main/
│ │ │ ├── one.scss
│ │ │ ├── partials/
│ │ │ │ ├── _one.scss
│ │ │ │ ├── _three.scss
│ │ │ │ └── _two.scss
│ │ │ ├── three.scss
│ │ │ └── two.scss
│ │ └── sibling/
│ │ ├── partials/
│ │ │ └── _three.scss
│ │ └── three.scss
│ ├── watching/
│ │ ├── bar.sass
│ │ ├── index.sass
│ │ ├── index.scss
│ │ └── white.scss
│ ├── watching-dir-01/
│ │ └── index.scss
│ └── watching-dir-02/
│ ├── foo.scss
│ └── index.scss
├── lowlevel.js
├── runtime.js
├── scripts/
│ └── util/
│ └── proxy.js
├── types.js
├── useragent.js
└── watcher.js
SYMBOL INDEX (1948 symbols across 152 files)
FILE: lib/errors.js
function humanEnvironment (line 8) | function humanEnvironment() {
function foundBinaries (line 12) | function foundBinaries() {
function foundBinariesList (line 19) | function foundBinariesList() {
function missingBinaryFooter (line 25) | function missingBinaryFooter() {
FILE: lib/extensions.js
function getHumanPlatform (line 21) | function getHumanPlatform(platform) {
function getHumanArchitecture (line 41) | function getHumanArchitecture(arch) {
function getHumanNodeVersion (line 60) | function getHumanNodeVersion(abi) {
function getHumanEnvironment (line 102) | function getHumanEnvironment(env) {
function getInstalledBinaries (line 137) | function getInstalledBinaries() {
function isSupportedEnvironment (line 152) | function isSupportedEnvironment(platform, arch, abi) {
function getArgument (line 168) | function getArgument(name, args) {
function getBinaryName (line 190) | function getBinaryName() {
function getBinaryUrl (line 247) | function getBinaryUrl() {
function getBinaryDir (line 271) | function getBinaryDir() {
function getBinaryPath (line 303) | function getBinaryPath() {
function getCachePathCandidates (line 331) | function getCachePathCandidates() {
function getBinaryCachePath (line 349) | function getBinaryCachePath() {
function getCachedBinary (line 379) | function getCachedBinary() {
function hasBinary (line 405) | function hasBinary(binaryPath) {
function getVersionInfo (line 415) | function getVersionInfo(binding) {
function getPlatformVariant (line 428) | function getPlatformVariant() {
FILE: lib/index.js
function getInputFile (line 22) | function getInputFile(options) {
function getOutputFile (line 33) | function getOutputFile(options) {
function getSourceMap (line 50) | function getSourceMap(options) {
function getStats (line 67) | function getStats(options) {
function endStats (line 84) | function endStats(stats) {
function getStyle (line 98) | function getStyle(options) {
function getIndentWidth (line 116) | function getIndentWidth(options) {
function getIndentType (line 129) | function getIndentType(options) {
function getLinefeed (line 145) | function getLinefeed(options) {
function buildIncludePaths (line 164) | function buildIncludePaths(options) {
function getOptions (line 188) | function getOptions(opts, cb) {
function tryCallback (line 225) | function tryCallback(callback, args) {
function normalizeFunctionSignature (line 250) | function normalizeFunctionSignature(signature, callback) {
function done (line 320) | function done(result) {
function done (line 333) | function done(result) {
function done (line 358) | function done(data) {
FILE: scripts/build.js
function afterBuild (line 17) | function afterBuild(options) {
function build (line 57) | function build(options) {
function parseArgs (line 92) | function parseArgs(args) {
function testBinary (line 124) | function testBinary(options) {
FILE: scripts/install.js
function download (line 21) | function download(url, dest, cb) {
function checkAndDownloadBinary (line 62) | function checkAndDownloadBinary() {
FILE: scripts/prepublish.js
function prepublish (line 8) | function prepublish() {
FILE: scripts/util/rejectUnauthorized.js
function getArgument (line 10) | function getArgument(name, args) {
FILE: src/binding.cpp
function Sass_Import_List (line 8) | Sass_Import_List sass_importer(const char* cur_path, Sass_Importer_Entry...
type Sass_Compiler (line 22) | struct Sass_Compiler
function ExtractOptions (line 35) | int ExtractOptions(v8::Local<v8::Object> options, void* cptr, sass_conte...
function GetStats (line 172) | void GetStats(sass_context_wrapper* ctx_w, Sass_Context* ctx) {
function GetResult (line 202) | int GetResult(sass_context_wrapper* ctx_w, Sass_Context* ctx, bool is_sy...
function PerformCall (line 230) | void PerformCall(sass_context_wrapper* ctx_w, Nan::Callback* callback, i...
function MakeCallback (line 238) | void MakeCallback(uv_work_t* req) {
function NAN_METHOD (line 273) | NAN_METHOD(render) {
function NAN_METHOD (line 290) | NAN_METHOD(render_sync) {
function NAN_METHOD (line 309) | NAN_METHOD(render_file) {
function NAN_METHOD (line 325) | NAN_METHOD(render_file_sync) {
function NAN_METHOD (line 345) | NAN_METHOD(libsass_version) {
function NAN_MODULE_INIT (line 349) | NAN_MODULE_INIT(RegisterModule) {
FILE: src/callback_bridge.h
function is_sync (line 58) | callback(new Nan::Callback(callback)), is_sync(is_sync) {
FILE: src/custom_function_bridge.cpp
function Sass_Value (line 7) | Sass_Value* CustomFunctionBridge::post_process_return_value(v8::Local<v8...
FILE: src/custom_importer_bridge.cpp
function SassImportList (line 6) | SassImportList CustomImporterBridge::post_process_return_value(v8::Local...
function Sass_Import (line 58) | Sass_Import* CustomImporterBridge::check_returned_string(Nan::MaybeLocal...
function Sass_Import (line 74) | Sass_Import* CustomImporterBridge::get_importer_entry(const v8::Local<v8...
FILE: src/custom_importer_bridge.h
type Sass_Import_List (line 9) | typedef Sass_Import_List SassImportList;
FILE: src/libsass/contrib/plugin.cpp
type Sass_Compiler (line 13) | struct Sass_Compiler
type Sass_Context (line 16) | struct Sass_Context
type Sass_Options (line 17) | struct Sass_Options
function Sass_Function_List (line 24) | Sass_Function_List ADDCALL libsass_load_functions()
function Sass_Import_List (line 37) | Sass_Import_List custom_importer(const char* cur_path, Sass_Importer_Ent...
function Sass_Importer_List (line 49) | Sass_Importer_List ADDCALL libsass_load_importers()
FILE: src/libsass/include/sass/base.h
type Sass_Output_Style (line 57) | enum Sass_Output_Style {
FILE: src/libsass/include/sass/context.h
type Sass_Compiler (line 16) | struct Sass_Compiler
type Sass_Options (line 19) | struct Sass_Options
type Sass_Context (line 20) | struct Sass_Context
type Sass_File_Context (line 21) | struct Sass_File_Context
type Sass_Data_Context (line 22) | struct Sass_Data_Context
type Sass_Compiler_State (line 25) | enum Sass_Compiler_State {
type Sass_File_Context (line 38) | struct Sass_File_Context
type Sass_Data_Context (line 39) | struct Sass_Data_Context
type Sass_File_Context (line 42) | struct Sass_File_Context
type Sass_Data_Context (line 43) | struct Sass_Data_Context
type Sass_Compiler (line 47) | struct Sass_Compiler
type Sass_Compiler (line 48) | struct Sass_Compiler
type Sass_Compiler (line 52) | struct Sass_Compiler
type Sass_Options (line 53) | struct Sass_Options
type Sass_File_Context (line 56) | struct Sass_File_Context
type Sass_Data_Context (line 57) | struct Sass_Data_Context
type Sass_File_Context (line 60) | struct Sass_File_Context
type Sass_Data_Context (line 61) | struct Sass_Data_Context
type Sass_Context (line 64) | struct Sass_Context
type Sass_File_Context (line 65) | struct Sass_File_Context
type Sass_Data_Context (line 66) | struct Sass_Data_Context
type Sass_File_Context (line 67) | struct Sass_File_Context
type Sass_Options (line 67) | struct Sass_Options
type Sass_Data_Context (line 68) | struct Sass_Data_Context
type Sass_Options (line 68) | struct Sass_Options
type Sass_Options (line 72) | struct Sass_Options
type Sass_Options (line 73) | struct Sass_Options
type Sass_Options (line 74) | struct Sass_Options
type Sass_Options (line 75) | struct Sass_Options
type Sass_Options (line 76) | struct Sass_Options
type Sass_Options (line 77) | struct Sass_Options
type Sass_Options (line 78) | struct Sass_Options
type Sass_Options (line 79) | struct Sass_Options
type Sass_Options (line 80) | struct Sass_Options
type Sass_Options (line 81) | struct Sass_Options
type Sass_Options (line 82) | struct Sass_Options
type Sass_Options (line 83) | struct Sass_Options
type Sass_Options (line 84) | struct Sass_Options
type Sass_Options (line 85) | struct Sass_Options
type Sass_Options (line 86) | struct Sass_Options
type Sass_Options (line 87) | struct Sass_Options
type Sass_Options (line 88) | struct Sass_Options
type Sass_Options (line 91) | struct Sass_Options
type Sass_Options (line 92) | struct Sass_Options
type Sass_Output_Style (line 92) | enum Sass_Output_Style
type Sass_Options (line 93) | struct Sass_Options
type Sass_Options (line 94) | struct Sass_Options
type Sass_Options (line 95) | struct Sass_Options
type Sass_Options (line 96) | struct Sass_Options
type Sass_Options (line 97) | struct Sass_Options
type Sass_Options (line 98) | struct Sass_Options
type Sass_Options (line 99) | struct Sass_Options
type Sass_Options (line 100) | struct Sass_Options
type Sass_Options (line 101) | struct Sass_Options
type Sass_Options (line 102) | struct Sass_Options
type Sass_Options (line 103) | struct Sass_Options
type Sass_Options (line 104) | struct Sass_Options
type Sass_Options (line 105) | struct Sass_Options
type Sass_Options (line 106) | struct Sass_Options
type Sass_Options (line 107) | struct Sass_Options
type Sass_Options (line 108) | struct Sass_Options
type Sass_Options (line 109) | struct Sass_Options
type Sass_Context (line 113) | struct Sass_Context
type Sass_Context (line 114) | struct Sass_Context
type Sass_Context (line 115) | struct Sass_Context
type Sass_Context (line 116) | struct Sass_Context
type Sass_Context (line 117) | struct Sass_Context
type Sass_Context (line 118) | struct Sass_Context
type Sass_Context (line 119) | struct Sass_Context
type Sass_Context (line 120) | struct Sass_Context
type Sass_Context (line 121) | struct Sass_Context
type Sass_Context (line 122) | struct Sass_Context
type Sass_Context (line 123) | struct Sass_Context
type Sass_Options (line 126) | struct Sass_Options
type Sass_Options (line 127) | struct Sass_Options
type Sass_Context (line 130) | struct Sass_Context
type Sass_Context (line 133) | struct Sass_Context
type Sass_Context (line 134) | struct Sass_Context
type Sass_Context (line 135) | struct Sass_Context
type Sass_Context (line 136) | struct Sass_Context
type Sass_Context (line 137) | struct Sass_Context
type Sass_Context (line 138) | struct Sass_Context
type Sass_Context (line 139) | struct Sass_Context
type Sass_Compiler (line 142) | struct Sass_Compiler
type Sass_Compiler (line 143) | struct Sass_Compiler
type Sass_Compiler (line 144) | struct Sass_Compiler
type Sass_Compiler (line 145) | struct Sass_Compiler
type Sass_Compiler (line 146) | struct Sass_Compiler
type Sass_Compiler (line 147) | struct Sass_Compiler
type Sass_Compiler (line 148) | struct Sass_Compiler
type Sass_Compiler (line 149) | struct Sass_Compiler
type Sass_Compiler (line 150) | struct Sass_Compiler
type Sass_Options (line 153) | struct Sass_Options
type Sass_Options (line 154) | struct Sass_Options
type Sass_Options (line 158) | struct Sass_Options
type Sass_Options (line 159) | struct Sass_Options
type Sass_Compiler (line 163) | struct Sass_Compiler
type Sass_Compiler (line 164) | struct Sass_Compiler
FILE: src/libsass/include/sass/functions.h
type Sass_Env (line 14) | struct Sass_Env
type Sass_Callee (line 15) | struct Sass_Callee
type Sass_Import (line 16) | struct Sass_Import
type Sass_Options (line 17) | struct Sass_Options
type Sass_Compiler (line 18) | struct Sass_Compiler
type Sass_Importer (line 19) | struct Sass_Importer
type Sass_Function (line 20) | struct Sass_Function
type Sass_Env (line 23) | struct Sass_Env
type Sass_Callee (line 25) | struct Sass_Callee
type Sass_Import (line 27) | struct Sass_Import
type Sass_Import (line 28) | struct Sass_Import
type Sass_Importer (line 30) | struct Sass_Importer
type Sass_Importer (line 31) | struct Sass_Importer
type Sass_Import_List (line 33) | typedef Sass_Import_List (*Sass_Importer_Fn)
type Sass_Function (line 37) | struct Sass_Function
type Sass_Function (line 38) | struct Sass_Function
type Sass_Compiler (line 41) | struct Sass_Compiler
type Sass_Callee_Type (line 44) | enum Sass_Callee_Type {
FILE: src/libsass/include/sass/values.h
type Sass_Tag (line 17) | enum Sass_Tag {
type Sass_Separator (line 30) | enum Sass_Separator {
type Sass_OP (line 39) | enum Sass_OP {
type Sass_OP (line 67) | enum Sass_OP
type Sass_Separator (line 118) | enum Sass_Separator
FILE: src/libsass/include/sass2scss.h
function namespace (line 44) | namespace Sass
FILE: src/libsass/src/ast.cpp
type Sass (line 18) | namespace Sass {
function str_rtrim (line 73) | void str_rtrim(std::string& str, const std::string& delimiters = " \f\...
function Compound_Selector_Ptr (line 337) | Compound_Selector_Ptr Compound_Selector::unify_with(Compound_Selector_...
function Compound_Selector_Ptr (line 508) | Compound_Selector_Ptr Simple_Selector::unify_with(Compound_Selector_Pt...
function Simple_Selector_Ptr (line 541) | Simple_Selector_Ptr Element_Selector::unify_with(Simple_Selector_Ptr rhs)
function Compound_Selector_Ptr (line 572) | Compound_Selector_Ptr Element_Selector::unify_with(Compound_Selector_P...
function Compound_Selector_Ptr (line 619) | Compound_Selector_Ptr Class_Selector::unify_with(Compound_Selector_Ptr...
function Compound_Selector_Ptr (line 625) | Compound_Selector_Ptr Id_Selector::unify_with(Compound_Selector_Ptr rhs)
function Compound_Selector_Ptr (line 637) | Compound_Selector_Ptr Pseudo_Selector::unify_with(Compound_Selector_Pt...
function Complex_Selector_Obj (line 973) | Complex_Selector_Obj Compound_Selector::to_complex()
function Selector_List_Ptr (line 983) | Selector_List_Ptr Complex_Selector::unify_with(Complex_Selector_Ptr ot...
function Selector_List_Obj (line 1254) | Selector_List_Obj Selector_List::eval(Eval& eval)
function Selector_List_Ptr (line 1262) | Selector_List_Ptr Selector_List::resolve_parent_refs(std::vector<Selec...
function Selector_List_Ptr (line 1276) | Selector_List_Ptr Complex_Selector::resolve_parent_refs(std::vector<Se...
function Selector_List_Ptr (line 1423) | Selector_List_Ptr Complex_Selector::tails(Selector_List_Ptr tails)
function Complex_Selector_Obj (line 1440) | Complex_Selector_Obj Complex_Selector::first()
function Complex_Selector_Obj (line 1462) | Complex_Selector_Obj Complex_Selector::last()
function Selector_List_Ptr (line 1648) | Selector_List_Ptr Selector_List::unify_with(Selector_List_Ptr rhs) {
function Compound_Selector_Ptr (line 1712) | Compound_Selector_Ptr Compound_Selector::minus(Compound_Selector_Ptr rhs)
function Argument_Obj (line 1743) | Argument_Obj Arguments::get_rest_argument()
function Argument_Obj (line 1755) | Argument_Obj Arguments::get_keyword_argument()
function Expression_Obj (line 2046) | Expression_Obj Hashed::at(Expression_Obj k) const
function Expression_Obj (line 2098) | Expression_Obj List::value_at_index(size_t i) {
function List_Obj (line 2114) | List_Obj Map::to_list(ParserState& pstate) {
FILE: src/libsass/src/ast.hpp
class Operand (line 83) | class Operand {
method Operand (line 85) | Operand(Sass_OP operand, bool ws_before = false, bool ws_after = false)
type Sass_OP (line 89) | enum Sass_OP
function hash_combine (line 100) | void hash_combine (std::size_t& seed, const T& val)
function namespace (line 110) | class AST_Node : public SharedObj {
class Vectorized (line 293) | class Vectorized {
method reset_hash (line 297) | void reset_hash() { hash_ = 0; }
method adjust_after_pushing (line 298) | virtual void adjust_after_pushing(T element) { }
method Vectorized (line 300) | Vectorized(size_t s = 0) : elements_(std::vector<T>()), hash_(0)
method length (line 303) | size_t length() const { return elements_.size(); }
method empty (line 304) | bool empty() const { return elements_.empty(); }
method clear (line 305) | void clear() { return elements_.clear(); }
method T (line 306) | T last() const { return elements_.back(); }
method T (line 307) | T first() const { return elements_.front(); }
method T (line 308) | T& operator[](size_t i) { return elements_[i]; }
method T (line 309) | virtual const T& at(size_t i) const { return elements_.at(i); }
method T (line 310) | virtual T& at(size_t i) { return elements_.at(i); }
method T (line 311) | const T& operator[](size_t i) const { return elements_[i]; }
method append (line 312) | virtual void append(T element)
method concat (line 320) | virtual void concat(Vectorized* v)
method Vectorized (line 324) | Vectorized& unshift(T element)
method hash (line 333) | virtual size_t hash()
method end (line 343) | typename std::vector<T>::iterator end() { return elements_.end(); }
method begin (line 344) | typename std::vector<T>::iterator begin() { return elements_.begin(); }
method end (line 345) | typename std::vector<T>::const_iterator end() const { return elements_...
method begin (line 346) | typename std::vector<T>::const_iterator begin() const { return element...
method erase (line 347) | typename std::vector<T>::iterator erase(typename std::vector<T>::itera...
method erase (line 348) | typename std::vector<T>::const_iterator erase(typename std::vector<T>:...
class Hashed (line 358) | class Hashed {
method reset_hash (line 365) | void reset_hash() { hash_ = 0; }
method reset_duplicate_key (line 366) | void reset_duplicate_key() { duplicate_key_ = 0; }
method adjust_after_pushing (line 367) | virtual void adjust_after_pushing(std::pair<Expression_Obj, Expression...
method Hashed (line 369) | Hashed(size_t s = 0)
method length (line 375) | size_t length() const { return list_.size(); }
method empty (line 376) | bool empty() const { return list_.empty(); }
method has (line 377) | bool has(Expression_Obj k) const { return elements_.count(k) ...
method has_duplicate_key (line 379) | bool has_duplicate_key() const { return duplicate_key_ != 0; }
method Expression_Obj (line 380) | Expression_Obj get_duplicate_key() const { return duplicate_key_; }
method ExpressionMap (line 381) | const ExpressionMap elements() { return elements_; }
method Hashed (line 382) | Hashed& operator<<(std::pair<Expression_Obj, Expression_Obj> p)
method Hashed (line 394) | Hashed& operator+=(Hashed* h)
method ExpressionMap (line 409) | const ExpressionMap& pairs() const { return elements_; }
class Statement (line 426) | class Statement : public AST_Node {
type Statement_Type (line 428) | enum Statement_Type {
method Statement (line 458) | Statement(ParserState pstate, Statement_Type st = NONE, size_t t = 0)
method Statement (line 461) | Statement(const Statement* ptr)
method is_invisible (line 469) | virtual bool is_invisible() const { return false; }
method bubbles (line 470) | virtual bool bubbles() { return false; }
method has_content (line 471) | virtual bool has_content()
function adjust_after_pushing (line 485) | void adjust_after_pushing(Statement_Obj s)
function Block (line 489) | Block(ParserState pstate, size_t s = 0, bool r = false)
function Block (line 494) | Block(const Block* ptr)
function has_content (line 499) | virtual bool has_content()
class Has_Block (line 513) | class Has_Block : public Statement {
method Has_Block (line 516) | Has_Block(ParserState pstate, Block_Obj b)
method Has_Block (line 519) | Has_Block(const Has_Block* ptr)
method has_content (line 522) | virtual bool has_content()
function Ruleset (line 538) | Ruleset(ParserState pstate, Selector_List_Obj s = 0, Block_Obj b = 0)
function Ruleset (line 541) | Ruleset(const Ruleset* ptr)
function Bubble (line 558) | Bubble(ParserState pstate, Statement_Obj n, Statement_Obj g = 0, size_t ...
function Bubble (line 561) | Bubble(const Bubble* ptr)
function bubbles (line 566) | bool bubbles() { return true; }
function Trace (line 578) | Trace(ParserState pstate, std::string n, Block_Obj b = 0, char type = 'm')
function Trace (line 581) | Trace(const Trace* ptr)
function Media_Block (line 596) | Media_Block(ParserState pstate, List_Obj mqs, Block_Obj b)
function Media_Block (line 599) | Media_Block(const Media_Block* ptr)
function bubbles (line 602) | bool bubbles() { return true; }
function Directive (line 617) | Directive(ParserState pstate, std::string kwd, Selector_List_Obj sel = 0...
function Directive (line 620) | Directive(const Directive* ptr)
function bubbles (line 626) | bool bubbles() { return is_keyframes() || is_media(); }
function is_media (line 627) | bool is_media() {
function is_keyframes (line 633) | bool is_keyframes() {
function Keyframe_Rule (line 651) | Keyframe_Rule(ParserState pstate, Block_Obj b)
function Keyframe_Rule (line 654) | Keyframe_Rule(const Keyframe_Rule* ptr)
function Declaration (line 671) | Declaration(ParserState pstate,
function Declaration (line 675) | Declaration(const Declaration* ptr)
function Assignment (line 697) | Assignment(ParserState pstate,
function Assignment (line 703) | Assignment(const Assignment* ptr)
function Import (line 723) | Import(ParserState pstate)
function Import (line 729) | Import(const Import* ptr)
function abs_path (line 746) | std::string abs_path() { return resource_.abs_path; }
function imp_path (line 747) | std::string imp_path() { return resource_.imp_path; }
function Include (line 748) | Include resource() { return resource_; }
function Import_Stub (line 750) | Import_Stub(ParserState pstate, Include res)
function Import_Stub (line 753) | Import_Stub(const Import_Stub* ptr)
function Warning (line 766) | Warning(ParserState pstate, Expression_Obj msg)
function Warning (line 769) | Warning(const Warning* ptr)
function Error (line 782) | Error(ParserState pstate, Expression_Obj msg)
function Error (line 785) | Error(const Error* ptr)
function Debug (line 798) | Debug(ParserState pstate, Expression_Obj val)
function Debug (line 801) | Debug(const Debug* ptr)
function Comment (line 815) | Comment(ParserState pstate, String_Obj txt, bool is_important)
function Comment (line 818) | Comment(const Comment* ptr)
function is_invisible (line 823) | virtual bool is_invisible() const
function If (line 836) | If(ParserState pstate, Expression_Obj pred, Block_Obj con, Block_Obj alt...
function If (line 839) | If(const If* ptr)
function has_content (line 844) | virtual bool has_content()
function For (line 861) | For(ParserState pstate,
function For (line 866) | For(const For* ptr)
function Each (line 884) | Each(ParserState pstate, std::vector<std::string> vars, Expression_Obj l...
function Each (line 887) | Each(const Each* ptr)
function While (line 900) | While(ParserState pstate, Expression_Obj pred, Block_Obj b)
function While (line 903) | While(const While* ptr)
function Return (line 916) | Return(ParserState pstate, Expression_Obj val)
function Return (line 919) | Return(const Return* ptr)
function Extension (line 932) | Extension(ParserState pstate, Selector_List_Obj s)
function Extension (line 935) | Extension(const Extension* ptr)
type Backtrace (line 946) | struct Backtrace
type Type (line 951) | enum Type { MIXIN, FUNCTION }
function Definition (line 962) | Definition(const Definition* ptr)
function Definition (line 975) | Definition(ParserState pstate,
function Definition (line 991) | Definition(ParserState pstate,
function Definition (line 1008) | Definition(ParserState pstate,
function Mixin_Call (line 1037) | Mixin_Call(ParserState pstate, std::string n, Arguments_Obj args, Block_...
function Mixin_Call (line 1040) | Mixin_Call(const Mixin_Call* ptr)
function Content (line 1055) | Content(ParserState pstate)
function Content (line 1059) | Content(const Content* ptr)
function adjust_after_pushing (line 1072) | void adjust_after_pushing(Expression_Obj e) { is_expanded(false); }
type Sass_Separator (line 1074) | enum Sass_Separator
function List (line 1079) | List(ParserState pstate,
function List (line 1088) | List(const List* ptr)
function type (line 1096) | std::string type() const { return is_arglist_ ? "arglist" : "list"; }
function type_name (line 1097) | static std::string type_name() { return "list"; }
function is_invisible (line 1102) | bool is_invisible() const { return empty() && !is_bracketed(); }
function hash (line 1107) | virtual size_t hash()
function set_delayed (line 1118) | virtual void set_delayed(bool delayed)
function adjust_after_pushing (line 1134) | void adjust_after_pushing(std::pair<Expression_Obj, Expression_Obj> p) {...
function Map (line 1136) | Map(ParserState pstate,
function Map (line 1141) | Map(const Map* ptr)
function type (line 1145) | std::string type() const { return "map"; }
function type_name (line 1146) | static std::string type_name() { return "map"; }
function is_invisible (line 1147) | bool is_invisible() const { return empty(); }
function hash (line 1150) | virtual size_t hash()
function sass_op_to_name (line 1168) | inline static const std::string sass_op_to_name(enum Sass_OP op) {
function sass_op_separator (line 1189) | inline static const std::string sass_op_separator(enum Sass_OP op) {
function Binary_Expression (line 1222) | Binary_Expression(ParserState pstate,
function Binary_Expression (line 1226) | Binary_Expression(const Binary_Expression* ptr)
function type_name (line 1233) | const std::string type_name() {
function separator (line 1236) | const std::string separator() {
function has_interpolant (line 1241) | bool has_interpolant() const
function set_delayed (line 1246) | virtual void set_delayed(bool delayed)
function hash (line 1268) | virtual size_t hash()
function optype (line 1277) | enum Sass_OP optype() const { return op_.operand; }
type Type (line 1287) | enum Type { PLUS, MINUS, NOT, SLASH }
function Unary_Expression (line 1293) | Unary_Expression(ParserState pstate, Type t, Expression_Obj o)
function Unary_Expression (line 1296) | Unary_Expression(const Unary_Expression* ptr)
function type_name (line 1302) | const std::string type_name() {
function hash (line 1326) | virtual size_t hash()
function Argument (line 1348) | Argument(ParserState pstate, Expression_Obj val, std::string n = "", boo...
function Argument (line 1355) | Argument(const Argument* ptr)
function hash (line 1384) | virtual size_t hash()
function Arguments (line 1409) | Arguments(ParserState pstate)
function Arguments (line 1416) | Arguments(const Arguments* ptr)
function Function (line 1441) | Function(ParserState pstate, Definition_Obj def, bool css)
function Function (line 1444) | Function(const Function* ptr)
function type (line 1448) | std::string type() const { return "function"; }
function type_name (line 1449) | static std::string type_name() { return "function"; }
function is_invisible (line 1450) | bool is_invisible() const { return true; }
function name (line 1452) | std::string name() {
function Function_Call (line 1476) | Function_Call(ParserState pstate, std::string n, Arguments_Obj args, voi...
function Function_Call (line 1479) | Function_Call(ParserState pstate, std::string n, Arguments_Obj args, Fun...
function Function_Call (line 1482) | Function_Call(ParserState pstate, std::string n, Arguments_Obj args)
function Function_Call (line 1485) | Function_Call(const Function_Call* ptr)
function is_css (line 1495) | bool is_css() {
function hash (line 1518) | virtual size_t hash()
function Function_Call_Schema (line 1538) | Function_Call_Schema(ParserState pstate, String_Obj n, Arguments_Obj args)
function Function_Call_Schema (line 1541) | Function_Call_Schema(const Function_Call_Schema* ptr)
function Variable (line 1556) | Variable(ParserState pstate, std::string n)
function Variable (line 1559) | Variable(const Variable* ptr)
function hash (line 1577) | virtual size_t hash()
function Number (line 1596) | Number(const Number* ptr)
function zero (line 1603) | bool zero() { return zero_; }
function type (line 1604) | std::string type() const { return "number"; }
function type_name (line 1605) | static std::string type_name() { return "number"; }
function hash (line 1610) | virtual size_t hash()
function Color (line 1640) | Color(ParserState pstate, double r, double g, double b, double a = 1, co...
function Color (line 1644) | Color(const Color* ptr)
function type (line 1653) | std::string type() const { return "color"; }
function type_name (line 1654) | static std::string type_name() { return "color"; }
function hash (line 1656) | virtual size_t hash()
function Custom_Error (line 1679) | Custom_Error(ParserState pstate, std::string msg)
function Custom_Error (line 1682) | Custom_Error(const Custom_Error* ptr)
function Custom_Warning (line 1696) | Custom_Warning(ParserState pstate, std::string msg)
function Custom_Warning (line 1699) | Custom_Warning(const Custom_Warning* ptr)
function Boolean (line 1714) | Boolean(ParserState pstate, bool val)
function Boolean (line 1718) | Boolean(const Boolean* ptr)
function type (line 1724) | std::string type() const { return "bool"; }
function type_name (line 1725) | static std::string type_name() { return "bool"; }
function is_false (line 1726) | virtual bool is_false() { return !value_; }
function hash (line 1728) | virtual size_t hash()
function String (line 1748) | String(ParserState pstate, bool delayed = false)
function String (line 1751) | String(const String* ptr)
function type_name (line 1754) | static std::string type_name() { return "string"; }
function String_Schema (line 1774) | String_Schema(ParserState pstate, size_t size = 0, bool css = true)
function String_Schema (line 1777) | String_Schema(const String_Schema* ptr)
function type (line 1784) | std::string type() const { return "string"; }
function type_name (line 1785) | static std::string type_name() { return "string"; }
function has_interpolants (line 1790) | bool has_interpolants() {
function hash (line 1798) | virtual size_t hash()
function set_delayed (line 1807) | virtual void set_delayed(bool delayed) {
function String_Constant (line 1826) | String_Constant(const String_Constant* ptr)
function String_Constant (line 1833) | String_Constant(ParserState pstate, std::string val, bool css = true)
function String_Constant (line 1836) | String_Constant(ParserState pstate, const char* beg, bool css = true)
function String_Constant (line 1839) | String_Constant(ParserState pstate, const char* beg, const char* end, bo...
function String_Constant (line 1842) | String_Constant(ParserState pstate, const Token& tok, bool css = true)
function type (line 1845) | std::string type() const { return "string"; }
function type_name (line 1846) | static std::string type_name() { return "string"; }
function hash (line 1850) | virtual size_t hash()
function double_quote (line 1862) | static char double_quote() { return '"'; }
function single_quote (line 1863) | static char single_quote() { return '\''; }
function String_Quoted (line 1874) | String_Quoted(ParserState pstate, std::string val, char q = 0,
function String_Quoted (line 1884) | String_Quoted(const String_Quoted* ptr)
function Media_Query (line 1902) | Media_Query(ParserState pstate,
function Media_Query (line 1907) | Media_Query(const Media_Query* ptr)
function Media_Query_Expression (line 1926) | Media_Query_Expression(ParserState pstate,
function Media_Query_Expression (line 1930) | Media_Query_Expression(const Media_Query_Expression* ptr)
function Supports_Block (line 1946) | Supports_Block(ParserState pstate, Supports_Condition_Obj condition, Blo...
function Supports_Block (line 1949) | Supports_Block(const Supports_Block* ptr)
function bubbles (line 1952) | bool bubbles() { return true; }
function Supports_Condition (line 1962) | Supports_Condition(ParserState pstate)
function Supports_Condition (line 1965) | Supports_Condition(const Supports_Condition* ptr)
function needs_parens (line 1968) | virtual bool needs_parens(Supports_Condition_Obj cond) const { return fa...
type Operand (line 1978) | enum Operand { AND, OR }
method Operand (line 85) | Operand(Sass_OP operand, bool ws_before = false, bool ws_after = false)
type Sass_OP (line 89) | enum Sass_OP
function Supports_Operator (line 1984) | Supports_Operator(ParserState pstate, Supports_Condition_Obj l, Supports...
function Supports_Operator (line 1987) | Supports_Operator(const Supports_Operator* ptr)
function Supports_Negation (line 2005) | Supports_Negation(ParserState pstate, Supports_Condition_Obj c)
function Supports_Negation (line 2008) | Supports_Negation(const Supports_Negation* ptr)
function Supports_Declaration (line 2024) | Supports_Declaration(ParserState pstate, Expression_Obj f, Expression_Ob...
function Supports_Declaration (line 2027) | Supports_Declaration(const Supports_Declaration* ptr)
function needs_parens (line 2032) | virtual bool needs_parens(Supports_Condition_Obj cond) const { return fa...
function Supports_Interpolation (line 2044) | Supports_Interpolation(ParserState pstate, Expression_Obj v)
function Supports_Interpolation (line 2047) | Supports_Interpolation(const Supports_Interpolation* ptr)
function needs_parens (line 2051) | virtual bool needs_parens(Supports_Condition_Obj cond) const { return fa...
function At_Root_Query (line 2064) | At_Root_Query(ParserState pstate, Expression_Obj f = 0, Expression_Obj v...
function At_Root_Query (line 2067) | At_Root_Query(const At_Root_Query* ptr)
function At_Root_Block (line 2083) | At_Root_Block(ParserState pstate, Block_Obj b = 0, At_Root_Query_Obj e = 0)
function At_Root_Block (line 2086) | At_Root_Block(const At_Root_Block* ptr)
function bubbles (line 2089) | bool bubbles() { return true; }
function exclude_node (line 2090) | bool exclude_node(Statement_Obj s) {
function Null (line 2132) | Null(ParserState pstate) : Value(pstate) { concrete_type(NULL_VAL); }
function Null (line 2133) | Null(const Null* ptr) : Value(ptr) { concrete_type(NULL_VAL); }
function type (line 2134) | std::string type() const { return "null"; }
function type_name (line 2135) | static std::string type_name() { return "null"; }
function is_invisible (line 2136) | bool is_invisible() const { return true; }
function is_false (line 2138) | bool is_false() { return true; }
function hash (line 2140) | virtual size_t hash()
class Thunk (line 2154) | class Thunk : public Expression {
method Thunk (line 2158) | Thunk(ParserState pstate, Expression_Obj exp, Env* env = 0)
function Parameter (line 2171) | Parameter(ParserState pstate,
function Parameter (line 2181) | Parameter(const Parameter* ptr)
function adjust_after_pushing (line 2206) | void adjust_after_pushing(Parameter_Obj p)
function Parameters (line 2230) | Parameters(ParserState pstate)
function Parameters (line 2236) | Parameters(const Parameters* ptr)
class Selector (line 2249) | class Selector : public Expression {
method Selector (line 2265) | Selector(ParserState pstate)
method Selector (line 2273) | Selector(const Selector* ptr)
method set_media_block (line 2285) | virtual void set_media_block(Media_Block_Ptr mb) {
method has_parent_ref (line 2288) | virtual bool has_parent_ref() const {
method has_real_parent_ref (line 2291) | virtual bool has_real_parent_ref() const {
function Selector_Schema (line 2314) | Selector_Schema(ParserState pstate, String_Obj c)
function Selector_Schema (line 2321) | Selector_Schema(const Selector_Schema* ptr)
function specificity (line 2334) | virtual unsigned long specificity() const { return 0; }
function hash (line 2335) | virtual size_t hash() {
class Simple_Selector (line 2348) | class Simple_Selector : public Selector {
method Simple_Selector (line 2354) | Simple_Selector(ParserState pstate, std::string n = "")
method Simple_Selector (line 2366) | Simple_Selector(const Simple_Selector* ptr)
method ns_name (line 2372) | virtual std::string ns_name() const
method hash (line 2379) | virtual size_t hash()
method is_universal_ns (line 2391) | bool is_universal_ns() const
method has_universal_ns (line 2395) | bool has_universal_ns() const
method is_empty_ns (line 2399) | bool is_empty_ns() const
method has_empty_ns (line 2403) | bool has_empty_ns() const
method has_qualified_ns (line 2407) | bool has_qualified_ns() const
method is_universal (line 2412) | bool is_universal() const
method has_placeholder (line 2417) | virtual bool has_placeholder() {
method has_parent_ref (line 2423) | virtual bool has_parent_ref() const { return false; }
method has_real_parent_ref (line 2424) | virtual bool has_real_parent_ref() const { return false; }
method is_pseudo_element (line 2425) | virtual bool is_pseudo_element() const { return false; }
method is_superselector_of (line 2427) | virtual bool is_superselector_of(Compound_Selector_Obj sub) { return f...
function Parent_Selector (line 2451) | Parent_Selector(ParserState pstate, bool r = true)
function Parent_Selector (line 2454) | Parent_Selector(const Parent_Selector* ptr)
function is_real_parent_ref (line 2457) | bool is_real_parent_ref() const { return real(); }
function has_parent_ref (line 2458) | virtual bool has_parent_ref() const { return true; }
function has_real_parent_ref (line 2459) | virtual bool has_real_parent_ref() const { return is_real_parent_ref(); }
function specificity (line 2460) | virtual unsigned long specificity() const
function type (line 2464) | std::string type() const { return "selector"; }
function type_name (line 2465) | static std::string type_name() { return "selector"; }
function Placeholder_Selector (line 2475) | Placeholder_Selector(ParserState pstate, std::string n)
function Placeholder_Selector (line 2478) | Placeholder_Selector(const Placeholder_Selector* ptr)
function specificity (line 2481) | virtual unsigned long specificity() const
function has_placeholder (line 2485) | virtual bool has_placeholder() {
function Element_Selector (line 2498) | Element_Selector(ParserState pstate, std::string n)
function Element_Selector (line 2501) | Element_Selector(const Element_Selector* ptr)
function specificity (line 2504) | virtual unsigned long specificity() const
function Class_Selector (line 2524) | Class_Selector(ParserState pstate, std::string n)
function Class_Selector (line 2527) | Class_Selector(const Class_Selector* ptr)
function specificity (line 2530) | virtual unsigned long specificity() const
function Id_Selector (line 2544) | Id_Selector(ParserState pstate, std::string n)
function Id_Selector (line 2547) | Id_Selector(const Id_Selector* ptr)
function specificity (line 2550) | virtual unsigned long specificity() const
function Attribute_Selector (line 2568) | Attribute_Selector(ParserState pstate, std::string n, std::string m, Str...
function Attribute_Selector (line 2571) | Attribute_Selector(const Attribute_Selector* ptr)
function hash (line 2577) | virtual size_t hash()
function specificity (line 2586) | virtual unsigned long specificity() const
function is_pseudo_class_element (line 2605) | inline bool is_pseudo_class_element(const std::string& name)
function Pseudo_Selector (line 2617) | Pseudo_Selector(ParserState pstate, std::string n, String_Obj expr = 0)
function Pseudo_Selector (line 2620) | Pseudo_Selector(const Pseudo_Selector* ptr)
function is_pseudo_element (line 2632) | virtual bool is_pseudo_element() const
function hash (line 2637) | virtual size_t hash()
function specificity (line 2645) | virtual unsigned long specificity() const
function Wrapped_Selector (line 2666) | Wrapped_Selector(ParserState pstate, std::string n, Selector_List_Obj sel)
function Wrapped_Selector (line 2669) | Wrapped_Selector(const Wrapped_Selector* ptr)
function adjust_after_pushing (line 2699) | void adjust_after_pushing(Simple_Selector_Obj s)
function Compound_Selector (line 2705) | Compound_Selector(ParserState pstate, size_t s = 0)
function Compound_Selector (line 2711) | Compound_Selector(const Compound_Selector* ptr)
function contains_placeholder (line 2717) | bool contains_placeholder() {
function is_universal (line 2726) | bool is_universal() const
function Simple_Selector_Ptr (line 2736) | Simple_Selector_Ptr base() const {
function hash (line 2746) | virtual size_t hash()
function specificity (line 2754) | virtual unsigned long specificity() const
function has_placeholder (line 2762) | virtual bool has_placeholder()
function is_empty_reference (line 2771) | bool is_empty_reference()
function ComplexSelectorSet (line 2784) | ComplexSelectorSet& sources() { return sources_; }
function clearSources (line 2785) | void clearSources() { sources_.clear(); }
type Combinator (line 2801) | enum Combinator { ANCESTOR_OF, PARENT_OF, PRECEDES, ADJACENT_TO, REFEREN...
function contains_placeholder (line 2808) | bool contains_placeholder() {
function Complex_Selector (line 2813) | Complex_Selector(ParserState pstate,
function Complex_Selector (line 2823) | Complex_Selector(const Complex_Selector* ptr)
function Complex_Selector_Obj (line 2832) | Complex_Selector_Obj skip_empty_reference()
function is_empty_ancestor (line 2846) | bool is_empty_ancestor() const
function Complex_Selector_Obj (line 2861) | Complex_Selector_Obj innermost() { return last(); }
function hash (line 2872) | virtual size_t hash()
function specificity (line 2882) | virtual unsigned long specificity() const
function set_media_block (line 2889) | virtual void set_media_block(Media_Block_Ptr mb) {
function has_placeholder (line 2894) | virtual bool has_placeholder() {
function ComplexSelectorSet (line 2905) | const ComplexSelectorSet sources()
function addSources (line 2928) | void addSources(ComplexSelectorSet& sources) {
function clearSources (line 2941) | void clearSources() {
class Selector_List (line 2962) | class Selector_List : public Selector, public Vectorized<Complex_Selecto...
method Selector_List (line 2968) | Selector_List(ParserState pstate, size_t s = 0)
method Selector_List (line 2974) | Selector_List(const Selector_List* ptr)
method type (line 2980) | std::string type() const { return "list"; }
method hash (line 2993) | virtual size_t hash()
method specificity (line 3001) | virtual unsigned long specificity() const
method set_media_block (line 3012) | virtual void set_media_block(Media_Block_Ptr mb) {
method has_placeholder (line 3018) | virtual bool has_placeholder() {
type cmp_complex_selector (line 3037) | struct cmp_complex_selector { inline bool operator() (const Complex_Se...
type cmp_compound_selector (line 3038) | struct cmp_compound_selector { inline bool operator() (const Compound_...
type cmp_simple_selector (line 3039) | struct cmp_simple_selector { inline bool operator() (const Simple_Sele...
FILE: src/libsass/src/ast_def_macros.hpp
class LocalOption (line 6) | class LocalOption {
method LocalOption (line 11) | LocalOption(T& var)
method LocalOption (line 16) | LocalOption(T& var, T orig)
method reset (line 22) | void reset()
FILE: src/libsass/src/ast_fwd_decl.cpp
type Sass (line 3) | namespace Sass {
FILE: src/libsass/src/ast_fwd_decl.hpp
type Sass (line 19) | namespace Sass {
class AST_Node (line 21) | class AST_Node
class Has_Block (line 25) | class Has_Block
class Simple_Selector (line 29) | class Simple_Selector
class PreValue (line 33) | class PreValue
class Thunk (line 36) | class Thunk
class Block (line 39) | class Block
class Expression (line 42) | class Expression
class Statement (line 45) | class Statement
class Value (line 48) | class Value
class Declaration (line 51) | class Declaration
class Ruleset (line 54) | class Ruleset
class Bubble (line 57) | class Bubble
class Trace (line 60) | class Trace
class Media_Block (line 64) | class Media_Block
class Supports_Block (line 67) | class Supports_Block
class Directive (line 70) | class Directive
class Keyframe_Rule (line 75) | class Keyframe_Rule
class At_Root_Block (line 78) | class At_Root_Block
class Assignment (line 81) | class Assignment
class Import (line 85) | class Import
class Import_Stub (line 88) | class Import_Stub
class Warning (line 91) | class Warning
class Error (line 95) | class Error
class Debug (line 98) | class Debug
class Comment (line 101) | class Comment
class If (line 105) | class If
class For (line 108) | class For
class Each (line 111) | class Each
class While (line 114) | class While
class Return (line 117) | class Return
class Content (line 120) | class Content
class Extension (line 123) | class Extension
class Definition (line 126) | class Definition
class List (line 130) | class List
class Map (line 133) | class Map
class Function (line 136) | class Function
class Mixin_Call (line 140) | class Mixin_Call
class Binary_Expression (line 143) | class Binary_Expression
class Unary_Expression (line 146) | class Unary_Expression
class Function_Call (line 149) | class Function_Call
class Function_Call_Schema (line 152) | class Function_Call_Schema
class Custom_Warning (line 155) | class Custom_Warning
class Custom_Error (line 158) | class Custom_Error
class Variable (line 162) | class Variable
class Number (line 165) | class Number
class Color (line 168) | class Color
class Boolean (line 171) | class Boolean
class String (line 174) | class String
class String_Schema (line 178) | class String_Schema
class String_Constant (line 181) | class String_Constant
class String_Quoted (line 184) | class String_Quoted
class Media_Query (line 188) | class Media_Query
class Media_Query_Expression (line 191) | class Media_Query_Expression
class Supports_Condition (line 194) | class Supports_Condition
class Supports_Operator (line 197) | class Supports_Operator
class Supports_Negation (line 200) | class Supports_Negation
class Supports_Declaration (line 203) | class Supports_Declaration
class Supports_Interpolation (line 206) | class Supports_Interpolation
class Null (line 211) | class Null
class At_Root_Query (line 215) | class At_Root_Query
class Parent_Selector (line 218) | class Parent_Selector
class Parameter (line 221) | class Parameter
class Parameters (line 224) | class Parameters
class Argument (line 227) | class Argument
class Arguments (line 230) | class Arguments
class Selector (line 233) | class Selector
class Selector_Schema (line 238) | class Selector_Schema
class Placeholder_Selector (line 241) | class Placeholder_Selector
class Element_Selector (line 244) | class Element_Selector
class Class_Selector (line 247) | class Class_Selector
class Id_Selector (line 250) | class Id_Selector
class Attribute_Selector (line 253) | class Attribute_Selector
class Pseudo_Selector (line 257) | class Pseudo_Selector
class Wrapped_Selector (line 260) | class Wrapped_Selector
class Compound_Selector (line 263) | class Compound_Selector
class Complex_Selector (line 266) | class Complex_Selector
class Selector_List (line 269) | class Selector_List
class Context (line 275) | class Context
class Expand (line 276) | class Expand
class Eval (line 277) | class Eval
type HashNodes (line 365) | struct HashNodes {
type OrderNodes (line 371) | struct OrderNodes {
type CompareNodes (line 377) | struct CompareNodes {
FILE: src/libsass/src/b64/cencode.h
type base64_encodestep (line 11) | typedef enum
type base64_encodestate (line 16) | typedef struct
FILE: src/libsass/src/b64/encode.h
function namespace (line 13) | namespace base64
FILE: src/libsass/src/backtrace.cpp
type Sass (line 3) | namespace Sass {
function traces_to_string (line 5) | const std::string traces_to_string(Backtraces traces, std::string inde...
FILE: src/libsass/src/backtrace.hpp
type Sass (line 9) | namespace Sass {
type Backtrace (line 11) | struct Backtrace {
method Backtrace (line 16) | Backtrace(ParserState pstate, std::string c = "")
FILE: src/libsass/src/base64vlq.cpp
type Sass (line 4) | namespace Sass {
FILE: src/libsass/src/base64vlq.hpp
type Sass (line 6) | namespace Sass {
class Base64VLQ (line 8) | class Base64VLQ {
FILE: src/libsass/src/bind.cpp
type Sass (line 11) | namespace Sass {
function bind (line 13) | void bind(std::string type, std::string name, Parameters_Obj ps, Argum...
FILE: src/libsass/src/bind.hpp
type Sass (line 8) | namespace Sass {
FILE: src/libsass/src/c99func.c
function c99_vsnprintf (line 30) | static int c99_vsnprintf(char* str, size_t size, const char* format, va_...
function snprintf (line 42) | int snprintf(char* str, size_t size, const char* format, ...)
FILE: src/libsass/src/cencode.c
function base64_init_encodestate (line 10) | void base64_init_encodestate(base64_encodestate* state_in)
function base64_encode_value (line 17) | char base64_encode_value(char value_in)
function base64_encode_block (line 24) | int base64_encode_block(const char* plaintext_in, int length_in, char* c...
function base64_encode_blockend (line 86) | int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
FILE: src/libsass/src/check_nesting.cpp
type Sass (line 6) | namespace Sass {
function error (line 14) | void error(AST_Node_Ptr node, Backtraces traces, std::string msg) {
function Statement_Ptr (line 19) | Statement_Ptr CheckNesting::visit_children(Statement_Ptr parent)
function Statement_Ptr (line 101) | Statement_Ptr CheckNesting::operator()(Block_Ptr b)
function Statement_Ptr (line 106) | Statement_Ptr CheckNesting::operator()(Definition_Ptr n)
function Statement_Ptr (line 124) | Statement_Ptr CheckNesting::operator()(If_Ptr i)
function Statement_Ptr (line 135) | Statement_Ptr CheckNesting::fallback_impl(Statement_Ptr s)
FILE: src/libsass/src/check_nesting.hpp
type Sass (line 7) | namespace Sass {
class CheckNesting (line 9) | class CheckNesting : public Operation_CRTP<Statement_Ptr, CheckNesting> {
method Statement_Ptr (line 29) | Statement_Ptr fallback(U x) {
FILE: src/libsass/src/color_maps.cpp
type Sass (line 5) | namespace Sass {
type ColorNames (line 7) | namespace ColorNames
type Colors (line 160) | namespace Colors {
function Color_Ptr_Const (line 608) | Color_Ptr_Const name_to_color(const char* key)
function Color_Ptr_Const (line 613) | Color_Ptr_Const name_to_color(const std::string& key)
FILE: src/libsass/src/color_maps.hpp
type Sass (line 8) | namespace Sass {
type map_cmp_str (line 10) | struct map_cmp_str
type ColorNames (line 18) | namespace ColorNames
type Colors (line 171) | namespace Colors {
FILE: src/libsass/src/constants.cpp
type Sass (line 4) | namespace Sass {
type Constants (line 5) | namespace Constants {
FILE: src/libsass/src/constants.hpp
type Sass (line 4) | namespace Sass {
type Constants (line 5) | namespace Constants {
FILE: src/libsass/src/context.cpp
type Sass (line 33) | namespace Sass {
function sort_importers (line 38) | inline bool sort_importers (const Sass_Importer_Entry& i, const Sass_I...
function safe_input (line 41) | static std::string safe_input(const char* in_path)
function safe_output (line 49) | static std::string safe_output(const char* out_path, const std::string...
type Sass_Context (line 62) | struct Sass_Context
function Include (line 346) | Include Context::load_import(const Importer& imp, ParserState pstate)
function Block_Obj (line 555) | Block_Obj File_Context::parse()
function Block_Obj (line 601) | Block_Obj Data_Context::parse()
function Block_Obj (line 645) | Block_Obj Context::compile()
function register_function (line 733) | void register_function(Context& ctx, Signature sig, Native_Function f,...
function register_function (line 740) | void register_function(Context& ctx, Signature sig, Native_Function f,...
function register_overload_stub (line 749) | void register_overload_stub(Context& ctx, std::string name, Env* env)
function register_built_in_functions (line 762) | void register_built_in_functions(Context& ctx, Env* env)
function register_c_functions (line 866) | void register_c_functions(Context& ctx, Env* env, Sass_Function_List d...
function register_c_function (line 873) | void register_c_function(Context& ctx, Env* env, Sass_Function_Entry d...
FILE: src/libsass/src/context.hpp
type Sass_Function (line 24) | struct Sass_Function
type Sass (line 26) | namespace Sass {
class Context (line 28) | class Context {
method call_headers (line 31) | bool call_headers(const std::string& load_path, const char* ctx_path...
method call_importers (line 33) | bool call_importers(const std::string& load_path, const char* ctx_pa...
type Sass_Options (line 41) | struct Sass_Options
type Sass_Compiler (line 60) | struct Sass_Compiler
type Sass_Context (line 93) | struct Sass_Context
method Sass_Output_Style (line 104) | Sass_Output_Style output_style() { return c_options.output_style; }
class File_Context (line 125) | class File_Context : public Context {
method File_Context (line 127) | File_Context(struct Sass_File_Context& ctx)
class Data_Context (line 134) | class Data_Context : public Context {
method Data_Context (line 138) | Data_Context(struct Sass_Data_Context& ctx)
FILE: src/libsass/src/cssize.cpp
type Sass (line 9) | namespace Sass {
function Statement_Ptr (line 18) | Statement_Ptr Cssize::parent()
function Block_Ptr (line 23) | Block_Ptr Cssize::operator()(Block_Ptr b)
function Statement_Ptr (line 33) | Statement_Ptr Cssize::operator()(Trace_Ptr t)
function Statement_Ptr (line 41) | Statement_Ptr Cssize::operator()(Declaration_Ptr d)
function Statement_Ptr (line 81) | Statement_Ptr Cssize::operator()(Directive_Ptr r)
function Statement_Ptr (line 131) | Statement_Ptr Cssize::operator()(Keyframe_Rule_Ptr r)
function Statement_Ptr (line 143) | Statement_Ptr Cssize::operator()(Ruleset_Ptr r)
function Statement_Ptr (line 210) | Statement_Ptr Cssize::operator()(Null_Ptr m)
function Statement_Ptr (line 215) | Statement_Ptr Cssize::operator()(Media_Block_Ptr m)
function Statement_Ptr (line 236) | Statement_Ptr Cssize::operator()(Supports_Block_Ptr m)
function Statement_Ptr (line 257) | Statement_Ptr Cssize::operator()(At_Root_Block_Ptr m)
function Statement_Ptr (line 285) | Statement_Ptr Cssize::bubble(Directive_Ptr m)
function Statement_Ptr (line 306) | Statement_Ptr Cssize::bubble(At_Root_Block_Ptr m)
function Statement_Ptr (line 327) | Statement_Ptr Cssize::bubble(Supports_Block_Ptr m)
function Statement_Ptr (line 352) | Statement_Ptr Cssize::bubble(Media_Block_Ptr m)
function Block_Ptr (line 381) | Block_Ptr Cssize::flatten(Block_Ptr b)
function Block_Ptr (line 422) | Block_Ptr Cssize::debubble(Block_Ptr children, Statement_Ptr parent)
function Statement_Ptr (line 512) | Statement_Ptr Cssize::fallback_impl(AST_Node_Ptr n)
function List_Ptr (line 532) | List_Ptr Cssize::merge_media_queries(Media_Block_Ptr m1, Media_Block_P...
function Media_Query_Ptr (line 554) | Media_Query_Ptr Cssize::merge_media_query(Media_Query_Ptr mq1, Media_Q...
FILE: src/libsass/src/cssize.hpp
type Sass (line 9) | namespace Sass {
type Backtrace (line 11) | struct Backtrace
class Cssize (line 13) | class Cssize : public Operation_CRTP<Statement_Ptr, Cssize> {
method Statement_Ptr (line 70) | Statement_Ptr fallback(U x) { return fallback_impl(x); }
FILE: src/libsass/src/debug.hpp
type dbg_lvl_t (line 10) | enum dbg_lvl_t : uint32_t {
FILE: src/libsass/src/debugger.hpp
function debug_ast (line 13) | inline void debug_ast(const AST_Node* node, std::string ind = "", Env* e...
function debug_sources_set (line 17) | inline void debug_sources_set(ComplexSelectorSet& set, std::string ind =...
function str_replace (line 27) | inline std::string str_replace(std::string str, const std::string& oldSt...
function prettyprint (line 38) | inline std::string prettyprint(const std::string& str) {
function longToHex (line 45) | inline std::string longToHex(long long t) {
function pstate_source_position (line 51) | inline std::string pstate_source_position(AST_Node_Ptr node)
function debug_ast (line 67) | inline void debug_ast(AST_Node_Ptr node, std::string ind, Env* env)
function debug_node (line 721) | inline void debug_node(Node* node, std::string ind = "")
function debug_node (line 776) | inline void debug_node(const Node* node, std::string ind = "")
function debug_subset_map (line 781) | inline void debug_subset_map(Sass::Subset_Map& map, std::string ind = "")
function debug_subset_entries (line 791) | inline void debug_subset_entries(SubSetMapPairs* entries, std::string in...
FILE: src/libsass/src/emitter.cpp
type Sass (line 8) | namespace Sass {
type Sass_Output_Options (line 10) | struct Sass_Output_Options
function Sass_Output_Style (line 34) | Sass_Output_Style Emitter::output_style(void) const
function ParserState (line 56) | ParserState Emitter::remap(const ParserState& pstate)
FILE: src/libsass/src/emitter.hpp
type Sass (line 10) | namespace Sass {
class Context (line 11) | class Context
class Emitter (line 13) | class Emitter {
type Sass_Output_Options (line 16) | struct Sass_Output_Options
method SourceMap (line 23) | const SourceMap smap(void) { return wbuf.smap; }
method OutputBuffer (line 24) | const OutputBuffer output(void) { return wbuf; }
type Sass_Output_Options (line 35) | struct Sass_Output_Options
FILE: src/libsass/src/environment.cpp
type Sass (line 5) | namespace Sass {
function EnvResult (line 56) | EnvResult
function T (line 65) | T& Environment<T>::get_local(const std::string& key)
function T (line 98) | T& Environment<T>::get_global(const std::string& key)
function EnvResult (line 197) | EnvResult
function T (line 211) | T& Environment<T>::operator[](const std::string& key)
class Environment<AST_Node_Obj> (line 243) | class Environment<AST_Node_Obj>
FILE: src/libsass/src/environment.hpp
type Sass (line 8) | namespace Sass {
class EnvResult (line 12) | class EnvResult {
method EnvResult (line 17) | EnvResult(EnvIter it, bool found)
class Environment (line 22) | class Environment {
FILE: src/libsass/src/error_handling.cpp
type Sass (line 9) | namespace Sass {
type Exception (line 11) | namespace Exception {
type Sass_OP (line 115) | enum Sass_OP
type Sass_OP (line 131) | enum Sass_OP
type Sass_OP (line 141) | enum Sass_OP
function warn (line 161) | void warn(std::string msg, ParserState pstate)
function warning (line 166) | void warning(std::string msg, ParserState pstate)
function warn (line 177) | void warn(std::string msg, ParserState pstate, Backtrace* bt)
function deprecated_function (line 182) | void deprecated_function(std::string msg, ParserState pstate)
function deprecated (line 194) | void deprecated(std::string msg, std::string msg2, bool with_column, P...
function deprecated_bind (line 210) | void deprecated_bind(std::string msg, ParserState pstate)
function coreError (line 223) | void coreError(std::string msg, ParserState pstate)
function error (line 229) | void error(std::string msg, ParserState pstate, Backtraces& traces)
FILE: src/libsass/src/error_handling.hpp
type Sass (line 12) | namespace Sass {
type Backtrace (line 14) | struct Backtrace
type Exception (line 16) | namespace Exception {
class Base (line 23) | class Base : public std::runtime_error {
class InvalidSass (line 37) | class InvalidSass : public Base {
class InvalidParent (line 43) | class InvalidParent : public Base {
class MissingArgument (line 52) | class MissingArgument : public Base {
class InvalidArgumentType (line 62) | class InvalidArgumentType : public Base {
class InvalidVarKwdType (line 73) | class InvalidVarKwdType : public Base {
class InvalidSyntax (line 82) | class InvalidSyntax : public Base {
class NestingLimitError (line 88) | class NestingLimitError : public Base {
class DuplicateKeyError (line 94) | class DuplicateKeyError : public Base {
class TypeMismatch (line 104) | class TypeMismatch : public Base {
class InvalidValue (line 114) | class InvalidValue : public Base {
class StackError (line 123) | class StackError : public Base {
class OperationError (line 133) | class OperationError : public std::runtime_error {
method OperationError (line 137) | OperationError(std::string msg = def_op_msg)
class ZeroDivisionError (line 146) | class ZeroDivisionError : public OperationError {
class IncompatibleUnits (line 156) | class IncompatibleUnits : public OperationError {
class UndefinedOperation (line 166) | class UndefinedOperation : public OperationError {
type Sass_OP (line 172) | enum Sass_OP
class InvalidNullOperation (line 177) | class InvalidNullOperation : public UndefinedOperation {
type Sass_OP (line 179) | enum Sass_OP
class AlphaChannelsNotEqual (line 183) | class AlphaChannelsNotEqual : public OperationError {
type Sass_OP (line 189) | enum Sass_OP
class SassValueError (line 194) | class SassValueError : public Base {
FILE: src/libsass/src/eval.cpp
type Sass (line 30) | namespace Sass {
function Env (line 45) | Env* Eval::environment()
function Selector_List_Obj (line 50) | Selector_List_Obj Eval::selector()
function Expression_Ptr (line 55) | Expression_Ptr Eval::operator()(Block_Ptr b)
function Expression_Ptr (line 65) | Expression_Ptr Eval::operator()(Assignment_Ptr a)
function Expression_Ptr (line 126) | Expression_Ptr Eval::operator()(If_Ptr i)
function Expression_Ptr (line 145) | Expression_Ptr Eval::operator()(For_Ptr f)
function Expression_Ptr (line 201) | Expression_Ptr Eval::operator()(Each_Ptr e)
function Expression_Ptr (line 286) | Expression_Ptr Eval::operator()(While_Ptr w)
function Expression_Ptr (line 305) | Expression_Ptr Eval::operator()(Return_Ptr r)
function Expression_Ptr (line 310) | Expression_Ptr Eval::operator()(Warning_Ptr w)
function Expression_Ptr (line 358) | Expression_Ptr Eval::operator()(Error_Ptr e)
function Expression_Ptr (line 402) | Expression_Ptr Eval::operator()(Debug_Ptr d)
function Expression_Ptr (line 452) | Expression_Ptr Eval::operator()(List_Ptr l)
function Expression_Ptr (line 493) | Expression_Ptr Eval::operator()(Map_Ptr m)
function Expression_Ptr (line 525) | Expression_Ptr Eval::operator()(Binary_Expression_Ptr b_in)
function Expression_Ptr (line 869) | Expression_Ptr Eval::operator()(Unary_Expression_Ptr u)
function Expression_Ptr (line 917) | Expression_Ptr Eval::operator()(Function_Call_Ptr c)
function Expression_Ptr (line 1084) | Expression_Ptr Eval::operator()(Function_Call_Schema_Ptr s)
function Expression_Ptr (line 1094) | Expression_Ptr Eval::operator()(Variable_Ptr v)
function Expression_Ptr (line 1112) | Expression_Ptr Eval::operator()(Color_Ptr c)
function Expression_Ptr (line 1117) | Expression_Ptr Eval::operator()(Number_Ptr n)
function Expression_Ptr (line 1122) | Expression_Ptr Eval::operator()(Boolean_Ptr b)
function Expression_Ptr (line 1214) | Expression_Ptr Eval::operator()(String_Schema_Ptr s)
function Expression_Ptr (line 1258) | Expression_Ptr Eval::operator()(String_Constant_Ptr s)
function Expression_Ptr (line 1263) | Expression_Ptr Eval::operator()(String_Quoted_Ptr s)
function Expression_Ptr (line 1272) | Expression_Ptr Eval::operator()(Supports_Operator_Ptr c)
function Expression_Ptr (line 1284) | Expression_Ptr Eval::operator()(Supports_Negation_Ptr c)
function Expression_Ptr (line 1293) | Expression_Ptr Eval::operator()(Supports_Declaration_Ptr c)
function Expression_Ptr (line 1304) | Expression_Ptr Eval::operator()(Supports_Interpolation_Ptr c)
function Expression_Ptr (line 1313) | Expression_Ptr Eval::operator()(At_Root_Query_Ptr e)
function Media_Query_Ptr (line 1326) | Media_Query_Ptr Eval::operator()(Media_Query_Ptr q)
function Expression_Ptr (line 1342) | Expression_Ptr Eval::operator()(Media_Query_Expression_Ptr e)
function Expression_Ptr (line 1366) | Expression_Ptr Eval::operator()(Null_Ptr n)
function Expression_Ptr (line 1371) | Expression_Ptr Eval::operator()(Argument_Ptr a)
function Expression_Ptr (line 1400) | Expression_Ptr Eval::operator()(Arguments_Ptr a)
function Expression_Ptr (line 1450) | Expression_Ptr Eval::operator()(Comment_Ptr c)
function Expression_Ptr (line 1455) | inline Expression_Ptr Eval::fallback_impl(AST_Node_Ptr n)
function Expression_Ptr (line 1462) | Expression_Ptr cval_to_astnode(union Sass_Value* v, Backtraces traces,...
function Selector_List_Ptr (line 1515) | Selector_List_Ptr Eval::operator()(Selector_List_Ptr s)
function Selector_List_Ptr (line 1548) | Selector_List_Ptr Eval::operator()(Complex_Selector_Ptr s)
function Compound_Selector_Ptr (line 1566) | Compound_Selector_Ptr Eval::operator()(Compound_Selector_Ptr s)
function Selector_List_Ptr (line 1577) | Selector_List_Ptr Eval::operator()(Selector_Schema_Ptr s)
function Expression_Ptr (line 1612) | Expression_Ptr Eval::operator()(Parent_Selector_Ptr p)
function Simple_Selector_Ptr (line 1624) | Simple_Selector_Ptr Eval::operator()(Simple_Selector_Ptr s)
function hasNotSelector (line 1633) | bool hasNotSelector(AST_Node_Obj obj) {
function Wrapped_Selector_Ptr (line 1640) | Wrapped_Selector_Ptr Eval::operator()(Wrapped_Selector_Ptr s)
FILE: src/libsass/src/eval.hpp
type Sass (line 10) | namespace Sass {
class Expand (line 12) | class Expand
class Context (line 13) | class Context
class Eval (line 15) | class Eval : public Operation_CRTP<Expression_Ptr, Eval> {
method Expression_Ptr (line 92) | Expression_Ptr fallback(U x) { return fallback_impl(x); }
FILE: src/libsass/src/expand.cpp
type Sass (line 14) | namespace Sass {
function Env (line 42) | Env* Expand::environment()
function Selector_List_Obj (line 49) | Selector_List_Obj Expand::selector()
function Block_Ptr (line 57) | Block_Ptr Expand::operator()(Block_Ptr b)
function Statement_Ptr (line 80) | Statement_Ptr Expand::operator()(Ruleset_Ptr r)
function Statement_Ptr (line 160) | Statement_Ptr Expand::operator()(Supports_Block_Ptr f)
function Statement_Ptr (line 170) | Statement_Ptr Expand::operator()(Media_Block_Ptr m)
function Statement_Ptr (line 197) | Statement_Ptr Expand::operator()(At_Root_Block_Ptr a)
function Statement_Ptr (line 218) | Statement_Ptr Expand::operator()(Directive_Ptr a)
function Statement_Ptr (line 238) | Statement_Ptr Expand::operator()(Declaration_Ptr d)
function Statement_Ptr (line 266) | Statement_Ptr Expand::operator()(Assignment_Ptr a)
function Statement_Ptr (line 327) | Statement_Ptr Expand::operator()(Import_Ptr imp)
function Statement_Ptr (line 342) | Statement_Ptr Expand::operator()(Import_Stub_Ptr i)
function Statement_Ptr (line 372) | Statement_Ptr Expand::operator()(Warning_Ptr w)
function Statement_Ptr (line 379) | Statement_Ptr Expand::operator()(Error_Ptr e)
function Statement_Ptr (line 386) | Statement_Ptr Expand::operator()(Debug_Ptr d)
function Statement_Ptr (line 393) | Statement_Ptr Expand::operator()(Comment_Ptr c)
function Statement_Ptr (line 407) | Statement_Ptr Expand::operator()(If_Ptr i)
function Statement_Ptr (line 427) | Statement_Ptr Expand::operator()(For_Ptr f)
function Statement_Ptr (line 482) | Statement_Ptr Expand::operator()(Each_Ptr e)
function Statement_Ptr (line 566) | Statement_Ptr Expand::operator()(While_Ptr w)
function Statement_Ptr (line 583) | Statement_Ptr Expand::operator()(Return_Ptr r)
function Statement (line 641) | Statement* Expand::operator()(Extension_Ptr e)
function Statement_Ptr (line 672) | Statement_Ptr Expand::operator()(Definition_Ptr d)
function Statement_Ptr (line 697) | Statement_Ptr Expand::operator()(Mixin_Call_Ptr c)
function Statement_Ptr (line 772) | Statement_Ptr Expand::operator()(Content_Ptr c)
function Statement_Ptr (line 797) | inline Statement_Ptr Expand::fallback_impl(AST_Node_Ptr n)
FILE: src/libsass/src/expand.hpp
type Sass (line 11) | namespace Sass {
class Listize (line 13) | class Listize
class Context (line 14) | class Context
class Eval (line 15) | class Eval
type Backtrace (line 16) | struct Backtrace
class Expand (line 18) | class Expand : public Operation_CRTP<Statement_Ptr, Expand> {
method Statement_Ptr (line 75) | Statement_Ptr fallback(U x) { return fallback_impl(x); }
FILE: src/libsass/src/extend.cpp
type Sass (line 62) | namespace Sass {
function printSimpleSelector (line 96) | static void printSimpleSelector(Simple_Selector* pSimpleSelector, cons...
function printCompoundSelector (line 114) | static void printCompoundSelector(Compound_Selector_Ptr pCompoundSelec...
function printComplexSelector (line 166) | static void printComplexSelector(Complex_Selector_Ptr pComplexSelector...
function printSelsNewSeqPairCollection (line 183) | static void printSelsNewSeqPairCollection(SubSetMapLookups& collection...
function printSourcesSet (line 210) | static void printSourcesSet(ComplexSelectorSet& sources, const char* m...
function parentSuperselector (line 283) | static bool parentSuperselector(Complex_Selector_Ptr pOne, Complex_Sel...
function nodeToComplexSelectorDeque (line 302) | void nodeToComplexSelectorDeque(const Node& node, ComplexSelectorDeque...
function Node (line 309) | Node complexSelectorDequeToNode(const ComplexSelectorDeque& deque) {
class LcsCollectionComparator (line 320) | class LcsCollectionComparator {
method LcsCollectionComparator (line 322) | LcsCollectionComparator() {}
function lcs_backtrace (line 365) | void lcs_backtrace(const LCSTable& c, ComplexSelectorDeque& x, Complex...
function lcs_table (line 400) | void lcs_table(const ComplexSelectorDeque& x, const ComplexSelectorDeq...
function lcs (line 439) | void lcs(ComplexSelectorDeque& x, ComplexSelectorDeque& y, const LcsCo...
function Node (line 519) | Node Extend::trim(Node& seqses, bool isReplace) {
function parentSuperselector (line 643) | static bool parentSuperselector(const Node& one, const Node& two) {
class ParentSuperselectorChunker (line 660) | class ParentSuperselectorChunker {
method ParentSuperselectorChunker (line 662) | ParentSuperselectorChunker(Node& lcs) : mLcs(lcs) {}
class SubweaveEmptyChunker (line 672) | class SubweaveEmptyChunker {
function Node (line 714) | static Node chunks(Node& seq1, Node& seq2, const ChunkerType& chunker) {
function Node (line 764) | static Node groupSelectors(Node& seq) {
function getAndRemoveInitialOps (line 785) | static void getAndRemoveInitialOps(Node& seq, Node& ops) {
function getAndRemoveFinalOps (line 796) | static void getAndRemoveFinalOps(Node& seq, Node& ops) {
function Node (line 824) | static Node mergeInitialOps(Node& seq1, Node& seq2) {
function Node (line 915) | static Node mergeFinalOps(Node& seq1, Node& seq2, Node& res) {
function Node (line 1176) | Node subweave(Node& one, Node& two) {
function Node (line 1437) | Node Extend::weave(Node& path) {
class GroupByToAFunctor (line 1513) | class GroupByToAFunctor {
method KeyType (line 1515) | KeyType operator()(SubSetMapPair& extPair) const {
function Node (line 1520) | Node Extend::extendCompoundSelector(Compound_Selector_Ptr pSelector, C...
function Node (line 1744) | Node Extend::extendComplexSelector(Complex_Selector_Ptr selector, Comp...
function Selector_List_Ptr (line 1871) | Selector_List_Ptr Extend::extendSelectorList(Selector_List_Obj pSelect...
function shouldExtendBlock (line 2006) | bool shouldExtendBlock(Block_Obj b) {
FILE: src/libsass/src/extend.hpp
type Sass (line 14) | namespace Sass {
class Extend (line 18) | class Extend : public Operation_CRTP<void, Extend> {
method fallback_impl (line 23) | void fallback_impl(AST_Node_Ptr n) { }
method Selector_List_Ptr (line 61) | Selector_List_Ptr extendSelectorList(Selector_List_Obj pSelectorList...
method Selector_List_Ptr (line 66) | Selector_List_Ptr extendSelectorList(Selector_List_Obj pSelectorList...
method fallback (line 81) | void fallback(U x) { return fallback_impl(x); }
FILE: src/libsass/src/file.cpp
function wstring_to_string (line 31) | inline static std::string wstring_to_string(const std::wstring& wstr)
function wstring_to_string (line 37) | inline static std::string wstring_to_string(const std::wstring &wstr)
type Sass (line 47) | namespace Sass {
type File (line 48) | namespace File {
function get_cwd (line 53) | std::string get_cwd()
function file_exists (line 76) | bool file_exists(const std::string& path)
function is_absolute_path (line 99) | bool is_absolute_path(const std::string& path)
function find_last_folder_separator (line 115) | inline size_t find_last_folder_separator(const std::string& path, si...
function dir_name (line 137) | std::string dir_name(const std::string& path)
function base_name (line 145) | std::string base_name(const std::string& path)
function make_canonical_path (line 154) | std::string make_canonical_path (std::string path)
function join_paths (line 194) | std::string join_paths(std::string l, std::string r)
function path_for_console (line 228) | std::string path_for_console(const std::string& rel_path, const std:...
function rel2abs (line 241) | std::string rel2abs(const std::string& path, const std::string& base...
function abs2rel (line 248) | std::string abs2rel(const std::string& path, const std::string& base...
function resolve_includes (line 326) | std::vector<Include> resolve_includes(const std::string& root, const...
function find_files (line 357) | std::vector<std::string> find_files(const std::string& file, const s...
function find_files (line 367) | std::vector<std::string> find_files(const std::string& file, struct ...
function find_file (line 383) | std::string find_file(const std::string& file, const std::vector<std...
function find_include (line 391) | std::string find_include(const std::string& file, const std::vector<...
type stat (line 433) | struct stat
function split_path_list (line 465) | std::vector<std::string> split_path_list(const char* str)
FILE: src/libsass/src/file.hpp
type Sass (line 10) | namespace Sass {
type File (line 12) | namespace File {
type Sass_Compiler (line 52) | struct Sass_Compiler
class Importer (line 70) | class Importer {
method Importer (line 80) | Importer(std::string imp_path, std::string ctx_path)
class Include (line 88) | class Include : public Importer {
method Include (line 93) | Include(const Importer& imp, std::string abs_path)
class Resource (line 99) | class Resource {
method Resource (line 106) | Resource(char* contents, char* srcmap)
class StyleSheet (line 112) | class StyleSheet : public Resource {
method StyleSheet (line 117) | StyleSheet(const Resource& res, Block_Obj root)
type File (line 122) | namespace File {
type Sass_Compiler (line 52) | struct Sass_Compiler
FILE: src/libsass/src/functions.cpp
type Sass (line 55) | namespace Sass {
function Definition_Ptr (line 59) | Definition_Ptr make_native_function(Signature sig, Native_Function fun...
function Definition_Ptr (line 74) | Definition_Ptr make_c_function(Sass_Function_Entry c_func, Context& ctx)
function function_name (line 97) | std::string function_name(Signature sig)
type Functions (line 103) | namespace Functions {
function handle_utf8_error (line 105) | inline void handle_utf8_error (const ParserState& pstate, Backtraces...
function T (line 126) | T* get_arg(const std::string& argname, Env& env, Signature sig, Pars...
function Map_Ptr (line 142) | Map_Ptr get_arg_m(const std::string& argname, Env& env, Signature si...
function get_arg_r (line 156) | double get_arg_r(const std::string& argname, Env& env, Signature sig...
function Number_Ptr (line 172) | Number_Ptr get_arg_n(const std::string& argname, Env& env, Signature...
function get_arg_v (line 181) | double get_arg_v(const std::string& argname, Env& env, Signature sig...
function get_arg_val (line 198) | double get_arg_val(const std::string& argname, Env& env, Signature s...
function color_num (line 207) | double color_num(const std::string& argname, Env& env, Signature sig...
function alpha_num (line 220) | inline double alpha_num(const std::string& argname, Env& env, Signat...
function Selector_List_Obj (line 237) | Selector_List_Obj get_arg_sel(const std::string& argname, Env& env, ...
function Compound_Selector_Obj (line 253) | Compound_Selector_Obj get_arg_sel(const std::string& argname, Env& e...
function GetSeed (line 272) | uint64_t GetSeed()
function GetSeed (line 286) | uint64_t GetSeed()
function special_number (line 312) | inline bool special_number(String_Constant_Ptr s) {
function BUILT_IN (line 324) | BUILT_IN(rgb)
function BUILT_IN (line 349) | BUILT_IN(rgba_4)
function BUILT_IN (line 378) | BUILT_IN(rgba_2)
function BUILT_IN (line 413) | BUILT_IN(red)
function BUILT_IN (line 417) | BUILT_IN(green)
function BUILT_IN (line 421) | BUILT_IN(blue)
function Color (line 424) | Color* colormix(Context& ctx, ParserState& pstate, Color* color1, Co...
function BUILT_IN (line 441) | BUILT_IN(mix)
type HSL (line 455) | struct HSL { double h; double s; double l; }
function HSL (line 456) | HSL rgb_to_hsl(double r, double g, double b)
function h_to_rgb (line 491) | double h_to_rgb(double m1, double m2, double h) {
function Color_Ptr (line 500) | Color_Ptr hsla_impl(double h, double s, double l, double a, Context&...
function BUILT_IN (line 533) | BUILT_IN(hsl)
function BUILT_IN (line 559) | BUILT_IN(hsla)
function BUILT_IN (line 588) | BUILT_IN(hue)
function BUILT_IN (line 598) | BUILT_IN(saturation)
function BUILT_IN (line 608) | BUILT_IN(lightness)
function BUILT_IN (line 618) | BUILT_IN(adjust_hue)
function BUILT_IN (line 634) | BUILT_IN(lighten)
function BUILT_IN (line 656) | BUILT_IN(darken)
function BUILT_IN (line 679) | BUILT_IN(saturate)
function BUILT_IN (line 711) | BUILT_IN(desaturate)
function BUILT_IN (line 738) | BUILT_IN(grayscale)
function BUILT_IN (line 759) | BUILT_IN(complement)
function BUILT_IN (line 774) | BUILT_IN(invert)
function BUILT_IN (line 798) | BUILT_IN(alpha)
function BUILT_IN (line 816) | BUILT_IN(opacify)
function BUILT_IN (line 831) | BUILT_IN(transparentize)
function BUILT_IN (line 849) | BUILT_IN(adjust_color)
function BUILT_IN (line 904) | BUILT_IN(scale_color)
function BUILT_IN (line 960) | BUILT_IN(change_color)
function cap_channel (line 1008) | static double cap_channel(double c) {
function BUILT_IN (line 1015) | BUILT_IN(ie_hex_str)
function BUILT_IN (line 1042) | BUILT_IN(sass_unquote)
function BUILT_IN (line 1068) | BUILT_IN(sass_quote)
function BUILT_IN (line 1085) | BUILT_IN(str_length)
function BUILT_IN (line 1101) | BUILT_IN(str_insert)
function BUILT_IN (line 1146) | BUILT_IN(str_index)
function BUILT_IN (line 1171) | BUILT_IN(str_slice)
function BUILT_IN (line 1223) | BUILT_IN(to_upper_case)
function BUILT_IN (line 1244) | BUILT_IN(to_lower_case)
function BUILT_IN (line 1269) | BUILT_IN(percentage)
function BUILT_IN (line 1277) | BUILT_IN(round)
function BUILT_IN (line 1286) | BUILT_IN(ceil)
function BUILT_IN (line 1295) | BUILT_IN(floor)
function BUILT_IN (line 1304) | BUILT_IN(abs)
function BUILT_IN (line 1313) | BUILT_IN(min)
function BUILT_IN (line 1331) | BUILT_IN(max)
function BUILT_IN (line 1349) | BUILT_IN(random)
function BUILT_IN (line 1390) | BUILT_IN(length)
function BUILT_IN (line 1417) | BUILT_IN(nth)
function BUILT_IN (line 1458) | BUILT_IN(set_nth)
function BUILT_IN (line 1482) | BUILT_IN(index)
function BUILT_IN (line 1501) | BUILT_IN(join)
function BUILT_IN (line 1545) | BUILT_IN(append)
function BUILT_IN (line 1584) | BUILT_IN(zip)
function BUILT_IN (line 1620) | BUILT_IN(list_separator)
function BUILT_IN (line 1637) | BUILT_IN(map_get)
function BUILT_IN (line 1655) | BUILT_IN(map_has_key)
function BUILT_IN (line 1663) | BUILT_IN(map_keys)
function BUILT_IN (line 1674) | BUILT_IN(map_values)
function BUILT_IN (line 1685) | BUILT_IN(map_merge)
function BUILT_IN (line 1699) | BUILT_IN(map_remove)
function BUILT_IN (line 1716) | BUILT_IN(keywords)
function BUILT_IN (line 1737) | BUILT_IN(type_of)
function BUILT_IN (line 1744) | BUILT_IN(unit)
function BUILT_IN (line 1752) | BUILT_IN(unitless)
function BUILT_IN (line 1760) | BUILT_IN(comparable)
function BUILT_IN (line 1775) | BUILT_IN(variable_exists)
function BUILT_IN (line 1788) | BUILT_IN(global_variable_exists)
function BUILT_IN (line 1801) | BUILT_IN(function_exists)
function BUILT_IN (line 1819) | BUILT_IN(mixin_exists)
function BUILT_IN (line 1832) | BUILT_IN(feature_exists)
function BUILT_IN (line 1845) | BUILT_IN(call)
function BUILT_IN (line 1900) | BUILT_IN(sass_not)
function BUILT_IN (line 1908) | BUILT_IN(sass_if)
function BUILT_IN (line 1927) | BUILT_IN(inspect)
function BUILT_IN (line 1951) | BUILT_IN(selector_nest)
function BUILT_IN (line 2004) | BUILT_IN(selector_append)
function BUILT_IN (line 2098) | BUILT_IN(selector_unify)
function BUILT_IN (line 2109) | BUILT_IN(simple_selectors)
function BUILT_IN (line 2126) | BUILT_IN(selector_extend)
function BUILT_IN (line 2143) | BUILT_IN(selector_replace)
function BUILT_IN (line 2159) | BUILT_IN(selector_parse)
function BUILT_IN (line 2168) | BUILT_IN(is_superselector)
function BUILT_IN (line 2177) | BUILT_IN(unique_id)
function BUILT_IN (line 2187) | BUILT_IN(is_bracketed)
function BUILT_IN (line 2195) | BUILT_IN(content_exists)
function BUILT_IN (line 2204) | BUILT_IN(get_function)
FILE: src/libsass/src/functions.hpp
type Sass (line 13) | namespace Sass {
type Backtrace (line 14) | struct Backtrace
type Functions (line 23) | namespace Functions {
FILE: src/libsass/src/inspect.cpp
type Sass (line 16) | namespace Sass {
function cap_channel (line 617) | static double cap_channel(double c) {
FILE: src/libsass/src/inspect.hpp
type Sass (line 8) | namespace Sass {
class Context (line 9) | class Context
class Inspect (line 11) | class Inspect : public Operation_CRTP<void, Inspect>, public Emitter {
FILE: src/libsass/src/json.cpp
function sb_init (line 73) | static void sb_init(SB *sb)
function sb_grow (line 88) | static void sb_grow(SB *sb, int need)
function sb_put (line 104) | static void sb_put(SB *sb, const char *bytes, int count)
function sb_puts (line 117) | static void sb_puts(SB *sb, const char *str)
function sb_free (line 129) | static void sb_free(SB *sb)
function utf8_validate_cz (line 165) | static int utf8_validate_cz(const char *s)
function utf8_validate (line 220) | static bool utf8_validate(const char *s)
function utf8_read_char (line 240) | static int utf8_read_char(const char *s, uint32_t *out)
function utf8_write_char (line 279) | static int utf8_write_char(uint32_t unicode, char *out)
function from_surrogate_pair (line 316) | static bool from_surrogate_pair(uint16_t uc, uint16_t lc, uint32_t *unic...
function to_surrogate_pair (line 331) | static void to_surrogate_pair(uint32_t unicode, uint16_t *uc, uint16_t *lc)
function JsonNode (line 374) | JsonNode *json_decode(const char *json)
function json_delete (line 432) | void json_delete(JsonNode *node)
function json_validate (line 458) | bool json_validate(const char *json)
function JsonNode (line 473) | JsonNode *json_find_element(JsonNode *array, int index)
function JsonNode (line 490) | JsonNode *json_find_member(JsonNode *object, const char *name)
function JsonNode (line 504) | JsonNode *json_first_child(const JsonNode *node)
function JsonNode (line 511) | static JsonNode *mknode(JsonTag tag)
function JsonNode (line 520) | JsonNode *json_mknull(void)
function JsonNode (line 525) | JsonNode *json_mkbool(bool b)
function JsonNode (line 532) | static JsonNode *mkstring(char *s)
function JsonNode (line 539) | JsonNode *json_mkstring(const char *s)
function JsonNode (line 544) | JsonNode *json_mknumber(double n)
function JsonNode (line 551) | JsonNode *json_mkarray(void)
function JsonNode (line 556) | JsonNode *json_mkobject(void)
function append_node (line 561) | static void append_node(JsonNode *parent, JsonNode *child)
function prepend_node (line 576) | static void prepend_node(JsonNode *parent, JsonNode *child)
function append_member (line 591) | static void append_member(JsonNode *object, char *key, JsonNode *value)
function json_append_element (line 599) | void json_append_element(JsonNode *array, JsonNode *element)
function json_prepend_element (line 609) | void json_prepend_element(JsonNode *array, JsonNode *element)
function json_append_member (line 617) | void json_append_member(JsonNode *object, const char *key, JsonNode *value)
function json_prepend_member (line 627) | void json_prepend_member(JsonNode *object, const char *key, JsonNode *va...
function json_remove_from_parent (line 638) | void json_remove_from_parent(JsonNode *node)
function parse_value (line 663) | static bool parse_value(const char **sp, JsonNode **out)
function parse_array (line 733) | static bool parse_array(const char **sp, JsonNode **out)
function parse_object (line 777) | static bool parse_object(const char **sp, JsonNode **out)
function parse_string (line 833) | bool parse_string(const char **sp, char **out)
function is_space (line 948) | bool is_space(const char *c) {
function is_digit (line 952) | bool is_digit(const char *c){
function parse_number (line 966) | bool parse_number(const char **sp, double *out)
function skip_space (line 1014) | static void skip_space(const char **sp)
function emit_value (line 1022) | static void emit_value(SB *out, const JsonNode *node)
function emit_value_indented (line 1049) | void emit_value_indented(SB *out, const JsonNode *node, const char *spac...
function emit_array (line 1076) | static void emit_array(SB *out, const JsonNode *array)
function emit_array_indented (line 1089) | static void emit_array_indented(SB *out, const JsonNode *array, const ch...
function emit_object (line 1113) | static void emit_object(SB *out, const JsonNode *object)
function emit_object_indented (line 1128) | static void emit_object_indented(SB *out, const JsonNode *object, const ...
function emit_string (line 1154) | void emit_string(SB *out, const char *str)
function emit_number (line 1280) | static void emit_number(SB *out, double num)
function tag_is_valid (line 1297) | static bool tag_is_valid(unsigned int tag)
function number_is_valid (line 1302) | static bool number_is_valid(const char *num)
function expect_literal (line 1307) | static bool expect_literal(const char **sp, const char *str)
function parse_hex16 (line 1323) | static bool parse_hex16(const char **sp, uint16_t *out)
function write_hex16 (line 1356) | static int write_hex16(char *out, uint16_t val)
function json_check (line 1368) | bool json_check(const JsonNode *node, char errmsg[256])
FILE: src/libsass/src/json.hpp
type JsonNode (line 39) | struct JsonNode
type JsonNode (line 41) | struct JsonNode
FILE: src/libsass/src/lexer.cpp
type Sass (line 9) | namespace Sass {
type Prelexer (line 12) | namespace Prelexer {
function is_alpha (line 34) | bool is_alpha(const char& chr)
function is_space (line 40) | bool is_space(const char& chr)
function is_digit (line 46) | bool is_digit(const char& chr)
function is_number (line 52) | bool is_number(const char& chr)
function is_xdigit (line 58) | bool is_xdigit(const char& chr)
function is_punct (line 66) | bool is_punct(const char& chr)
function is_alnum (line 72) | bool is_alnum(const char& chr)
function is_unicode (line 78) | bool is_unicode(const char& chr)
function is_nonascii (line 86) | bool is_nonascii(const char& chr)
function is_uri_character (line 98) | bool is_uri_character(const char& chr)
function is_escapable_character (line 107) | bool is_escapable_character(const char& chr)
function is_character (line 114) | bool is_character(const char& chr)
FILE: src/libsass/src/lexer.hpp
type Sass (line 6) | namespace Sass {
type Prelexer (line 7) | namespace Prelexer {
FILE: src/libsass/src/listize.cpp
type Sass (line 11) | namespace Sass {
function Expression_Ptr (line 16) | Expression_Ptr Listize::operator()(Selector_List_Ptr sel)
function Expression_Ptr (line 28) | Expression_Ptr Listize::operator()(Compound_Selector_Ptr sel)
function Expression_Ptr (line 38) | Expression_Ptr Listize::operator()(Complex_Selector_Ptr sel)
function Expression_Ptr (line 81) | Expression_Ptr Listize::fallback_impl(AST_Node_Ptr n)
FILE: src/libsass/src/listize.hpp
type Sass (line 12) | namespace Sass {
type Backtrace (line 14) | struct Backtrace
class Listize (line 16) | class Listize : public Operation_CRTP<Expression_Ptr, Listize> {
method Expression_Ptr (line 29) | Expression_Ptr fallback(U x) { return fallback_impl(x); }
FILE: src/libsass/src/mapping.hpp
type Sass (line 6) | namespace Sass {
type Mapping (line 8) | struct Mapping {
method Mapping (line 12) | Mapping(const Position& original_position, const Position& generated...
FILE: src/libsass/src/memory/SharedPtr.cpp
type Sass (line 12) | namespace Sass {
function SharedPtr (line 96) | SharedPtr& SharedPtr::operator=(const SharedPtr& rhs) {
FILE: src/libsass/src/memory/SharedPtr.hpp
type Sass (line 8) | namespace Sass {
class SharedPtr (line 10) | class SharedPtr
method SharedPtr (line 96) | SharedPtr()
method SharedObj (line 111) | SharedObj* obj () const {
method SharedObj (line 114) | SharedObj* operator-> () const {
method isNull (line 117) | bool isNull () {
method isNull (line 120) | bool isNull () const {
method SharedObj (line 123) | SharedObj* detach() const {
class SharedObj (line 41) | class SharedObj {
method SharedObj (line 60) | SharedObj* trace(std::string file, size_t line) {
method getDbgFile (line 68) | std::string getDbgFile() {
method getDbgLine (line 71) | size_t getDbgLine() {
method setDbg (line 74) | void setDbg(bool dbg) {
method setTaint (line 78) | static void setTaint(bool val) {
method getRefCount (line 82) | long getRefCount() {
class SharedPtr (line 88) | class SharedPtr {
method SharedPtr (line 96) | SharedPtr()
method SharedObj (line 111) | SharedObj* obj () const {
method SharedObj (line 114) | SharedObj* operator-> () const {
method isNull (line 117) | bool isNull () {
method isNull (line 120) | bool isNull () const {
method SharedObj (line 123) | SharedObj* detach() const {
class SharedImpl (line 136) | class SharedImpl : private SharedPtr {
method SharedImpl (line 138) | SharedImpl()
method SharedImpl (line 140) | SharedImpl(T* node)
method SharedImpl (line 143) | SharedImpl(SharedImpl<U> obj)
method SharedImpl (line 145) | SharedImpl(T&& node)
method SharedImpl (line 147) | SharedImpl(const T& node)
method SharedImpl (line 150) | SharedImpl(const SharedImpl<T>& impl)
method SharedImpl (line 153) | SharedImpl(SharedImpl<T>&& impl)
method T (line 180) | T& operator* () const {
method T (line 183) | T* operator-> () const {
method T (line 186) | T* ptr () const {
method T (line 189) | T* detach() const {
method isNull (line 193) | bool isNull() const {
FILE: src/libsass/src/node.cpp
type Sass (line 8) | namespace Sass {
function Node (line 11) | Node Node::createCombinator(const Complex_Selector::Combinator& combin...
function Node (line 17) | Node Node::createSelector(const Complex_Selector& pSelector) {
function Node (line 30) | Node Node::createCollection() {
function Node (line 36) | Node Node::createCollection(const NodeDeque& values) {
function Node (line 42) | Node Node::createNil() {
function Node (line 53) | Node Node::klone() const {
function Node (line 175) | Node complexSelectorToNode(Complex_Selector_Ptr pToConvert) {
function Complex_Selector_Ptr (line 223) | Complex_Selector_Ptr nodeToComplexSelector(const Node& toConvert) {
function Node (line 284) | Node Node::naiveTrim(Node& seqses) {
FILE: src/libsass/src/node.hpp
type Sass (line 10) | namespace Sass {
class Context (line 15) | class Context
class Node (line 33) | class Node
type TYPE (line 39) | enum TYPE {
method TYPE (line 46) | TYPE type() const { return mType; }
method isCombinator (line 47) | bool isCombinator() const { return mType == COMBINATOR; }
method isSelector (line 48) | bool isSelector() const { return mType == SELECTOR; }
method isCollection (line 49) | bool isCollection() const { return mType == COLLECTION; }
method isNil (line 50) | bool isNil() const { return mType == NIL; }
method combinator (line 53) | Complex_Selector::Combinator combinator() const { return mCombinator; }
method Complex_Selector_Obj (line 55) | Complex_Selector_Obj selector() { return mpSelector; }
method Complex_Selector_Obj (line 56) | Complex_Selector_Obj selector() const { return mpSelector; }
method NodeDequePtr (line 58) | NodeDequePtr collection() { return mpCollection; }
method NodeDequePtr (line 59) | const NodeDequePtr collection() const { return mpCollection; }
class Node (line 37) | class Node {
type TYPE (line 39) | enum TYPE {
method TYPE (line 46) | TYPE type() const { return mType; }
method isCombinator (line 47) | bool isCombinator() const { return mType == COMBINATOR; }
method isSelector (line 48) | bool isSelector() const { return mType == SELECTOR; }
method isCollection (line 49) | bool isCollection() const { return mType == COLLECTION; }
method isNil (line 50) | bool isNil() const { return mType == NIL; }
method combinator (line 53) | Complex_Selector::Combinator combinator() const { return mCombinator; }
method Complex_Selector_Obj (line 55) | Complex_Selector_Obj selector() { return mpSelector; }
method Complex_Selector_Obj (line 56) | Complex_Selector_Obj selector() const { return mpSelector; }
method NodeDequePtr (line 58) | NodeDequePtr collection() { return mpCollection; }
method NodeDequePtr (line 59) | const NodeDequePtr collection() const { return mpCollection; }
FILE: src/libsass/src/operation.hpp
type Sass (line 6) | namespace Sass {
class Operation (line 9) | class Operation {
method T (line 86) | T fallback(U x) { return T(); }
class Operation_CRTP (line 90) | class Operation_CRTP : public Operation<T> {
method D (line 92) | D& impl() { return static_cast<D&>(*this); }
method T (line 94) | T operator()(AST_Node_Ptr x) { return static_cast<D*>(...
method T (line 96) | T operator()(Block_Ptr x) { return static_cast<D*>(...
method T (line 97) | T operator()(Ruleset_Ptr x) { return static_cast<D*>(...
method T (line 98) | T operator()(Bubble_Ptr x) { return static_cast<D*>(...
method T (line 99) | T operator()(Trace_Ptr x) { return static_cast<D*>(...
method T (line 100) | T operator()(Supports_Block_Ptr x) { return static_cast<D*>(...
method T (line 101) | T operator()(Media_Block_Ptr x) { return static_cast<D*>(...
method T (line 102) | T operator()(At_Root_Block_Ptr x) { return static_cast<D*>(...
method T (line 103) | T operator()(Directive_Ptr x) { return static_cast<D*>(...
method T (line 104) | T operator()(Keyframe_Rule_Ptr x) { return static_cast<D*>(...
method T (line 105) | T operator()(Declaration_Ptr x) { return static_cast<D*>(...
method T (line 106) | T operator()(Assignment_Ptr x) { return static_cast<D*>(...
method T (line 107) | T operator()(Import_Ptr x) { return static_cast<D*>(...
method T (line 108) | T operator()(Import_Stub_Ptr x) { return static_cast<D*>(...
method T (line 109) | T operator()(Warning_Ptr x) { return static_cast<D*>(...
method T (line 110) | T operator()(Error_Ptr x) { return static_cast<D*>(...
method T (line 111) | T operator()(Debug_Ptr x) { return static_cast<D*>(...
method T (line 112) | T operator()(Comment_Ptr x) { return static_cast<D*>(...
method T (line 113) | T operator()(If_Ptr x) { return static_cast<D*>(...
method T (line 114) | T operator()(For_Ptr x) { return static_cast<D*>(...
method T (line 115) | T operator()(Each_Ptr x) { return static_cast<D*>(...
method T (line 116) | T operator()(While_Ptr x) { return static_cast<D*>(...
method T (line 117) | T operator()(Return_Ptr x) { return static_cast<D*>(...
method T (line 118) | T operator()(Content_Ptr x) { return static_cast<D*>(...
method T (line 119) | T operator()(Extension_Ptr x) { return static_cast<D*>(...
method T (line 120) | T operator()(Definition_Ptr x) { return static_cast<D*>(...
method T (line 121) | T operator()(Mixin_Call_Ptr x) { return static_cast<D*>(...
method T (line 123) | T operator()(List_Ptr x) { return static_cast<D*>(...
method T (line 124) | T operator()(Map_Ptr x) { return static_cast<D*>(...
method T (line 125) | T operator()(Function_Ptr x) { return static_cast<D*>(...
method T (line 126) | T operator()(Binary_Expression_Ptr x) { return static_cast<D*>(...
method T (line 127) | T operator()(Unary_Expression_Ptr x) { return static_cast<D*>(...
method T (line 128) | T operator()(Function_Call_Ptr x) { return static_cast<D*>(...
method T (line 129) | T operator()(Function_Call_Schema_Ptr x) { return static_cast<D*>(...
method T (line 130) | T operator()(Custom_Warning_Ptr x) { return static_cast<D*>(...
method T (line 131) | T operator()(Custom_Error_Ptr x) { return static_cast<D*>(...
method T (line 132) | T operator()(Variable_Ptr x) { return static_cast<D*>(...
method T (line 133) | T operator()(Number_Ptr x) { return static_cast<D*>(...
method T (line 134) | T operator()(Color_Ptr x) { return static_cast<D*>(...
method T (line 135) | T operator()(Boolean_Ptr x) { return static_cast<D*>(...
method T (line 136) | T operator()(String_Schema_Ptr x) { return static_cast<D*>(...
method T (line 137) | T operator()(String_Constant_Ptr x) { return static_cast<D*>(...
method T (line 138) | T operator()(String_Quoted_Ptr x) { return static_cast<D*>(...
method T (line 139) | T operator()(Supports_Condition_Ptr x) { return static_cast<D*>(...
method T (line 140) | T operator()(Supports_Operator_Ptr x) { return static_cast<D*>(...
method T (line 141) | T operator()(Supports_Negation_Ptr x) { return static_cast<D*>(...
method T (line 142) | T operator()(Supports_Declaration_Ptr x) { return static_cast<D*>(...
method T (line 143) | T operator()(Supports_Interpolation_Ptr x) { return static_cast<D*>(...
method T (line 144) | T operator()(Media_Query_Ptr x) { return static_cast<D*>(...
method T (line 145) | T operator()(Media_Query_Expression_Ptr x) { return static_cast<D*>(...
method T (line 146) | T operator()(At_Root_Query_Ptr x) { return static_cast<D*>(...
method T (line 147) | T operator()(Null_Ptr x) { return static_cast<D*>(...
method T (line 148) | T operator()(Parent_Selector_Ptr x) { return static_cast<D*>(...
method T (line 150) | T operator()(Parameter_Ptr x) { return static_cast<D*>(...
method T (line 151) | T operator()(Parameters_Ptr x) { return static_cast<D*>(...
method T (line 152) | T operator()(Argument_Ptr x) { return static_cast<D*>(...
method T (line 153) | T operator()(Arguments_Ptr x) { return static_cast<D*>(...
method T (line 155) | T operator()(Selector_Schema_Ptr x) { return static_cast<D*>(...
method T (line 156) | T operator()(Placeholder_Selector_Ptr x) { return static_cast<D*>(...
method T (line 157) | T operator()(Element_Selector_Ptr x) { return static_cast<D*>(...
method T (line 158) | T operator()(Class_Selector_Ptr x) { return static_cast<D*>(...
method T (line 159) | T operator()(Id_Selector_Ptr x) { return static_cast<D*>(...
method T (line 160) | T operator()(Attribute_Selector_Ptr x) { return static_cast<D*>(...
method T (line 161) | T operator()(Pseudo_Selector_Ptr x) { return static_cast<D*>(...
method T (line 162) | T operator()(Wrapped_Selector_Ptr x) { return static_cast<D*>(...
method T (line 163) | T operator()(Compound_Selector_Ptr x){ return static_cast<D*>(this)-...
method T (line 164) | T operator()(Complex_Selector_Ptr x) { return static_cast<D*>(t...
method T (line 165) | T operator()(Selector_List_Ptr x) { return static_cast<D*>(this)->fa...
method T (line 168) | T fallback(U x) { return T(); }
FILE: src/libsass/src/operators.cpp
type Sass (line 4) | namespace Sass {
type Operators (line 6) | namespace Operators {
function add (line 8) | inline double add(double x, double y) { return x + y; }
function sub (line 9) | inline double sub(double x, double y) { return x - y; }
function mul (line 10) | inline double mul(double x, double y) { return x * y; }
function div (line 11) | inline double div(double x, double y) { return x / y; }
function mod (line 13) | inline double mod(double x, double y) { // x/0 checked by caller
function eq (line 30) | bool eq(Expression_Obj lhs, Expression_Obj rhs)
function cmp (line 39) | bool cmp(Expression_Obj lhs, Expression_Obj rhs, const Sass_OP op)
function lt (line 51) | bool lt(Expression_Obj lhs, Expression_Obj rhs) { return cmp(lhs, rh...
function neq (line 52) | bool neq(Expression_Obj lhs, Expression_Obj rhs) { return eq(lhs, rh...
function gt (line 53) | bool gt(Expression_Obj lhs, Expression_Obj rhs) { return !cmp(lhs, r...
function lte (line 54) | bool lte(Expression_Obj lhs, Expression_Obj rhs) { return cmp(lhs, r...
function gte (line 55) | bool gte(Expression_Obj lhs, Expression_Obj rhs) { return !cmp(lhs, ...
function op_color_deprecation (line 58) | void op_color_deprecation(enum Sass_OP op, std::string lsh, std::str...
function Value_Ptr (line 74) | Value_Ptr op_strings(Sass::Operand operand, Value& lhs, Value& rhs, ...
function Value_Ptr (line 124) | Value_Ptr op_colors(enum Sass_OP op, const Color& lhs, const Color& ...
function Value_Ptr (line 145) | Value_Ptr op_numbers(enum Sass_OP op, const Number& lhs, const Numbe...
function Value_Ptr (line 215) | Value_Ptr op_number_color(enum Sass_OP op, const Number& lhs, const ...
function Value_Ptr (line 246) | Value_Ptr op_color_number(enum Sass_OP op, const Color& lhs, const N...
FILE: src/libsass/src/operators.hpp
type Sass (line 7) | namespace Sass {
type Operators (line 9) | namespace Operators {
type Sass_Inspect_Options (line 20) | struct Sass_Inspect_Options
type Sass_OP (line 21) | enum Sass_OP
type Sass_Inspect_Options (line 21) | struct Sass_Inspect_Options
type Sass_OP (line 22) | enum Sass_OP
type Sass_Inspect_Options (line 22) | struct Sass_Inspect_Options
type Sass_OP (line 23) | enum Sass_OP
type Sass_Inspect_Options (line 23) | struct Sass_Inspect_Options
type Sass_OP (line 24) | enum Sass_OP
type Sass_Inspect_Options (line 24) | struct Sass_Inspect_Options
FILE: src/libsass/src/output.cpp
type Sass (line 5) | namespace Sass {
function OutputBuffer (line 45) | OutputBuffer Output::get_buffer(void)
FILE: src/libsass/src/output.hpp
type Sass (line 11) | namespace Sass {
class Context (line 12) | class Context
function ends_with (line 15) | inline bool ends_with(std::string const & value, std::string const & e...
class Output (line 21) | class Output : public Inspect {
FILE: src/libsass/src/parser.cpp
type Sass (line 29) | namespace Sass {
function Parser (line 33) | Parser Parser::from_c_str(const char* beg, Context& ctx, Backtraces tr...
function Parser (line 47) | Parser Parser::from_c_str(const char* beg, const char* end, Context& c...
function Selector_List_Obj (line 69) | Selector_List_Obj Parser::parse_selector(const char* beg, Context& ctx...
function Parser (line 83) | Parser Parser::from_token(Token t, Context& ctx, Backtraces traces, Pa...
function Block_Obj (line 96) | Block_Obj Parser::parse()
function Block_Obj (line 140) | Block_Obj Parser::parse_css_block(bool is_root)
function Block_Obj (line 176) | Block_Obj Parser::parse_block(bool is_root)
function Import_Obj (line 328) | Import_Obj Parser::parse_import()
function Definition_Obj (line 385) | Definition_Obj Parser::parse_definition(Definition::Type which_type)
function Parameters_Obj (line 401) | Parameters_Obj Parser::parse_parameters()
function Parameter_Obj (line 419) | Parameter_Obj Parser::parse_parameter()
function Arguments_Obj (line 441) | Arguments_Obj Parser::parse_arguments()
function Argument_Obj (line 459) | Argument_Obj Parser::parse_argument()
function Assignment_Obj (line 494) | Assignment_Obj Parser::parse_assignment()
function Ruleset_Obj (line 519) | Ruleset_Obj Parser::parse_ruleset(Lookahead lookahead)
function Selector_Schema_Obj (line 552) | Selector_Schema_Obj Parser::parse_selector_schema(const char* end_of_s...
function Mixin_Call_Obj (line 641) | Mixin_Call_Obj Parser::parse_include_directive()
function Selector_List_Obj (line 662) | Selector_List_Obj Parser::parse_selector_list(bool chroot)
function Complex_Selector_Obj (line 718) | Complex_Selector_Obj Parser::parse_complex_selector(bool chroot)
function Compound_Selector_Obj (line 799) | Compound_Selector_Obj Parser::parse_compound_selector()
function Simple_Selector_Obj (line 865) | Simple_Selector_Obj Parser::parse_simple_selector()
function Wrapped_Selector_Obj (line 901) | Wrapped_Selector_Obj Parser::parse_negated_selector()
function Simple_Selector_Obj (line 916) | Simple_Selector_Obj Parser::parse_pseudo_selector() {
function Attribute_Selector_Obj (line 982) | Attribute_Selector_Obj Parser::parse_attribute_selector()
function Declaration_Obj (line 1035) | Declaration_Obj Parser::parse_declaration() {
function Expression_Obj (line 1106) | Expression_Obj Parser::parse_map()
function Expression_Obj (line 1150) | Expression_Obj Parser::parse_bracket_list()
function Expression_Obj (line 1197) | Expression_Obj Parser::parse_list(bool delayed)
function Expression_Obj (line 1204) | Expression_Obj Parser::parse_comma_list(bool delayed)
function Expression_Obj (line 1244) | Expression_Obj Parser::parse_space_list()
function Expression_Obj (line 1269) | Expression_Obj Parser::parse_disjunction()
function Expression_Obj (line 1291) | Expression_Obj Parser::parse_conjunction()
function Expression_Obj (line 1314) | Expression_Obj Parser::parse_relation()
function Expression_Obj (line 1367) | Expression_Obj Parser::parse_expression()
function Expression_Obj (line 1411) | Expression_Obj Parser::parse_operators()
function Expression_Obj (line 1444) | Expression_Obj Parser::parse_factor()
function number_has_zero (line 1527) | bool number_has_zero(const std::string& parsed)
function Number_Ptr (line 1536) | Number_Ptr Parser::lexed_number(const ParserState& pstate, const std::...
function Number_Ptr (line 1548) | Number_Ptr Parser::lexed_percentage(const ParserState& pstate, const s...
function Number_Ptr (line 1560) | Number_Ptr Parser::lexed_dimension(const ParserState& pstate, const st...
function Value_Ptr (line 1581) | Value_Ptr Parser::lexed_hex_color(const ParserState& pstate, const std...
function Value_Ptr (line 1644) | Value_Ptr Parser::color_or_string(const std::string& lexed) const
function Expression_Obj (line 1658) | Expression_Obj Parser::parse_value()
function String_Obj (line 1737) | String_Obj Parser::parse_interpolated_chunk(Token chunk, bool constant...
function String_Schema_Obj (line 1789) | String_Schema_Obj Parser::parse_css_variable_value(bool top_level)
function String_Schema_Obj (line 1805) | String_Schema_Obj Parser::parse_css_variable_value_token(bool top_level)
function Value_Obj (line 1856) | Value_Obj Parser::parse_static_value()
function String_Obj (line 1870) | String_Obj Parser::parse_string()
function String_Obj (line 1875) | String_Obj Parser::parse_ie_property()
function String_Obj (line 1919) | String_Obj Parser::parse_ie_keyword_arg()
function String_Schema_Obj (line 1940) | String_Schema_Obj Parser::parse_value_schema(const char* stop)
function String_Obj (line 2049) | String_Obj Parser::parse_identifier_schema()
function Function_Call_Obj (line 2101) | Function_Call_Obj Parser::parse_calc_function()
function String_Obj (line 2122) | String_Obj Parser::parse_url_function_string()
function String_Obj (line 2154) | String_Obj Parser::parse_url_function_argument()
function Function_Call_Obj (line 2181) | Function_Call_Obj Parser::parse_function_call()
function Function_Call_Schema_Obj (line 2194) | Function_Call_Schema_Obj Parser::parse_function_call_schema()
function Content_Obj (line 2203) | Content_Obj Parser::parse_content_directive()
function If_Obj (line 2208) | If_Obj Parser::parse_if_directive(bool else_if)
function For_Obj (line 2230) | For_Obj Parser::parse_for_directive()
function Token (line 2250) | Token Parser::lex_variable()
function Token (line 2265) | Token Parser::lex_identifier()
function Each_Obj (line 2275) | Each_Obj Parser::parse_each_directive()
function While_Obj (line 2295) | While_Obj Parser::parse_while_directive()
function Media_Block_Obj (line 2317) | Media_Block_Obj Parser::parse_media_block()
function List_Obj (line 2332) | List_Obj Parser::parse_media_queries()
function Media_Query_Obj (line 2343) | Media_Query_Obj Parser::parse_media_query()
function Media_Query_Expression_Obj (line 2369) | Media_Query_Expression_Obj Parser::parse_media_expression()
function Supports_Block_Obj (line 2395) | Supports_Block_Obj Parser::parse_supports_directive()
function Supports_Condition_Obj (line 2412) | Supports_Condition_Obj Parser::parse_supports_condition()
function Supports_Condition_Obj (line 2422) | Supports_Condition_Obj Parser::parse_supports_negation()
function Supports_Condition_Obj (line 2429) | Supports_Condition_Obj Parser::parse_supports_operator()
function Supports_Condition_Obj (line 2448) | Supports_Condition_Obj Parser::parse_supports_interpolation()
function Supports_Condition_Obj (line 2460) | Supports_Condition_Obj Parser::parse_supports_declaration()
function Supports_Condition_Obj (line 2478) | Supports_Condition_Obj Parser::parse_supports_condition_in_parens()
function At_Root_Block_Obj (line 2497) | At_Root_Block_Obj Parser::parse_at_root_block()
function At_Root_Query_Obj (line 2522) | At_Root_Query_Obj Parser::parse_at_root_query()
function Directive_Obj (line 2548) | Directive_Obj Parser::parse_special_directive()
function Directive_Obj (line 2580) | Directive_Obj Parser::parse_prefixed_directive()
function Directive_Obj (line 2610) | Directive_Obj Parser::parse_directive()
function Expression_Obj (line 2622) | Expression_Obj Parser::lex_interpolation()
function Expression_Obj (line 2630) | Expression_Obj Parser::lex_interp_uri()
function Expression_Obj (line 2636) | Expression_Obj Parser::lex_interp_string()
function Expression_Obj (line 2644) | Expression_Obj Parser::lex_almost_any_value_chars()
function Expression_Obj (line 2696) | Expression_Obj Parser::lex_almost_any_value_token()
function String_Schema_Obj (line 2711) | String_Schema_Obj Parser::parse_almost_any_value()
function Warning_Obj (line 2736) | Warning_Obj Parser::parse_warning()
function Error_Obj (line 2748) | Error_Obj Parser::parse_error()
function Debug_Obj (line 2760) | Debug_Obj Parser::parse_debug()
function Return_Obj (line 2772) | Return_Obj Parser::parse_return_directive()
function Lookahead (line 2780) | Lookahead Parser::lookahead_for_selector(const char* start)
function Lookahead (line 2835) | Lookahead Parser::lookahead_for_include(const char* start)
function Lookahead (line 2854) | Lookahead Parser::lookahead_for_value(const char* start)
function check_bom_chars (line 2979) | size_t check_bom_chars(const char* src, const char *end, const unsigne...
function Expression_Obj (line 2990) | Expression_Obj Parser::fold_operands(Expression_Obj base, std::vector<...
function Expression_Obj (line 2998) | Expression_Obj Parser::fold_operands(Expression_Obj base, std::vector<...
FILE: src/libsass/src/parser.hpp
type Lookahead (line 22) | struct Lookahead {
type Sass (line 31) | namespace Sass {
class Parser (line 33) | class Parser : public ParserState {
type Scope (line 36) | enum Scope { Root, Mixin, Function, Media, Control, Properties, Rule...
method Parser (line 54) | Parser(Context& ctx, const ParserState& pstate, Backtraces traces)
method Expression_Obj (line 355) | Expression_Obj lex_interp()
method Number_Ptr (line 387) | Number_Ptr lexed_number(const std::string& parsed) { return lexed_nu...
method Number_Ptr (line 388) | Number_Ptr lexed_dimension(const std::string& parsed) { return lexed...
method Number_Ptr (line 389) | Number_Ptr lexed_percentage(const std::string& parsed) { return lexe...
method Value_Ptr (line 390) | Value_Ptr lexed_hex_color(const std::string& parsed) { return lexed_...
FILE: src/libsass/src/paths.hpp
function vector_to_string (line 10) | std::string vector_to_string(std::vector<T> v)
type Sass (line 31) | namespace Sass {
function paths (line 35) | std::vector<std::vector<T> > paths(std::vector<std::vector<T> > strata...
FILE: src/libsass/src/plugins.cpp
type Sass (line 15) | namespace Sass {
function compatibility (line 34) | inline bool compatibility(const char* their_version)
type dirent (line 167) | struct dirent
FILE: src/libsass/src/plugins.hpp
type Sass (line 28) | namespace Sass {
class Plugins (line 31) | class Plugins {
method get_headers (line 44) | const std::vector<Sass_Importer_Entry> get_headers(void) { return he...
method get_importers (line 45) | const std::vector<Sass_Importer_Entry> get_importers(void) { return ...
method get_functions (line 46) | const std::vector<Sass_Function_Entry> get_functions(void) { return ...
FILE: src/libsass/src/position.cpp
type Sass (line 4) | namespace Sass {
function Offset (line 28) | Offset Offset::init(const char* beg, const char* end)
function Offset (line 40) | Offset Offset::add(const char* begin, const char* end)
function Offset (line 72) | Offset Offset::inc(const char* begin, const char* end) const
function Offset (line 94) | Offset Offset::operator+ (const Offset &off) const
function Offset (line 99) | Offset Offset::operator- (const Offset &off) const
function Position (line 126) | Position Position::add(const char* begin, const char* end)
function Position (line 132) | Position Position::inc(const char* begin, const char* end) const
function Position (line 154) | const Position Position::operator+ (const Offset &off) const
function Offset (line 159) | const Offset Position::operator- (const Offset &off) const
FILE: src/libsass/src/position.hpp
type Sass (line 8) | namespace Sass {
class Offset (line 11) | class Offset {
method Offset (line 37) | Offset off() { return *this; }
class Position (line 45) | class Position : public Offset {
class Token (line 72) | class Token {
method Token (line 78) | Token()
method Token (line 80) | Token(const char* b, const char* e)
method Token (line 82) | Token(const char* str)
method Token (line 84) | Token(const char* p, const char* b, const char* e)
method length (line 87) | size_t length() const { return end - begin; }
method ws_before (line 88) | std::string ws_before() const { return std::string(prefix, begin); }
method to_string (line 89) | const std::string to_string() const { return std::string(begin, end); }
method time_wspace (line 90) | std::string time_wspace() const {
class ParserState (line 102) | class ParserState : public Position {
method Offset (line 110) | Offset off() { return *this; }
method Position (line 111) | Position pos() { return *this; }
method ParserState (line 112) | ParserState pstate() { return *this; }
FILE: src/libsass/src/prelexer.cpp
type Sass (line 11) | namespace Sass {
type Prelexer (line 15) | namespace Prelexer {
FILE: src/libsass/src/prelexer.hpp
type Sass (line 7) | namespace Sass {
type Prelexer (line 9) | namespace Prelexer {
function count_interval (line 421) | unsigned int count_interval(const char* beg, const char* end) {
FILE: src/libsass/src/remove_placeholders.cpp
type Sass (line 7) | namespace Sass {
function Selector_List_Ptr (line 19) | Selector_List_Ptr Remove_Placeholders::remove_placeholders(Selector_Li...
FILE: src/libsass/src/remove_placeholders.hpp
type Sass (line 9) | namespace Sass {
class Remove_Placeholders (line 12) | class Remove_Placeholders : public Operation_CRTP<void, Remove_Placeho...
method fallback_impl (line 14) | void fallback_impl(AST_Node_Ptr n) {}
method fallback (line 30) | void fallback(U x) { return fallback_impl(x); }
FILE: src/libsass/src/sass.cpp
type Sass (line 13) | namespace Sass {
function list2vec (line 16) | std::vector<std::string> list2vec(struct string_list* cur)
function sass_free_memory (line 52) | void ADDCALL sass_free_memory(void* ptr)
type Sass_Compiler (line 71) | struct Sass_Compiler
type Sass_Compiler (line 85) | struct Sass_Compiler
type Sass_Options (line 102) | struct Sass_Options
type Sass_Options (line 111) | struct Sass_Options
type Sass (line 132) | namespace Sass {
function list2vec (line 16) | std::vector<std::string> list2vec(struct string_list* cur)
FILE: src/libsass/src/sass.hpp
type Sass (line 52) | namespace Sass {
type Sass_Input_Style (line 70) | enum Sass_Input_Style {
type string_list (line 78) | struct string_list {
type Sass_Inspect_Options (line 84) | struct Sass_Inspect_Options {
type Sass_Output_Style (line 88) | enum Sass_Output_Style
method Sass_Inspect_Options (line 97) | Sass_Inspect_Options(Sass_Output_Style style = Sass::NESTED,
type Sass_Output_Options (line 105) | struct Sass_Output_Options : Sass_Inspect_Options {
method Sass_Output_Options (line 117) | Sass_Output_Options(struct Sass_Inspect_Options opt,
method Sass_Output_Options (line 127) | Sass_Output_Options(Sass_Output_Style style = Sass::NESTED,
FILE: src/libsass/src/sass2scss.cpp
type Sass (line 36) | namespace Sass
function findCommentOpener (line 195) | static size_t findCommentOpener (std::string& sass)
function removeMultilineComment (line 277) | static std::string removeMultilineComment (std::string &sass)
function rtrim (line 353) | std::string rtrim(const std::string &sass)
function flush (line 366) | std::string flush (std::string& sass, converter& converter)
function process (line 440) | std::string process (std::string& sass, converter& converter)
FILE: src/libsass/src/sass_context.cpp
type Sass (line 22) | namespace Sass {
function JsonNode (line 24) | static inline JsonNode* json_mkstream(const std::stringstream& stream)
function handle_error (line 31) | static int handle_error(Sass_Context* c_ctx) {
function handle_errors (line 206) | static int handle_errors(Sass_Context* c_ctx) {
function Block_Obj (line 211) | static Block_Obj sass_parse_block(Sass_Compiler* compiler) throw()
type Sass_Options (line 265) | struct Sass_Options
type Sass_Options (line 266) | struct Sass_Options
function copy_options (line 267) | static void copy_options(struct Sass_Options* to, struct Sass_Options* f...
function Sass_Compiler (line 298) | static Sass_Compiler* sass_prepare_context (Sass_Context* c_ctx, Context...
function sass_compile_context (line 363) | static int sass_compile_context (Sass_Context* c_ctx, Context* cpp_ctx)
function init_options (line 382) | inline void init_options (struct Sass_Options* options)
type Sass_Options (line 391) | struct Sass_Options
type Sass_Options (line 391) | struct Sass_Options
type Sass_File_Context (line 400) | struct Sass_File_Context
type Sass_File_Context (line 400) | struct Sass_File_Context
type Sass_File_Context (line 400) | struct Sass_File_Context
type Sass_Data_Context (line 416) | struct Sass_Data_Context
type Sass_Data_Context (line 416) | struct Sass_Data_Context
type Sass_Data_Context (line 416) | struct Sass_Data_Context
type Sass_Compiler (line 430) | struct Sass_Compiler
type Sass_Data_Context (line 430) | struct Sass_Data_Context
type Sass_Compiler (line 437) | struct Sass_Compiler
type Sass_File_Context (line 437) | struct Sass_File_Context
function sass_compile_data_context (line 444) | int ADDCALL sass_compile_data_context(Sass_Data_Context* data_ctx)
function sass_compile_file_context (line 459) | int ADDCALL sass_compile_file_context(Sass_File_Context* file_ctx)
function sass_compiler_parse (line 473) | int ADDCALL sass_compiler_parse(struct Sass_Compiler* compiler)
function sass_compiler_execute (line 488) | int ADDCALL sass_compiler_execute(struct Sass_Compiler* compiler)
function sass_reset_options (line 512) | static void sass_reset_options (struct Sass_Options* options)
function sass_clear_options (line 530) | static void sass_clear_options (struct Sass_Options* options)
function sass_clear_context (line 584) | static void sass_clear_context (struct Sass_Context* ctx)
function sass_delete_compiler (line 611) | void ADDCALL sass_delete_compiler (struct Sass_Compiler* compiler)
function sass_delete_options (line 624) | void ADDCALL sass_delete_options (struct Sass_Options* options)
function sass_delete_file_context (line 630) | void ADDCALL sass_delete_file_context (struct Sass_File_Context* ctx)
function sass_delete_data_context (line 636) | void ADDCALL sass_delete_data_context (struct Sass_Data_Context* ctx)
type Sass_Context (line 646) | struct Sass_Context
type Sass_File_Context (line 646) | struct Sass_File_Context
type Sass_Context (line 647) | struct Sass_Context
type Sass_Data_Context (line 647) | struct Sass_Data_Context
type Sass_Options (line 650) | struct Sass_Options
type Sass_Context (line 650) | struct Sass_Context
type Sass_Options (line 651) | struct Sass_Options
type Sass_File_Context (line 651) | struct Sass_File_Context
type Sass_Options (line 652) | struct Sass_Options
type Sass_Data_Context (line 652) | struct Sass_Data_Context
function sass_file_context_set_options (line 653) | void ADDCALL sass_file_context_set_options (struct Sass_File_Context* ct...
function sass_data_context_set_options (line 654) | void ADDCALL sass_data_context_set_options (struct Sass_Data_Context* ct...
function sass_compiler_get_state (line 657) | enum Sass_Compiler_State ADDCALL sass_compiler_get_state(struct Sass_Com...
type Sass_Context (line 658) | struct Sass_Context
type Sass_Compiler (line 658) | struct Sass_Compiler
type Sass_Options (line 659) | struct Sass_Options
type Sass_Compiler (line 659) | struct Sass_Compiler
function sass_compiler_get_import_stack_size (line 661) | size_t ADDCALL sass_compiler_get_import_stack_size(struct Sass_Compiler*...
function Sass_Import_Entry (line 662) | Sass_Import_Entry ADDCALL sass_compiler_get_last_import(struct Sass_Comp...
function Sass_Import_Entry (line 663) | Sass_Import_Entry ADDCALL sass_compiler_get_import_entry(struct Sass_Com...
function sass_compiler_get_callee_stack_size (line 665) | size_t ADDCALL sass_compiler_get_callee_stack_size(struct Sass_Compiler*...
function Sass_Callee_Entry (line 666) | Sass_Callee_Entry ADDCALL sass_compiler_get_last_callee(struct Sass_Comp...
function Sass_Callee_Entry (line 667) | Sass_Callee_Entry ADDCALL sass_compiler_get_callee_entry(struct Sass_Com...
function sass_context_get_included_files_size (line 670) | size_t ADDCALL sass_context_get_included_files_size (struct Sass_Context...
type Sass_Output_Style (line 675) | enum Sass_Output_Style
type Sass_Options (line 717) | struct Sass_Options
type string_list (line 720) | struct string_list
type string_list (line 720) | struct string_list
type Sass_Options (line 744) | struct Sass_Options
type Sass_Options (line 752) | struct Sass_Options
type string_list (line 755) | struct string_list
type string_list (line 755) | struct string_list
type string_list (line 755) | struct string_list
FILE: src/libsass/src/sass_context.hpp
type Sass_Options (line 9) | struct Sass_Options : Sass_Output_Options {
type string_list (line 47) | struct string_list
type string_list (line 49) | struct string_list
type Sass_Context (line 72) | struct Sass_Context : Sass_Options
type Sass_Input_Style (line 76) | enum Sass_Input_Style
type Sass_File_Context (line 101) | struct Sass_File_Context : Sass_Context {
type Sass_Data_Context (line 109) | struct Sass_Data_Context : Sass_Context {
type Sass_Compiler (line 118) | struct Sass_Compiler {
FILE: src/libsass/src/sass_functions.cpp
function Sass_Function_List (line 12) | Sass_Function_List ADDCALL sass_make_function_list(size_t length)
function Sass_Function_Entry (line 17) | Sass_Function_Entry ADDCALL sass_make_function(const char* signature, Sa...
function sass_delete_function (line 27) | void ADDCALL sass_delete_function(Sass_Function_Entry entry)
function sass_delete_function_list (line 34) | void ADDCALL sass_delete_function_list(Sass_Function_List list)
function Sass_Function_Entry (line 46) | Sass_Function_Entry ADDCALL sass_function_get_list_entry(Sass_Function_L...
function sass_function_set_list_entry (line 47) | void sass_function_set_list_entry(Sass_Function_List list, size_t pos, S...
function Sass_Function_Fn (line 50) | Sass_Function_Fn ADDCALL sass_function_get_function(Sass_Function_Entry ...
function Sass_Importer_Entry (line 53) | Sass_Importer_Entry ADDCALL sass_make_importer(Sass_Importer_Fn importer...
function Sass_Importer_Fn (line 63) | Sass_Importer_Fn ADDCALL sass_importer_get_function(Sass_Importer_Entry ...
function sass_importer_get_priority (line 64) | double ADDCALL sass_importer_get_priority (Sass_Importer_Entry cb) { ret...
function sass_delete_importer (line 68) | void ADDCALL sass_delete_importer (Sass_Importer_Entry cb)
function Sass_Importer_List (line 74) | Sass_Importer_List ADDCALL sass_make_importer_list(size_t length)
function sass_delete_importer_list (line 80) | void ADDCALL sass_delete_importer_list(Sass_Importer_List list)
function Sass_Importer_Entry (line 91) | Sass_Importer_Entry ADDCALL sass_importer_get_list_entry(Sass_Importer_L...
function sass_importer_set_list_entry (line 92) | void ADDCALL sass_importer_set_list_entry(Sass_Importer_List list, size_...
function Sass_Import_List (line 95) | Sass_Import_List ADDCALL sass_make_import_list(size_t length)
function Sass_Import_Entry (line 102) | Sass_Import_Entry ADDCALL sass_make_import(const char* imp_path, const c...
function Sass_Import_Entry (line 117) | Sass_Import_Entry ADDCALL sass_make_import_entry(const char* path, char*...
function Sass_Import_Entry (line 123) | Sass_Import_Entry ADDCALL sass_import_set_error(Sass_Import_Entry import...
function sass_import_set_list_entry (line 134) | void ADDCALL sass_import_set_list_entry(Sass_Import_List list, size_t id...
function Sass_Import_Entry (line 135) | Sass_Import_Entry ADDCALL sass_import_get_list_entry(Sass_Import_List li...
function sass_delete_import_list (line 138) | void ADDCALL sass_delete_import_list(Sass_Import_List list)
function sass_delete_import (line 150) | void ADDCALL sass_delete_import(Sass_Import_Entry import)
function sass_callee_get_line (line 163) | size_t ADDCALL sass_callee_get_line(Sass_Callee_Entry entry) { return en...
function sass_callee_get_column (line 164) | size_t ADDCALL sass_callee_get_column(Sass_Callee_Entry entry) { return ...
function sass_callee_get_type (line 165) | enum Sass_Callee_Type ADDCALL sass_callee_get_type(Sass_Callee_Entry ent...
function Sass_Env_Frame (line 166) | Sass_Env_Frame ADDCALL sass_callee_get_env (Sass_Callee_Entry entry) { r...
function sass_env_set_lexical (line 173) | void ADDCALL sass_env_set_lexical (Sass_Env_Frame env, const char* name,...
function sass_env_set_local (line 180) | void ADDCALL sass_env_set_local (Sass_Env_Frame env, const char* name, u...
function sass_env_set_global (line 187) | void ADDCALL sass_env_set_global (Sass_Env_Frame env, const char* name, ...
function sass_import_get_error_line (line 198) | size_t ADDCALL sass_import_get_error_line(Sass_Import_Entry entry) { ret...
function sass_import_get_error_column (line 199) | size_t ADDCALL sass_import_get_error_column(Sass_Import_Entry entry) { r...
FILE: src/libsass/src/sass_functions.hpp
type Sass_Function (line 9) | struct Sass_Function {
type Sass_Import (line 16) | struct Sass_Import {
type Sass_Env (line 28) | struct Sass_Env {
type Sass_Callee (line 34) | struct Sass_Callee {
type Sass_Callee_Type (line 39) | enum Sass_Callee_Type
type Sass_Env (line 40) | struct Sass_Env
type Sass_Importer (line 44) | struct Sass_Importer {
FILE: src/libsass/src/sass_util.cpp
type Sass (line 4) | namespace Sass {
function Node (line 40) | Node paths(const Node& arrs) {
function Node (line 111) | Node flatten(Node& arr, int n) {
FILE: src/libsass/src/sass_util.hpp
type Sass (line 8) | namespace Sass {
class DefaultLcsComparator (line 38) | class DefaultLcsComparator {
function Node (line 63) | Node lcs_backtrace(const LCSTable& c, const Node& x, const Node& y, in...
function lcs_table (line 99) | void lcs_table(const Node& x, const Node& y, const ComparatorType& com...
function Node (line 142) | Node lcs(Node& x, Node& y, const ComparatorType& comparator) {
function group_by_to_a (line 220) | void group_by_to_a(std::vector<EnumType>& enumeration, KeyFunctorType&...
FILE: src/libsass/src/sass_values.cpp
function sass_value_get_tag (line 15) | enum Sass_Tag ADDCALL sass_value_get_tag(const union Sass_Value* v) { re...
function sass_value_is_null (line 18) | bool ADDCALL sass_value_is_null(const union Sass_Value* v) { return v->u...
function sass_value_is_number (line 19) | bool ADDCALL sass_value_is_number(const union Sass_Value* v) { return v-...
function sass_value_is_string (line 20) | bool ADDCALL sass_value_is_string(const union Sass_Value* v) { return v-...
function sass_value_is_boolean (line 21) | bool ADDCALL sass_value_is_boolean(const union Sass_Value* v) { return v...
function sass_value_is_color (line 22) | bool ADDCALL sass_value_is_color(const union Sass_Value* v) { return v->...
function sass_value_is_list (line 23) | bool ADDCALL sass_value_is_list(const union Sass_Value* v) { return v->u...
function sass_value_is_map (line 24) | bool ADDCALL sass_value_is_map(const union Sass_Value* v) { return v->un...
function sass_value_is_error (line 25) | bool ADDCALL sass_value_is_error(const union Sass_Value* v) { return v->...
function sass_value_is_warning (line 26) | bool ADDCALL sass_value_is_warning(const union Sass_Value* v) { return v...
function sass_number_get_value (line 29) | double ADDCALL sass_number_get_value(const union Sass_Value* v) { return...
function sass_number_set_value (line 30) | void ADDCALL sass_number_set_value(union Sass_Value* v, double value) { ...
function sass_number_set_unit (line 32) | void ADDCALL sass_number_set_unit(union Sass_Value* v, char* unit) { v->...
function sass_string_set_value (line 36) | void ADDCALL sass_string_set_value(union Sass_Value* v, char* value) { v...
function sass_string_is_quoted (line 37) | bool ADDCALL sass_string_is_quoted(const union Sass_Value* v) { return v...
function sass_string_set_quoted (line 38) | void ADDCALL sass_string_set_quoted(union Sass_Value* v, bool quoted) { ...
function sass_boolean_get_value (line 41) | bool ADDCALL sass_boolean_get_value(const union Sass_Value* v) { return ...
function sass_boolean_set_value (line 42) | void ADDCALL sass_boolean_set_value(union Sass_Value* v, bool value) { v...
function sass_color_get_r (line 45) | double ADDCALL sass_color_get_r(const union Sass_Value* v) { return v->c...
function sass_color_set_r (line 46) | void ADDCALL sass_color_set_r(union Sass_Value* v, double r) { v->color....
function sass_color_get_g (line 47) | double ADDCALL sass_color_get_g(const union Sass_Value* v) { return v->c...
function sass_color_set_g (line 48) | void ADDCALL sass_color_set_g(union Sass_Value* v, double g) { v->color....
function sass_color_get_b (line 49) | double ADDCALL sass_color_get_b(const union Sass_Value* v) { return v->c...
function sass_color_set_b (line 50) | void ADDCALL sass_color_set_b(union Sass_Value* v, double b) { v->color....
function sass_color_get_a (line 51) | double ADDCALL sass_color_get_a(const union Sass_Value* v) { return v->c...
function sass_color_set_a (line 52) | void ADDCALL sass_color_set_a(union Sass_Value* v, double a) { v->color....
function sass_list_get_length (line 55) | size_t ADDCALL sass_list_get_length(const union Sass_Value* v) { return ...
function sass_list_get_separator (line 56) | enum Sass_Separator ADDCALL sass_list_get_separator(const union Sass_Val...
function sass_list_set_separator (line 57) | void ADDCALL sass_list_set_separator(union Sass_Value* v, enum Sass_Sepa...
function sass_list_get_is_bracketed (line 58) | bool ADDCALL sass_list_get_is_bracketed(const union Sass_Value* v) { ret...
function sass_list_set_is_bracketed (line 59) | void ADDCALL sass_list_set_is_bracketed(union Sass_Value* v, bool is_bra...
function sass_list_set_value (line 62) | void ADDCALL sass_list_set_value(union Sass_Value* v, size_t i, union Sa...
function sass_map_get_length (line 65) | size_t ADDCALL sass_map_get_length(const union Sass_Value* v) { return v...
function sass_map_set_key (line 69) | void ADDCALL sass_map_set_key(union Sass_Value* v, size_t i, union Sass_...
function sass_map_set_value (line 70) | void ADDCALL sass_map_set_value(union Sass_Value* v, size_t i, union Sas...
function sass_error_set_message (line 74) | void ADDCALL sass_error_set_message(union Sass_Value* v, char* msg) { v-...
function sass_warning_set_message (line 78) | void ADDCALL sass_warning_set_message(union Sass_Value* v, char* msg) { ...
type Sass_Separator (line 136) | enum Sass_Separator
type Sass_MapPair (line 155) | struct Sass_MapPair
type Sass_MapPair (line 155) | struct Sass_MapPair
function sass_delete_value (line 189) | void ADDCALL sass_delete_value(union Sass_Value* val) {
type Sass_OP (line 290) | enum Sass_OP
type Sass_Inspect_Options (line 299) | struct Sass_Inspect_Options
FILE: src/libsass/src/sass_values.hpp
type Sass_Unknown (line 6) | struct Sass_Unknown {
type Sass_Tag (line 7) | enum Sass_Tag
type Sass_Boolean (line 10) | struct Sass_Boolean {
type Sass_Tag (line 11) | enum Sass_Tag
type Sass_Number (line 15) | struct Sass_Number {
type Sass_Tag (line 16) | enum Sass_Tag
type Sass_Color (line 21) | struct Sass_Color {
type Sass_Tag (line 22) | enum Sass_Tag
type Sass_String (line 29) | struct Sass_String {
type Sass_Tag (line 30) | enum Sass_Tag
type Sass_List (line 35) | struct Sass_List {
type Sass_Tag (line 36) | enum Sass_Tag
type Sass_Separator (line 37) | enum Sass_Separator
type Sass_Map (line 44) | struct Sass_Map {
type Sass_Tag (line 45) | enum Sass_Tag
type Sass_MapPair (line 47) | struct Sass_MapPair
type Sass_Null (line 50) | struct Sass_Null {
type Sass_Tag (line 51) | enum Sass_Tag
type Sass_Error (line 54) | struct Sass_Error {
type Sass_Tag (line 55) | enum Sass_Tag
type Sass_Warning (line 59) | struct Sass_Warning {
type Sass_Tag (line 60) | enum Sass_Tag
type Sass_Unknown (line 65) | struct Sass_Unknown
type Sass_Tag (line 7) | enum Sass_Tag
type Sass_Boolean (line 66) | struct Sass_Boolean
type Sass_Tag (line 11) | enum Sass_Tag
type Sass_Number (line 67) | struct Sass_Number
type Sass_Tag (line 16) | enum Sass_Tag
type Sass_Color (line 68) | struct Sass_Color
type Sass_Tag (line 22) | enum Sass_Tag
type Sass_String (line 69) | struct Sass_String
type Sass_Tag (line 30) | enum Sass_Tag
type Sass_List (line 70) | struct Sass_List
type Sass_Tag (line 36) | enum Sass_Tag
type Sass_Separator (line 37) | enum Sass_Separator
type Sass_Map (line 71) | struct Sass_Map
type Sass_Tag (line 45) | enum Sass_Tag
type Sass_MapPair (line 47) | struct Sass_MapPair
type Sass_Null (line 72) | struct Sass_Null
type Sass_Tag (line 51) | enum Sass_Tag
type Sass_Error (line 73) | struct Sass_Error
type Sass_Tag (line 55) | enum Sass_Tag
type Sass_Warning (line 74) | struct Sass_Warning
type Sass_Tag (line 60) | enum Sass_Tag
type Sass_MapPair (line 77) | struct Sass_MapPair {
FILE: src/libsass/src/source_map.cpp
type Sass (line 13) | namespace Sass {
function ParserState (line 183) | ParserState SourceMap::remap(const ParserState& pstate) {
FILE: src/libsass/src/source_map.hpp
type Sass (line 15) | namespace Sass {
class Context (line 17) | class Context
class OutputBuffer (line 18) | class OutputBuffer
method OutputBuffer (line 51) | OutputBuffer(void)
class SourceMap (line 20) | class SourceMap {
class OutputBuffer (line 49) | class OutputBuffer {
method OutputBuffer (line 51) | OutputBuffer(void)
FILE: src/libsass/src/subset_map.cpp
type Sass (line 5) | namespace Sass {
FILE: src/libsass/src/subset_map.hpp
type Sass (line 59) | namespace Sass {
class Subset_Map (line 61) | class Subset_Map {
method empty (line 69) | bool empty() { return values_.empty(); }
method clear (line 70) | void clear() { values_.clear(); hash_.clear(); }
method values (line 71) | const std::vector<SubSetMapPair> values(void) { return values_; }
FILE: src/libsass/src/to_c.cpp
type Sass (line 5) | namespace Sass {
FILE: src/libsass/src/to_c.hpp
type Sass (line 8) | namespace Sass {
class To_C (line 10) | class To_C : public Operation_CRTP<union Sass_Value*, To_C> {
method To_C (line 16) | To_C() { }
FILE: src/libsass/src/to_value.cpp
type Sass (line 5) | namespace Sass {
function Value_Ptr (line 7) | Value_Ptr To_Value::fallback_impl(AST_Node_Ptr n)
function Value_Ptr (line 15) | Value_Ptr To_Value::operator()(Custom_Error_Ptr e)
function Value_Ptr (line 21) | Value_Ptr To_Value::operator()(Custom_Warning_Ptr w)
function Value_Ptr (line 27) | Value_Ptr To_Value::operator()(Boolean_Ptr b)
function Value_Ptr (line 33) | Value_Ptr To_Value::operator()(Number_Ptr n)
function Value_Ptr (line 39) | Value_Ptr To_Value::operator()(Color_Ptr c)
function Value_Ptr (line 45) | Value_Ptr To_Value::operator()(String_Constant_Ptr s)
function Value_Ptr (line 51) | Value_Ptr To_Value::operator()(String_Quoted_Ptr s)
function Value_Ptr (line 57) | Value_Ptr To_Value::operator()(List_Ptr l)
function Value_Ptr (line 72) | Value_Ptr To_Value::operator()(Map_Ptr m)
function Value_Ptr (line 78) | Value_Ptr To_Value::operator()(Null_Ptr n)
function Value_Ptr (line 84) | Value_Ptr To_Value::operator()(Function_Ptr n)
function Value_Ptr (line 90) | Value_Ptr To_Value::operator()(Argument_Ptr arg)
function Value_Ptr (line 97) | Value_Ptr To_Value::operator()(Selector_List_Ptr s)
function Value_Ptr (line 105) | Value_Ptr To_Value::operator()(Binary_Expression_Ptr s)
FILE: src/libsass/src/to_value.hpp
type Sass (line 8) | namespace Sass {
class To_Value (line 10) | class To_Value : public Operation_CRTP<Value_Ptr, To_Value> {
method To_Value (line 20) | To_Value(Context& ctx)
method Value_Ptr (line 45) | Value_Ptr fallback(U x) { return fallback_impl(x); }
FILE: src/libsass/src/units.cpp
type Sass (line 6) | namespace Sass {
function UnitClass (line 53) | UnitClass get_unit_type(UnitType unit)
function get_unit_class (line 66) | std::string get_unit_class(UnitType unit)
function UnitType (line 79) | UnitType get_main_unit(const UnitClass unit)
function UnitType (line 92) | UnitType string_to_unit(const std::string& s)
function unit_to_class (line 150) | std::string unit_to_class(const std::string& s)
function conversion_factor (line 178) | double conversion_factor(const std::string& s1, const std::string& s2)
function conversion_factor (line 193) | double conversion_factor(UnitType u1, UnitType u2, UnitClass t1, UnitC...
function convert_units (line 220) | double convert_units(const std::string& lhs, const std::string& rhs, i...
FILE: src/libsass/src/units.hpp
type Sass (line 9) | namespace Sass {
type UnitClass (line 13) | enum UnitClass {
type UnitType (line 22) | enum UnitType {
class Units (line 56) | class Units {
method Units (line 62) | Units() :
method Units (line 67) | Units(const Units* ptr) :
type Sass::UnitType (line 97) | enum Sass::UnitType
type Sass::UnitClass (line 99) | enum Sass::UnitClass
FILE: src/libsass/src/utf8/checked.h
function namespace (line 34) | namespace utf8
function output_iterator (line 130) | output_iterator replace_invalid(octet_iterator start, octet_iterator end...
function operator (line 291) | uint32_t operator * () const
function operator (line 302) | bool operator != (const iterator& rhs) const
function iterator (line 311) | iterator operator ++ (int)
function iterator (line 322) | iterator operator -- (int)
FILE: src/libsass/src/utf8/core.h
function namespace (line 33) | namespace utf8
FILE: src/libsass/src/utf8/unchecked.h
function namespace (line 33) | namespace utf8
FILE: src/libsass/src/utf8_string.cpp
type Sass (line 9) | namespace Sass {
type UTF_8 (line 10) | namespace UTF_8 {
function code_point_count (line 19) | size_t code_point_count(const string& str, size_t start, size_t end) {
function code_point_count (line 23) | size_t code_point_count(const string& str) {
function offset_at_position (line 28) | size_t offset_at_position(const string& str, size_t position) {
function code_point_size_at_offset (line 35) | size_t code_point_size_at_offset(const string& str, size_t offset) {
function normalize_index (line 47) | size_t normalize_index(int index, size_t len) {
function string (line 78) | string convert_from_utf16(const wstring& utf16)
function wstring (line 89) | wstring convert_to_utf16(const string& utf8)
FILE: src/libsass/src/utf8_string.hpp
type Sass (line 7) | namespace Sass {
type UTF_8 (line 8) | namespace UTF_8 {
FILE: src/libsass/src/util.cpp
type Sass (line 16) | namespace Sass {
function round (line 18) | double round(double val, size_t precision)
function sass_strtod (line 38) | double sass_strtod(const char *str)
function free_string_array (line 65) | void free_string_array(char ** arr) {
function read_css_string (line 99) | std::string read_css_string(const std::string& str, bool css)
function evacuate_escapes (line 127) | std::string evacuate_escapes(const std::string& str)
function newline_to_space (line 161) | void newline_to_space(std::string& str)
function string_to_output (line 168) | std::string string_to_output(const std::string& str)
function escape_string (line 184) | std::string escape_string(const std::string& str)
function comment_to_string (line 201) | std::string comment_to_string(const std::string& text)
function detect_best_quotemark (line 237) | char detect_best_quotemark(const char* s, char qm)
function read_hex_escapes (line 253) | std::string read_hex_escapes(const std::string& s)
function unquote (line 322) | std::string unquote(const std::string& s, char* qd, bool keep_utf8_seq...
function quote (line 414) | std::string quote(const std::string& s, char q)
function is_hex_doublet (line 475) | bool is_hex_doublet(double n)
function is_color_doublet (line 483) | bool is_color_doublet(double r, double g, double b)
function peek_linefeed (line 488) | bool peek_linefeed(const char* start)
type Util (line 510) | namespace Util {
function rtrim (line 513) | std::string rtrim(const std::string &str) {
function normalize_underscores (line 522) | std::string normalize_underscores(const std::string& str) {
function normalize_decimals (line 532) | std::string normalize_decimals(const std::string& str) {
function isPrintable (line 539) | bool isPrintable(Ruleset_Ptr r, Sass_Output_Style style) {
function isPrintable (line 587) | bool isPrintable(String_Constant_Ptr s, Sass_Output_Style style)
function isPrintable (line 592) | bool isPrintable(String_Quoted_Ptr s, Sass_Output_Style style)
function isPrintable (line 597) | bool isPrintable(Declaration_Ptr d, Sass_Output_Style style)
function isPrintable (line 605) | bool isPrintable(Supports_Block_Ptr f, Sass_Output_Style style) {
function isPrintable (line 636) | bool isPrintable(Media_Block_Ptr m, Sass_Output_Style style)
function isPrintable (line 674) | bool isPrintable(Comment_Ptr c, Sass_Output_Style style)
function isPrintable (line 688) | bool isPrintable(Block_Obj b, Sass_Output_Style style) {
function isAscii (line 728) | bool isAscii(const char chr) {
FILE: src/libsass/src/util.hpp
type Sass (line 13) | namespace Sass {
type Util (line 37) | namespace Util {
FILE: src/libsass/src/values.cpp
type Sass (line 7) | namespace Sass {
function Value_Ptr (line 68) | Value_Ptr sass_value_to_ast_node (const union Sass_Value* val)
FILE: src/libsass/src/values.hpp
type Sass (line 6) | namespace Sass {
FILE: src/libsass/test/test_node.cpp
type Sass (line 11) | namespace Sass {
function Complex_Selector (line 30) | static Complex_Selector* createComplexSelector(std::string src) {
function roundtripTest (line 37) | void roundtripTest(const char* toTest) {
function main (line 83) | int main() {
FILE: src/libsass/test/test_paths.cpp
function main (line 13) | int main()
FILE: src/libsass/test/test_selector_difference.cpp
function Compound_Selector (line 11) | Compound_Selector* selector(std::string src)
function diff (line 14) | void diff(std::string s, std::string t)
function main (line 19) | int main()
FILE: src/libsass/test/test_specificity.cpp
function Selector (line 11) | Selector* selector(std::string src)
function spec (line 14) | void spec(std::string sel)
function main (line 17) | int main()
FILE: src/libsass/test/test_subset_map.cpp
function setup (line 12) | void setup() {
function testEqualKeys (line 54) | void testEqualKeys() {
function testSubsetKeys (line 72) | void testSubsetKeys() {
function testSupersetKeys (line 92) | void testSupersetKeys() {
function testDisjointKeys (line 118) | void testDisjointKeys() {
function testSemiDisjointKeys (line 142) | void testSemiDisjointKeys() {
function testEmptyKeySet (line 166) | void testEmptyKeySet() {
function testEmptyKeyGet (line 179) | void testEmptyKeyGet() {
function testMultipleSubsets (line 188) | void testMultipleSubsets() {
function testBracketBracket (line 224) | void testBracketBracket() {
function testKeyOrder (line 244) | void testKeyOrder() {
function testOrderPreserved (line 256) | void testOrderPreserved() {
function testMultipleEqualValues (line 308) | void testMultipleEqualValues() {
function main (line 346) | int main()
function string (line 432) | string toString(std::vector<std::pair<string, std::vector<std::string>>> v)
function string (line 454) | string toString(std::vector<std::string> v)
function assertEqual (line 468) | void assertEqual(string sExpected, string sResult) {
FILE: src/libsass/test/test_superselector.cpp
function Compound_Selector (line 10) | Compound_Selector* compound_selector(std::string src)
function Complex_Selector (line 13) | Complex_Selector* complex_selector(std::string src)
function check_compound (line 16) | void check_compound(std::string s1, std::string s2)
function check_complex (line 27) | void check_complex(std::string s1, std::string s2)
function main (line 38) | int main()
FILE: src/libsass/test/test_unification.cpp
function Compound_Selector (line 10) | Compound_Selector* selector(std::string src)
function unify (line 13) | void unify(std::string lhs, std::string rhs)
function main (line 19) | int main()
FILE: src/sass_context_wrapper.cpp
function compile_it (line 6) | void compile_it(uv_work_t* req) {
function compile_data (line 17) | void compile_data(struct Sass_Data_Context* dctx) {
function compile_file (line 21) | void compile_file(struct Sass_File_Context* fctx) {
function sass_context_wrapper (line 25) | sass_context_wrapper* sass_make_context_wrapper() {
function sass_free_context_wrapper (line 29) | void sass_free_context_wrapper(sass_context_wrapper* ctx_w) {
FILE: src/sass_context_wrapper.h
type Sass_Data_Context (line 16) | struct Sass_Data_Context
type Sass_File_Context (line 17) | struct Sass_File_Context
type sass_context_wrapper (line 20) | struct sass_context_wrapper {
type sass_context_wrapper (line 50) | struct sass_context_wrapper
type sass_context_wrapper (line 51) | struct sass_context_wrapper
FILE: src/sass_types/boolean.cpp
type SassTypes (line 4) | namespace SassTypes
function Boolean (line 13) | Boolean& Boolean::get_singleton(bool v) {
function NAN_METHOD (line 55) | NAN_METHOD(Boolean::New) {
function NAN_METHOD (line 70) | NAN_METHOD(Boolean::GetValue) {
FILE: src/sass_types/boolean.h
function namespace (line 8) | namespace SassTypes
FILE: src/sass_types/color.cpp
type SassTypes (line 4) | namespace SassTypes
function Sass_Value (line 8) | Sass_Value* Color::construct(const std::vector<v8::Local<v8::Value>> r...
function NAN_METHOD (line 64) | NAN_METHOD(Color::GetR) {
function NAN_METHOD (line 68) | NAN_METHOD(Color::GetG) {
function NAN_METHOD (line 72) | NAN_METHOD(Color::GetB) {
function NAN_METHOD (line 76) | NAN_METHOD(Color::GetA) {
function NAN_METHOD (line 80) | NAN_METHOD(Color::SetR) {
function NAN_METHOD (line 92) | NAN_METHOD(Color::SetG) {
function NAN_METHOD (line 104) | NAN_METHOD(Color::SetB) {
function NAN_METHOD (line 116) | NAN_METHOD(Color::SetA) {
FILE: src/sass_types/color.h
function namespace (line 13) | namespace SassTypes
FILE: src/sass_types/error.cpp
type SassTypes (line 5) | namespace SassTypes
function Sass_Value (line 9) | Sass_Value* Error::construct(const std::vector<v8::Local<v8::Value>> r...
FILE: src/sass_types/error.h
function namespace (line 7) | namespace SassTypes
FILE: src/sass_types/factory.cpp
type SassTypes (line 13) | namespace SassTypes
function NAN_MODULE_INIT (line 48) | NAN_MODULE_INIT(Factory::initExports) {
function Value (line 63) | Value* Factory::unwrap(v8::Local<v8::Value> obj) {
FILE: src/sass_types/factory.h
function namespace (line 8) | namespace SassTypes
FILE: src/sass_types/list.cpp
type SassTypes (line 4) | namespace SassTypes
function Sass_Value (line 8) | Sass_Value* List::construct(const std::vector<v8::Local<v8::Value>> ra...
function NAN_METHOD (line 40) | NAN_METHOD(List::GetValue) {
function NAN_METHOD (line 61) | NAN_METHOD(List::SetValue) {
function NAN_METHOD (line 82) | NAN_METHOD(List::GetSeparator) {
function NAN_METHOD (line 86) | NAN_METHOD(List::SetSeparator) {
function NAN_METHOD (line 98) | NAN_METHOD(List::GetLength) {
FILE: src/sass_types/list.h
function namespace (line 7) | namespace SassTypes
FILE: src/sass_types/map.cpp
type SassTypes (line 4) | namespace SassTypes
function Sass_Value (line 8) | Sass_Value* Map::construct(const std::vector<v8::Local<v8::Value>> raw...
function NAN_METHOD (line 30) | NAN_METHOD(Map::GetValue) {
function NAN_METHOD (line 51) | NAN_METHOD(Map::SetValue) {
function NAN_METHOD (line 72) | NAN_METHOD(Map::GetKey) {
function NAN_METHOD (line 94) | NAN_METHOD(Map::SetKey) {
function NAN_METHOD (line 115) | NAN_METHOD(Map::GetLength) {
FILE: src/sass_types/map.h
function namespace (line 7) | namespace SassTypes
FILE: src/sass_types/null.cpp
type SassTypes (line 4) | namespace SassTypes
function Null (line 13) | Null& Null::get_singleton() {
function NAN_METHOD (line 46) | NAN_METHOD(Null::New) {
FILE: src/sass_types/null.h
function namespace (line 7) | namespace SassTypes
FILE: src/sass_types/number.cpp
type SassTypes (line 5) | namespace SassTypes
function Sass_Value (line 9) | Sass_Value* Number::construct(const std::vector<v8::Local<v8::Value>> ...
function NAN_METHOD (line 43) | NAN_METHOD(Number::GetValue) {
function NAN_METHOD (line 47) | NAN_METHOD(Number::GetUnit) {
function NAN_METHOD (line 51) | NAN_METHOD(Number::SetValue) {
function NAN_METHOD (line 64) | NAN_METHOD(Number::SetUnit) {
FILE: src/sass_types/number.h
function namespace (line 7) | namespace SassTypes
FILE: src/sass_types/sass_value_wrapper.h
function namespace (line 10) | namespace SassTypes
FILE: src/sass_types/string.cpp
type SassTypes (line 5) | namespace SassTypes
function Sass_Value (line 9) | Sass_Value* String::construct(const std::vector<v8::Local<v8::Value>> ...
function NAN_METHOD (line 33) | NAN_METHOD(String::GetValue) {
function NAN_METHOD (line 37) | NAN_METHOD(String::SetValue) {
FILE: src/sass_types/string.h
function namespace (line 7) | namespace SassTypes
FILE: src/sass_types/value.h
function namespace (line 7) | namespace SassTypes
FILE: test/api.js
function assertExpected (line 1013) | function assertExpected(result) {
function assertExpected (line 1928) | function assertExpected(result) {
FILE: test/errors.js
function getCurrentPlatform (line 7) | function getCurrentPlatform() {
function getCurrentArchitecture (line 16) | function getCurrentArchitecture() {
function getCurrentEnvironment (line 25) | function getCurrentEnvironment() {
FILE: test/types.js
function assertJustOneArgument (line 202) | function assertJustOneArgument(cb) {
function assertNumberArgument (line 213) | function assertNumberArgument(arg, cb) {
Condensed preview — 359 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,958K chars).
[
{
"path": ".editorconfig",
"chars": 284,
"preview": "# This file is for unifying the coding style for different editors and IDEs\n# editorconfig.org\n\nroot = true\n\n[*]\nend_of_"
},
{
"path": ".eslintrc.json",
"chars": 700,
"preview": "{\n \"env\": {\n \"es6\": true,\n \"node\": true\n },\n \"globals\": {},\n \"extends\": \"eslint:recommended\",\n \"overrides\": ["
},
{
"path": ".gitattributes",
"chars": 854,
"preview": "# Set default behaviour, in case users don't have core.autocrlf set.\n* text=auto\n\n# Explicitly declare text files we wan"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 2963,
"preview": "## Contributing\n * Fork the project.\n * Make your feature addition or bug fix.\n * Add documentation if necessary.\n * Add"
},
{
"path": ".github/ISSUE_TEMPLATE/Bug_report.md",
"chars": 1783,
"preview": "---\nname: Bug report\nabout: If you're having an issue with installing node-sass or the compiled results\n look incorrect"
},
{
"path": ".github/ISSUE_TEMPLATE/Feature_request.md",
"chars": 460,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\n\n---\n\n<!--\n\nBefore you request a feature, please reali"
},
{
"path": ".github/dependabot.yml",
"chars": 594,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/alpine.yml",
"chars": 867,
"preview": "name: Build bindings for Alpine releases\n\non:\n push:\n branches-ignore:\n - \"dependabot/**\"\n pull_request:\n\njobs"
},
{
"path": ".github/workflows/coverage.yml",
"chars": 812,
"preview": "name: Coverage\n\non:\n push:\n branches-ignore:\n - \"dependabot/**\"\n paths:\n - \".nycrc.json\"\n - \"**/*."
},
{
"path": ".github/workflows/lint-js.yml",
"chars": 674,
"preview": "name: Lint JS\n\non:\n push:\n branches-ignore:\n - \"dependabot/**\"\n paths:\n - \"**/*.js\"\n - \".eslintrc."
},
{
"path": ".github/workflows/linux.yml",
"chars": 1426,
"preview": "name: Build bindings for Linux releases\n\non:\n push:\n branches-ignore:\n - \"dependabot/**\"\n pull_request:\n\njobs:"
},
{
"path": ".github/workflows/macos.yml",
"chars": 842,
"preview": "name: Build bindings for macOS releases\n\non:\n push:\n branches-ignore:\n - \"dependabot/**\"\n pull_request:\n\njobs:"
},
{
"path": ".github/workflows/windows.yml",
"chars": 1030,
"preview": "name: Build bindings for Windows releases\n\non:\n push:\n branches-ignore:\n - \"dependabot/**\"\n pull_request:\n\njob"
},
{
"path": ".gitignore",
"chars": 218,
"preview": "*.log\n.DS_Store\n.sass-cache\nbuild\nlib-cov\nnode_modules\nvendor\ntest/html-report\ntest/lcov-report\ntest/lcov.info\ntest/fixt"
},
{
"path": ".mailmap",
"chars": 48,
"preview": "Michał Gołębiowski-Owczarek <m.goleb@gmail.com>\n"
},
{
"path": ".nycrc.json",
"chars": 163,
"preview": "{\n \"all\": true,\n \"include\": [\n \"bin/*\",\n \"lib/*.js\",\n \"scripts/**/*.js\"\n ],\n \"extension\": [\n \"node-sass\""
},
{
"path": "CHANGELOG.md",
"chars": 4132,
"preview": "## v4.14.0\n\nhttps://github.com/sass/node-sass/releases/tag/v4.14.0\n\n## v4.13.1\n\nhttps://github.com/sass/node-sass/releas"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 537,
"preview": "Sass is more than a technology; Sass is driven by the community of individuals\nthat power its development and use every "
},
{
"path": "LICENSE",
"chars": 1063,
"preview": "Copyright (c) 2013-2016 Andrew Nesbitt\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of "
},
{
"path": "README.md",
"chars": 25824,
"preview": "# node-sass\n\n**Warning:** [Node Sass has reached end of life]. It will receive no more\nreleases, even for security fixes"
},
{
"path": "TROUBLESHOOTING.md",
"chars": 8076,
"preview": "# Troubleshooting\n\nThis document covers some common node-sass issues and how to resolve them. You\nshould always follow t"
},
{
"path": "appveyor.yml",
"chars": 2336,
"preview": "-\n branches:\n only:\n - release\n - /v\\d\\.\\d\\.\\d/\n except:\n - master\n\n os: Visual Studio 2017\n\n co"
},
{
"path": "bin/node-sass",
"chars": 11568,
"preview": "#!/usr/bin/env node\n\nvar Emitter = require('events').EventEmitter,\n forEach = require('async-foreach').forEach,\n Gaze "
},
{
"path": "binding.gyp",
"chars": 1927,
"preview": "{\n 'variables': {\n 'libsass_ext%': '',\n },\n 'targets': [\n {\n 'target_name': 'binding',\n 'win_delay_"
},
{
"path": "lib/binding.js",
"chars": 388,
"preview": "/*!\n * node-sass: lib/binding.js\n */\n\nvar errors = require('./errors');\n\n/**\n * Require binding\n */\nmodule.exports = fun"
},
{
"path": "lib/errors.js",
"chars": 1335,
"preview": "/*!\n * node-sass: lib/errors.js\n */\n\nvar sass = require('./extensions'),\n pkg = require('../package.json');\n\nfunction h"
},
{
"path": "lib/extensions.js",
"chars": 12430,
"preview": "/*!\n * node-sass: lib/extensions.js\n */\n\nvar eol = require('os').EOL,\n fs = require('fs'),\n path = require('path'),\n "
},
{
"path": "lib/index.js",
"chars": 9800,
"preview": "/*!\n * node-sass: lib/index.js\n */\n\nvar path = require('path'),\n clonedeep = require('lodash/cloneDeep'),\n sass = requ"
},
{
"path": "lib/render.js",
"chars": 3010,
"preview": "/*!\n * node-sass: lib/render.js\n */\n\nvar chalk = require('chalk'),\n fs = require('fs'),\n path = require('path'),\n sas"
},
{
"path": "lib/watcher.js",
"chars": 1822,
"preview": "var grapher = require('sass-graph'),\n clonedeep = require('lodash/cloneDeep'),\n path = require('path'),\n config = {},"
},
{
"path": "memory-tests/_measure.js",
"chars": 234,
"preview": "\"use strict\";\n\nmodule.exports = function iterateAndMeasure(fn, mod = 1000000) {\n let count = 0;\n while (true) {\n co"
},
{
"path": "memory-tests/boolean.js",
"chars": 171,
"preview": "'use strict';\n\nvar types = require('../').types;\nvar iterateAndMeasure = require('./_measure');\n\niterateAndMeasure(funct"
},
{
"path": "memory-tests/function-bridge.js",
"chars": 310,
"preview": "\"use strict\";\n\nvar sass = require(\"../\");\nvar iterateAndMeasure = require('./_measure');\n\niterateAndMeasure(function() {"
},
{
"path": "memory-tests/map.js",
"chars": 325,
"preview": "'use strict';\n\nvar types = require('../').types;\nvar iterateAndMeasure = require('./_measure');\n\niterateAndMeasure(funct"
},
{
"path": "memory-tests/string.js",
"chars": 163,
"preview": "'use strict';\n\nvar types = require('../').types;\nvar iterateAndMeasure = require('./_measure');\n\niterateAndMeasure(funct"
},
{
"path": "package.json",
"chars": 1804,
"preview": "{\n \"name\": \"node-sass\",\n \"version\": \"9.0.0\",\n \"libsass\": \"3.5.5\",\n \"description\": \"Wrapper around libsass\",\n \"licen"
},
{
"path": "scripts/build.js",
"chars": 3328,
"preview": "/*!\n * node-sass: scripts/build.js\n */\n\nvar fs = require('fs'),\n path = require('path'),\n spawn = require('cross-spawn"
},
{
"path": "scripts/install.js",
"chars": 3139,
"preview": "/*!\n * node-sass: scripts/install.js\n */\n\nvar fs = require('fs'),\n eol = require('os').EOL,\n path = require('path'),\n "
},
{
"path": "scripts/prepublish.js",
"chars": 245,
"preview": "/*!\n * node-sass: scripts/install.js\n */\n\nvar path = require('path'),\n rimraf = require('rimraf');\n\nfunction prepublish"
},
{
"path": "scripts/util/downloadoptions.js",
"chars": 560,
"preview": "var proxy = require('./proxy'),\n userAgent = require('./useragent'),\n rejectUnauthorized = require('./rejectUnauthoriz"
},
{
"path": "scripts/util/proxy.js",
"chars": 632,
"preview": "\n/**\n * Determine the proxy settings configured by npm\n *\n * It's possible to configure npm to use a proxy different\n * "
},
{
"path": "scripts/util/rejectUnauthorized.js",
"chars": 1322,
"preview": "var pkg = require('../../package.json');\n\n/**\n * Get the value of a CLI argument\n *\n * @param {String} name\n * @param {A"
},
{
"path": "scripts/util/useragent.js",
"chars": 251,
"preview": "var pkg = require('../../package.json');\n\n/**\n * A custom user agent use for binary downloads.\n *\n * @api private\n */\nmo"
},
{
"path": "src/binding.cpp",
"chars": 13444,
"preview": "#include <nan.h>\n#include <vector>\n#include \"sass_context_wrapper.h\"\n#include \"custom_function_bridge.h\"\n#include \"creat"
},
{
"path": "src/callback_bridge.h",
"chars": 7165,
"preview": "#ifndef CALLBACK_BRIDGE_H\n#define CALLBACK_BRIDGE_H\n\n#include <vector>\n#include <nan.h>\n#include <algorithm>\n#include <u"
},
{
"path": "src/create_string.cpp",
"chars": 438,
"preview": "#include <nan.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"create_string.h\"\n\nchar* create_string(Nan::MaybeLocal"
},
{
"path": "src/create_string.h",
"chars": 124,
"preview": "#ifndef CREATE_STRING_H\n#define CREATE_STRING_H\n\n#include <nan.h>\n\nchar* create_string(Nan::MaybeLocal<v8::Value>);\n\n#en"
},
{
"path": "src/custom_function_bridge.cpp",
"chars": 812,
"preview": "#include <nan.h>\n#include <stdexcept>\n#include \"custom_function_bridge.h\"\n#include \"sass_types/factory.h\"\n#include \"sass"
},
{
"path": "src/custom_function_bridge.h",
"chars": 532,
"preview": "#ifndef CUSTOM_FUNCTION_BRIDGE_H\n#define CUSTOM_FUNCTION_BRIDGE_H\n\n#include <nan.h>\n#include <sass/values.h>\n#include <s"
},
{
"path": "src/custom_importer_bridge.cpp",
"chars": 3566,
"preview": "#include <nan.h>\n#include <stdexcept>\n#include \"custom_importer_bridge.h\"\n#include \"create_string.h\"\n\nSassImportList Cus"
},
{
"path": "src/custom_importer_bridge.h",
"chars": 753,
"preview": "#ifndef CUSTOM_IMPORTER_BRIDGE_H\n#define CUSTOM_IMPORTER_BRIDGE_H\n\n#include <nan.h>\n#include <sass/functions.h>\n#include"
},
{
"path": "src/libsass/.editorconfig",
"chars": 291,
"preview": "# This file is for unifying the coding style for different editors and IDEs\n# editorconfig.org\n\nroot = true\n\n[*]\ncharset"
},
{
"path": "src/libsass/.gitattributes",
"chars": 66,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n"
},
{
"path": "src/libsass/.github/CONTRIBUTING.md",
"chars": 3712,
"preview": "# Contributing to LibSass\n\n:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:\n\nThe following is "
},
{
"path": "src/libsass/.github/ISSUE_TEMPLATE.md",
"chars": 1067,
"preview": "[todo]: # (Title: Be as meaningful as possible)\n[todo]: # (Title: Try to use 60 or less chars)\n\n[todo]: # (This is only "
},
{
"path": "src/libsass/.gitignore",
"chars": 884,
"preview": "# Miscellaneous stuff\n\n/sassc\n/sass-spec\n\nVERSION\n.DS_Store\n.sass-cache\n*.gem\n*.gcno\n.svn/*\n.cproject\n.project\n.settings"
},
{
"path": "src/libsass/.travis.yml",
"chars": 1739,
"preview": "language: cpp\nsudo: false\n\n\n# don't create redundant code coverage reports\n# - AUTOTOOLS=yes COVERAGE=yes BUILD=static\n#"
},
{
"path": "src/libsass/COPYING",
"chars": 1244,
"preview": "\nCopyright (C) 2012 by Hampton Catlin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nt"
},
{
"path": "src/libsass/GNUmakefile.am",
"chars": 1770,
"preview": "ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -I script\n\nAM_COPT = -Wall -O2\nAM_COVLDFLAGS =\n\nif ENABLE_COVERAGE\n\tAM_COPT = -"
},
{
"path": "src/libsass/INSTALL",
"chars": 49,
"preview": "// Autotools requires us to have this file. Boo.\n"
},
{
"path": "src/libsass/LICENSE",
"chars": 1266,
"preview": "\nCopyright (C) 2012-2016 by the Sass Open Source Foundation\n\nPermission is hereby granted, free of charge, to any person"
},
{
"path": "src/libsass/Makefile",
"chars": 8472,
"preview": "OS ?= $(shell uname -s)\nCC ?= gcc\nCXX ?= g++\nRM ?= rm -f\nCP ?= cp -a\nMKDIR ?= mkdir\nRMDI"
},
{
"path": "src/libsass/Makefile.conf",
"chars": 1081,
"preview": "# this is merely a common Makefile multiple implementers can use\n# bigger files (in terms of compile time) tend to go to"
},
{
"path": "src/libsass/Readme.md",
"chars": 5590,
"preview": "LibSass - Sass compiler written in C++\n======================================\n\nCurrently maintained by Marcel Greter ([@"
},
{
"path": "src/libsass/SECURITY.md",
"chars": 370,
"preview": "Serious about security\n======================\n\nThe LibSass team recognizes the important contributions the security rese"
},
{
"path": "src/libsass/appveyor.yml",
"chars": 2739,
"preview": "os: Visual Studio 2013\n\nenvironment:\n CTEST_OUTPUT_ON_FAILURE: 1\n ruby_version: 22-x64\n TargetPath: sassc/bin/sassc.e"
},
{
"path": "src/libsass/configure.ac",
"chars": 4268,
"preview": "# -*- Autoconf -*-\n# Process this file with autoconf to produce a configur"
},
{
"path": "src/libsass/contrib/libsass.spec",
"chars": 1234,
"preview": "Name: libsass\nVersion: %{version}\nRelease: 1%{?dist}\nSummary: A C/C++ implementation of a"
},
{
"path": "src/libsass/contrib/plugin.cpp",
"chars": 2117,
"preview": "#include <cstring>\n#include <iostream>\n#include <stdint.h>\n#include <sass.h>\n\n// gcc: g++ -shared plugin.cpp -o plugin.s"
},
{
"path": "src/libsass/docs/README.md",
"chars": 1596,
"preview": "Welcome to the LibSass documentation!\n\n## First Off\nLibSass is just a library. To run the code locally (i.e. to compile "
},
{
"path": "src/libsass/docs/api-context-example.md",
"chars": 1118,
"preview": "## Example main.c\n\n```C\n#include <stdio.h>\n#include \"sass/context.h\"\n\nint main( int argc, const char* argv[] )\n{\n\n // g"
},
{
"path": "src/libsass/docs/api-context-internal.md",
"chars": 3512,
"preview": "```C\n// Input behaviours\nenum Sass_Input_Style {\n SASS_CONTEXT_NULL,\n SASS_CONTEXT_FILE,\n SASS_CONTEXT_DATA,\n SASS_C"
},
{
"path": "src/libsass/docs/api-context.md",
"chars": 11063,
"preview": "Sass Contexts come in two flavors:\n\n- `Sass_File_Context`\n- `Sass_Data_Context`\n\n### Basic Usage\n\n```C\n#include \"sass/co"
},
{
"path": "src/libsass/docs/api-doc.md",
"chars": 7726,
"preview": "## Introduction\n\nLibSass wouldn't be much good without a way to interface with it. These\ninterface documentations descri"
},
{
"path": "src/libsass/docs/api-function-example.md",
"chars": 2149,
"preview": "## Example main.c\n\n```C\n#include <stdio.h>\n#include <stdint.h>\n#include \"sass/context.h\"\n\nunion Sass_Value* call_fn_foo("
},
{
"path": "src/libsass/docs/api-function-internal.md",
"chars": 164,
"preview": "```C\n// Struct to hold custom function callback\nstruct Sass_Function {\n const char* signature;\n Sass_Function_Fn "
},
{
"path": "src/libsass/docs/api-function.md",
"chars": 3471,
"preview": "Sass functions are used to define new custom functions callable by Sass code. They are also used to overload debug or er"
},
{
"path": "src/libsass/docs/api-importer-example.md",
"chars": 3649,
"preview": "## Example importer.c\n\n```C\n#include <stdio.h>\n#include <string.h>\n#include \"sass/context.h\"\n\nSass_Import_List sass_impo"
},
{
"path": "src/libsass/docs/api-importer-internal.md",
"chars": 421,
"preview": "```C\n// External import entry\nstruct Sass_Import {\n char* imp_path; // path as found in the import statement\n char *ab"
},
{
"path": "src/libsass/docs/api-importer.md",
"chars": 4359,
"preview": "By using custom importers, Sass stylesheets can be implemented in any possible way, such as by being loaded via a remote"
},
{
"path": "src/libsass/docs/api-value-example.md",
"chars": 1405,
"preview": "## Example operation.c\n\n```C\n#include <stdio.h>\n#include <string.h>\n#include \"sass/values.h\"\n\nint main( int argc, const "
},
{
"path": "src/libsass/docs/api-value-internal.md",
"chars": 1273,
"preview": "```C\nstruct Sass_Unknown {\n enum Sass_Tag tag;\n};\n\nstruct Sass_Boolean {\n enum Sass_Tag tag;\n bool value;\n};"
},
{
"path": "src/libsass/docs/api-value.md",
"chars": 6136,
"preview": "`Sass_Values` are used to pass values and their types between the implementer\nand LibSass. Sass knows various different "
},
{
"path": "src/libsass/docs/build-on-darwin.md",
"chars": 792,
"preview": "To install LibSass, make sure the OS X build tools are installed:\n\n xcode-select --install\n\n## Homebrew\n\nTo install h"
},
{
"path": "src/libsass/docs/build-on-gentoo.md",
"chars": 1281,
"preview": "Here are two ebuilds to compile LibSass and sassc on gentoo linux. If you do not know how to use these ebuilds, you shou"
},
{
"path": "src/libsass/docs/build-on-windows.md",
"chars": 4741,
"preview": "We support builds via MingGW and via Visual Studio Community 2013.\nBoth should be considered experimental (MinGW was bet"
},
{
"path": "src/libsass/docs/build-shared-library.md",
"chars": 1418,
"preview": "This page is mostly intended for people that want to build a system library that gets distributed via RPMs or other mean"
},
{
"path": "src/libsass/docs/build-with-autotools.md",
"chars": 2031,
"preview": "### Get the sources\n```bash\n# using git is preferred\ngit clone https://github.com/sass/libsass.git\n# only needed for sas"
},
{
"path": "src/libsass/docs/build-with-makefiles.md",
"chars": 1600,
"preview": "### Get the sources\n```bash\n# using git is preferred\ngit clone https://github.com/sass/libsass.git\n# only needed for sas"
},
{
"path": "src/libsass/docs/build-with-mingw.md",
"chars": 3364,
"preview": "## Building LibSass with MingGW (makefiles)\n\nFirst grab the latest [MinGW for windows][1] installer. Once it is installe"
},
{
"path": "src/libsass/docs/build-with-visual-studio.md",
"chars": 2947,
"preview": "## Building LibSass with Visual Studio\n\n### Requirements:\n\nThe minimum requirement to build LibSass with Visual Studio i"
},
{
"path": "src/libsass/docs/build.md",
"chars": 4845,
"preview": "`libsass` is only a library and does not do much on its own. You need an implementation that you can use from the [comma"
},
{
"path": "src/libsass/docs/compatibility-plan.md",
"chars": 2899,
"preview": "This document is to serve as a living, changing plan for getting LibSass caught up with Ruby Sass.\n\n_Note: an \"s\" precee"
},
{
"path": "src/libsass/docs/contributing.md",
"chars": 1405,
"preview": "First of all, welcome! Thanks for even reading this page. If you're here, you're probably wondering what you can do to h"
},
{
"path": "src/libsass/docs/custom-functions-internal.md",
"chars": 4253,
"preview": "# Developer Documentation\n\nCustom functions are internally represented by `struct Sass_C_Function_Descriptor`.\n\n## Sass_"
},
{
"path": "src/libsass/docs/dev-ast-memory.md",
"chars": 7760,
"preview": "# LibSass smart pointer implementation\n\nLibSass uses smart pointers very similar to `shared_ptr` known\nby Boost or C++11"
},
{
"path": "src/libsass/docs/implementations.md",
"chars": 1986,
"preview": "There are several implementations of `libsass` for a variety of languages. Here are just a few of them. Note, some imple"
},
{
"path": "src/libsass/docs/plugins.md",
"chars": 1915,
"preview": "Plugins are shared object files (.so on *nix and .dll on win) that can be loaded by LibSass on runtime. Currently we onl"
},
{
"path": "src/libsass/docs/setup-environment.md",
"chars": 2457,
"preview": "## Requirements\nIn order to install and setup your local development environment, there are some prerequisites:\n\n* git\n*"
},
{
"path": "src/libsass/docs/source-map-internals.md",
"chars": 2325,
"preview": "This document is mainly intended for developers!\n\n# Documenting some of the source map internals\n\nSince source maps are "
},
{
"path": "src/libsass/docs/trace.md",
"chars": 892,
"preview": "## This is proposed interface in https://github.com/sass/libsass/pull/1288\n\nAdditional debugging macros with low overhea"
},
{
"path": "src/libsass/docs/triage.md",
"chars": 1773,
"preview": "This is an article about how to help with LibSass issues. Issue triage is a fancy word for explaining how we deal with i"
},
{
"path": "src/libsass/docs/unicode.md",
"chars": 5037,
"preview": "LibSass currently expects all input to be utf8 encoded (and outputs only utf8), if you actually have any unicode charact"
},
{
"path": "src/libsass/extconf.rb",
"chars": 157,
"preview": "require 'mkmf'\n# .. more stuff\n#$LIBPATH.push(Config::CONFIG['libdir'])\n$CFLAGS << \" #{ENV[\"CFLAGS\"]}\"\n$LIBS << \" #{ENV["
},
{
"path": "src/libsass/include/sass/base.h",
"chars": 2126,
"preview": "#ifndef SASS_BASE_H\n#define SASS_BASE_H\n\n// #define DEBUG_SHARED_PTR\n\n#ifdef _MSC_VER\n #pragma warning(disable : 4503)\n"
},
{
"path": "src/libsass/include/sass/context.h",
"chars": 10428,
"preview": "#ifndef SASS_C_CONTEXT_H\n#define SASS_C_CONTEXT_H\n\n#include <stddef.h>\n#include <stdbool.h>\n#include <sass/base.h>\n#incl"
},
{
"path": "src/libsass/include/sass/functions.h",
"chars": 6632,
"preview": "#ifndef SASS_C_FUNCTIONS_H\n#define SASS_C_FUNCTIONS_H\n\n#include <stddef.h>\n#include <stdbool.h>\n#include <sass/base.h>\n\n"
},
{
"path": "src/libsass/include/sass/values.h",
"chars": 6489,
"preview": "#ifndef SASS_C_VALUES_H\n#define SASS_C_VALUES_H\n\n#include <stddef.h>\n#include <stdbool.h>\n#include <sass/base.h>\n\n#ifdef"
},
{
"path": "src/libsass/include/sass/version.h",
"chars": 197,
"preview": "#ifndef SASS_VERSION_H\n#define SASS_VERSION_H\n\n#ifndef LIBSASS_VERSION\n#define LIBSASS_VERSION \"[NA]\"\n#endif\n\n#ifndef LI"
},
{
"path": "src/libsass/include/sass/version.h.in",
"chars": 210,
"preview": "#ifndef SASS_VERSION_H\n#define SASS_VERSION_H\n\n#ifndef LIBSASS_VERSION\n#define LIBSASS_VERSION \"@PACKAGE_VERSION@\"\n#endi"
},
{
"path": "src/libsass/include/sass.h",
"chars": 234,
"preview": "#ifndef SASS_H\n#define SASS_H\n\n// #define DEBUG 1\n\n// include API headers\n#include <sass/base.h>\n#include <sass/version."
},
{
"path": "src/libsass/include/sass2scss.h",
"chars": 2518,
"preview": "/**\n * sass2scss\n * Licensed under the MIT License\n * Copyright (c) Marcel Greter\n */\n\n#ifndef SASS2SCSS_H\n#define SASS2"
},
{
"path": "src/libsass/m4/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "src/libsass/m4/m4-ax_cxx_compile_stdcxx_11.m4",
"chars": 5632,
"preview": "# ============================================================================\n# http://www.gnu.org/software/autoconf-a"
},
{
"path": "src/libsass/res/resource.rc",
"chars": 921,
"preview": "#include <windows.h>\n\n// DLL version information.\nVS_VERSION_INFO VERSIONINFO\nFILEVERSION 1,0,0,0\nPRODUCTVERSI"
},
{
"path": "src/libsass/script/bootstrap",
"chars": 299,
"preview": "#!/bin/bash\n\nscript/branding\n\n: ${SASS_SPEC_PATH:=\"sass-spec\"}\n: ${SASS_SASSC_PATH:=\"sassc\" }\n\nif [ ! -d $SASS_SPEC_PATH"
},
{
"path": "src/libsass/script/branding",
"chars": 351,
"preview": "#! /bin/bash\n\necho \" \"\necho \" _ ___ ____ ____ _ ____ ____ \"\necho \"| | "
},
{
"path": "src/libsass/script/ci-build-libsass",
"chars": 4128,
"preview": "#!/bin/bash\n\nset -e\n\nscript/bootstrap\n\n# export this path right here (was in script/spec before)\nexport SASS_LIBSASS_PAT"
},
{
"path": "src/libsass/script/ci-build-plugin",
"chars": 2055,
"preview": "#!/bin/bash\n\nPLUGIN=$1\nRUBY_BIN=ruby\nSASS_SPEC_PATH=sass-spec\nSASSC_BIN=sassc/bin/sassc\nSASS_SPEC_SPEC_DIR=plugins/libsa"
},
{
"path": "src/libsass/script/ci-install-compiler",
"chars": 96,
"preview": "#!/bin/bash\n\ngem install minitest\ngem install minitap\n\npip2 install --user 'requests[security]'\n"
},
{
"path": "src/libsass/script/ci-install-deps",
"chars": 412,
"preview": "#!/bin/bash\nif [ \"x$COVERAGE\" == \"xyes\" ]; then\n pip2 install --user gcovr\n pip2 install --user cpp-coveralls\nelse\n e"
},
{
"path": "src/libsass/script/ci-report-coverage",
"chars": 1465,
"preview": "#!/bin/bash\n\nif [ \"x$COVERAGE\" = \"xyes\" ]; then\n\n # find / -name \"gcovr\"\n # find / -name \"coveralls\"\n # this is only "
},
{
"path": "src/libsass/script/spec",
"chars": 58,
"preview": "#!/bin/bash\n\nscript/bootstrap\n\nmake $MAKE_OPTS test_build\n"
},
{
"path": "src/libsass/script/tap-driver",
"chars": 19521,
"preview": "#!/usr/bin/env sh\n# Copyright (C) 2011-2013 Free Software Foundation, Inc.\n#\n# This program is free software; you can re"
},
{
"path": "src/libsass/script/tap-runner",
"chars": 43,
"preview": "$@ $TEST_FLAGS --tap --silent | tapout tap\n"
},
{
"path": "src/libsass/script/test-leaks.pl",
"chars": 3390,
"preview": "#!/usr/bin/perl\n############################################################\n# this perl script is meant for developers "
},
{
"path": "src/libsass/src/GNUmakefile.am",
"chars": 1275,
"preview": "ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -I script\n\nAM_COPT = -Wall -O2\nAM_COVLDFLAGS =\n\nif ENABLE_COVERAGE\n\tAM_COPT = -"
},
{
"path": "src/libsass/src/ast.cpp",
"chars": 71673,
"preview": "#include \"sass.hpp\"\n#include \"ast.hpp\"\n#include \"context.hpp\"\n#include \"node.hpp\"\n#include \"eval.hpp\"\n#include \"extend.h"
},
{
"path": "src/libsass/src/ast.hpp",
"chars": 102330,
"preview": "#ifndef SASS_AST_H\n#define SASS_AST_H\n\n#include \"sass.hpp\"\n#include <set>\n#include <deque>\n#include <vector>\n#include <s"
},
{
"path": "src/libsass/src/ast_def_macros.hpp",
"chars": 2374,
"preview": "#ifndef SASS_AST_DEF_MACROS_H\n#define SASS_AST_DEF_MACROS_H\n\n// Helper class to switch a flag and revert once we go out "
},
{
"path": "src/libsass/src/ast_fwd_decl.cpp",
"chars": 676,
"preview": "#include \"ast.hpp\"\n\nnamespace Sass {\n\n #define IMPLEMENT_BASE_CAST(T) \\\n template<> \\\n T* Cast(AST_Node* ptr) { \\\n "
},
{
"path": "src/libsass/src/ast_fwd_decl.hpp",
"chars": 15164,
"preview": "#ifndef SASS_AST_FWD_DECL_H\n#define SASS_AST_FWD_DECL_H\n\n#include <map>\n#include <set>\n#include <deque>\n#include <vector"
},
{
"path": "src/libsass/src/b64/cencode.h",
"chars": 725,
"preview": "/*\ncencode.h - c header for a base64 encoding algorithm\n\nThis is part of the libb64 project, and has been placed in the "
},
{
"path": "src/libsass/src/b64/encode.h",
"chars": 1598,
"preview": "// :mode=c++:\n/*\nencode.h - c++ wrapper for a base64 encoding algorithm\n\nThis is part of the libb64 project, and has bee"
},
{
"path": "src/libsass/src/backtrace.cpp",
"chars": 1087,
"preview": "#include \"backtrace.hpp\"\n\nnamespace Sass {\n\n const std::string traces_to_string(Backtraces traces, std::string indent) "
},
{
"path": "src/libsass/src/backtrace.hpp",
"chars": 470,
"preview": "#ifndef SASS_BACKTRACE_H\n#define SASS_BACKTRACE_H\n\n#include <vector>\n#include <sstream>\n#include \"file.hpp\"\n#include \"po"
},
{
"path": "src/libsass/src/base64vlq.cpp",
"chars": 1057,
"preview": "#include \"sass.hpp\"\n#include \"base64vlq.hpp\"\n\nnamespace Sass {\n\n std::string Base64VLQ::encode(const int number) const\n"
},
{
"path": "src/libsass/src/base64vlq.hpp",
"chars": 477,
"preview": "#ifndef SASS_BASE64VLQ_H\n#define SASS_BASE64VLQ_H\n\n#include <string>\n\nnamespace Sass {\n\n class Base64VLQ {\n\n public:\n\n"
},
{
"path": "src/libsass/src/bind.cpp",
"chars": 11946,
"preview": "#include \"sass.hpp\"\n#include \"bind.hpp\"\n#include \"ast.hpp\"\n#include \"context.hpp\"\n#include \"expand.hpp\"\n#include \"eval.h"
},
{
"path": "src/libsass/src/bind.hpp",
"chars": 246,
"preview": "#ifndef SASS_BIND_H\n#define SASS_BIND_H\n\n#include <string>\n#include \"environment.hpp\"\n#include \"ast_fwd_decl.hpp\"\n\nnames"
},
{
"path": "src/libsass/src/c99func.c",
"chars": 1739,
"preview": "/*\n Copyright (C) 2011 Joseph A. Adams (joeyadams3.14159@gmail.com)\n All rights reserved.\n\n Permission is hereby gran"
},
{
"path": "src/libsass/src/cencode.c",
"chars": 2548,
"preview": "/*\ncencoder.c - c source to a base64 encoding algorithm implementation\n\nThis is part of the libb64 project, and has been"
},
{
"path": "src/libsass/src/check_nesting.cpp",
"chars": 10428,
"preview": "#include \"sass.hpp\"\n#include <vector>\n\n#include \"check_nesting.hpp\"\n\nnamespace Sass {\n\n CheckNesting::CheckNesting()\n "
},
{
"path": "src/libsass/src/check_nesting.hpp",
"chars": 1890,
"preview": "#ifndef SASS_CHECK_NESTING_H\n#define SASS_CHECK_NESTING_H\n\n#include \"ast.hpp\"\n#include \"operation.hpp\"\n\nnamespace Sass {"
},
{
"path": "src/libsass/src/color_maps.cpp",
"chars": 32851,
"preview": "#include \"sass.hpp\"\n#include \"ast.hpp\"\n#include \"color_maps.hpp\"\n\nnamespace Sass {\n\n namespace ColorNames\n {\n const"
},
{
"path": "src/libsass/src/color_maps.hpp",
"chars": 10801,
"preview": "\n#ifndef SASS_COLOR_MAPS_H\n#define SASS_COLOR_MAPS_H\n\n#include <map>\n#include \"ast.hpp\"\n\nnamespace Sass {\n\n struct map_"
},
{
"path": "src/libsass/src/constants.cpp",
"chars": 8299,
"preview": "#include \"sass.hpp\"\n#include \"constants.hpp\"\n\nnamespace Sass {\n namespace Constants {\n\n extern const unsigned long M"
},
{
"path": "src/libsass/src/constants.hpp",
"chars": 6143,
"preview": "#ifndef SASS_CONSTANTS_H\n#define SASS_CONSTANTS_H\n\nnamespace Sass {\n namespace Constants {\n\n // The maximum call sta"
},
{
"path": "src/libsass/src/context.cpp",
"chars": 33059,
"preview": "#include \"sass.hpp\"\n#include <string>\n#include <cstdlib>\n#include <cstring>\n#include <iomanip>\n#include <sstream>\n#inclu"
},
{
"path": "src/libsass/src/context.hpp",
"chars": 4999,
"preview": "#ifndef SASS_CONTEXT_H\n#define SASS_CONTEXT_H\n\n#include <string>\n#include <vector>\n#include <map>\n\n#define BUFFERSIZE 25"
},
{
"path": "src/libsass/src/cssize.cpp",
"chars": 18607,
"preview": "#include \"sass.hpp\"\n#include <iostream>\n#include <typeinfo>\n#include <vector>\n\n#include \"cssize.hpp\"\n#include \"context.h"
},
{
"path": "src/libsass/src/cssize.hpp",
"chars": 2432,
"preview": "#ifndef SASS_CSSIZE_H\n#define SASS_CSSIZE_H\n\n#include \"ast.hpp\"\n#include \"context.hpp\"\n#include \"operation.hpp\"\n#include"
},
{
"path": "src/libsass/src/debug.hpp",
"chars": 814,
"preview": "#ifndef SASS_DEBUG_H\n#define SASS_DEBUG_H\n\n#include <stdint.h>\n\n#ifndef UINT32_MAX\n #define UINT32_MAX 0xffffffffU\n#end"
},
{
"path": "src/libsass/src/debugger.hpp",
"chars": 41265,
"preview": "#ifndef SASS_DEBUGGER_H\n#define SASS_DEBUGGER_H\n\n#include <string>\n#include <sstream>\n#include \"node.hpp\"\n#include \"ast_"
},
{
"path": "src/libsass/src/emitter.cpp",
"chars": 7321,
"preview": "#include \"sass.hpp\"\n#include \"util.hpp\"\n#include \"context.hpp\"\n#include \"output.hpp\"\n#include \"emitter.hpp\"\n#include \"ut"
},
{
"path": "src/libsass/src/emitter.hpp",
"chars": 3174,
"preview": "#ifndef SASS_EMITTER_H\n#define SASS_EMITTER_H\n\n#include <string>\n#include \"sass.hpp\"\n#include \"sass/base.h\"\n#include \"so"
},
{
"path": "src/libsass/src/environment.cpp",
"chars": 6583,
"preview": "#include \"sass.hpp\"\n#include \"ast.hpp\"\n#include \"environment.hpp\"\n\nnamespace Sass {\n\n template <typename T>\n Environme"
},
{
"path": "src/libsass/src/environment.hpp",
"chars": 3140,
"preview": "#ifndef SASS_ENVIRONMENT_H\n#define SASS_ENVIRONMENT_H\n\n#include <string>\n#include \"ast_fwd_decl.hpp\"\n#include \"ast_def_m"
},
{
"path": "src/libsass/src/error_handling.cpp",
"chars": 8106,
"preview": "#include \"sass.hpp\"\n#include \"ast.hpp\"\n#include \"prelexer.hpp\"\n#include \"backtrace.hpp\"\n#include \"error_handling.hpp\"\n\n#"
},
{
"path": "src/libsass/src/error_handling.hpp",
"chars": 7129,
"preview": "#ifndef SASS_ERROR_HANDLING_H\n#define SASS_ERROR_HANDLING_H\n\n#include <string>\n#include <sstream>\n#include <stdexcept>\n#"
},
{
"path": "src/libsass/src/eval.cpp",
"chars": 58511,
"preview": "#include \"sass.hpp\"\n#include <cstdlib>\n#include <cmath>\n#include <iostream>\n#include <sstream>\n#include <iomanip>\n#inclu"
},
{
"path": "src/libsass/src/eval.hpp",
"chars": 3582,
"preview": "#ifndef SASS_EVAL_H\n#define SASS_EVAL_H\n\n#include \"ast.hpp\"\n#include \"context.hpp\"\n#include \"listize.hpp\"\n#include \"oper"
},
{
"path": "src/libsass/src/expand.cpp",
"chars": 27434,
"preview": "#include \"sass.hpp\"\n#include <iostream>\n#include <typeinfo>\n\n#include \"ast.hpp\"\n#include \"expand.hpp\"\n#include \"bind.hpp"
},
{
"path": "src/libsass/src/expand.hpp",
"chars": 2318,
"preview": "#ifndef SASS_EXPAND_H\n#define SASS_EXPAND_H\n\n#include <vector>\n\n#include \"ast.hpp\"\n#include \"eval.hpp\"\n#include \"operati"
},
{
"path": "src/libsass/src/extend.cpp",
"chars": 77956,
"preview": "#include \"sass.hpp\"\n#include \"extend.hpp\"\n#include \"context.hpp\"\n#include \"backtrace.hpp\"\n#include \"paths.hpp\"\n#include "
},
{
"path": "src/libsass/src/extend.hpp",
"chars": 2504,
"preview": "#ifndef SASS_EXTEND_H\n#define SASS_EXTEND_H\n\n#include <string>\n#include <set>\n\n#include \"ast.hpp\"\n#include \"node.hpp\"\n#i"
},
{
"path": "src/libsass/src/file.cpp",
"chars": 17593,
"preview": "#include \"sass.hpp\"\n#ifdef _WIN32\n# ifdef __MINGW32__\n# ifndef off64_t\n# define off64_t _off64_t /* Workaround for"
},
{
"path": "src/libsass/src/file.hpp",
"chars": 4057,
"preview": "#ifndef SASS_FILE_H\n#define SASS_FILE_H\n\n#include <string>\n#include <vector>\n\n#include \"sass/context.h\"\n#include \"ast_fw"
},
{
"path": "src/libsass/src/functions.cpp",
"chars": 81492,
"preview": "#include \"sass.hpp\"\n#include \"functions.hpp\"\n#include \"ast.hpp\"\n#include \"context.hpp\"\n#include \"backtrace.hpp\"\n#include"
},
{
"path": "src/libsass/src/functions.hpp",
"chars": 5924,
"preview": "#ifndef SASS_FUNCTIONS_H\n#define SASS_FUNCTIONS_H\n\n#include \"listize.hpp\"\n#include \"position.hpp\"\n#include \"environment."
},
{
"path": "src/libsass/src/inspect.cpp",
"chars": 31216,
"preview": "#include \"sass.hpp\"\n#include <cmath>\n#include <string>\n#include <iostream>\n#include <iomanip>\n#include <stdint.h>\n#inclu"
},
{
"path": "src/libsass/src/inspect.hpp",
"chars": 3871,
"preview": "#ifndef SASS_INSPECT_H\n#define SASS_INSPECT_H\n\n#include \"position.hpp\"\n#include \"operation.hpp\"\n#include \"emitter.hpp\"\n\n"
},
{
"path": "src/libsass/src/json.cpp",
"chars": 32467,
"preview": "/*\n Copyright (C) 2011 Joseph A. Adams (joeyadams3.14159@gmail.com)\n All rights reserved.\n\n Permission is hereby gran"
},
{
"path": "src/libsass/src/json.hpp",
"chars": 3526,
"preview": "/*\n Copyright (C) 2011 Joseph A. Adams (joeyadams3.14159@gmail.com)\n All rights reserved.\n\n Permission is hereby gran"
},
{
"path": "src/libsass/src/kwd_arg_macros.hpp",
"chars": 514,
"preview": "#ifndef SASS_KWD_ARG_MACROS_H\n#define SASS_KWD_ARG_MACROS_H\n\n// Example usage:\n// KWD_ARG_SET(Args) {\n// KWD_ARG(Args,"
},
{
"path": "src/libsass/src/lexer.cpp",
"chars": 6244,
"preview": "#include \"sass.hpp\"\n#include <cctype>\n#include <iostream>\n#include <iomanip>\n#include \"lexer.hpp\"\n#include \"constants.hp"
},
{
"path": "src/libsass/src/lexer.hpp",
"chars": 9484,
"preview": "#ifndef SASS_LEXER_H\n#define SASS_LEXER_H\n\n#include <cstring>\n\nnamespace Sass {\n namespace Prelexer {\n\n //##########"
},
{
"path": "src/libsass/src/listize.cpp",
"chars": 2344,
"preview": "#include \"sass.hpp\"\n#include <iostream>\n#include <typeinfo>\n#include <string>\n\n#include \"listize.hpp\"\n#include \"context."
},
{
"path": "src/libsass/src/listize.hpp",
"chars": 646,
"preview": "#ifndef SASS_LISTIZE_H\n#define SASS_LISTIZE_H\n\n#include <vector>\n#include <iostream>\n\n#include \"ast.hpp\"\n#include \"conte"
},
{
"path": "src/libsass/src/mapping.hpp",
"chars": 361,
"preview": "#ifndef SASS_MAPPING_H\n#define SASS_MAPPING_H\n\n#include \"position.hpp\"\n\nnamespace Sass {\n\n struct Mapping {\n Positio"
},
{
"path": "src/libsass/src/memory/SharedPtr.cpp",
"chars": 2650,
"preview": "#include \"../sass.hpp\"\n#include <iostream>\n#include <typeinfo>\n\n#include \"SharedPtr.hpp\"\n#include \"../ast_fwd_decl.hpp\"\n"
},
{
"path": "src/libsass/src/memory/SharedPtr.hpp",
"chars": 4772,
"preview": "#ifndef SASS_MEMORY_SHARED_PTR_H\n#define SASS_MEMORY_SHARED_PTR_H\n\n#include \"sass/base.h\"\n\n#include <vector>\n\nnamespace "
},
{
"path": "src/libsass/src/node.cpp",
"chars": 10264,
"preview": "#include \"sass.hpp\"\n#include <vector>\n\n#include \"node.hpp\"\n#include \"context.hpp\"\n#include \"parser.hpp\"\n\nnamespace Sass "
},
{
"path": "src/libsass/src/node.hpp",
"chars": 4416,
"preview": "#ifndef SASS_NODE_H\n#define SASS_NODE_H\n\n#include <deque>\n#include <memory>\n\n#include \"ast.hpp\"\n\n\nnamespace Sass {\n\n\n\n\n "
},
{
"path": "src/libsass/src/operation.hpp",
"chars": 11143,
"preview": "#ifndef SASS_OPERATION_H\n#define SASS_OPERATION_H\n\n#include \"ast_fwd_decl.hpp\"\n\nnamespace Sass {\n\n template<typename T>"
},
{
"path": "src/libsass/src/operators.cpp",
"chars": 10313,
"preview": "#include \"sass.hpp\"\n#include \"operators.hpp\"\n\nnamespace Sass {\n\n namespace Operators {\n\n inline double add(double x,"
},
{
"path": "src/libsass/src/operators.hpp",
"chars": 1336,
"preview": "#ifndef SASS_OPERATORS_H\n#define SASS_OPERATORS_H\n\n#include \"values.hpp\"\n#include \"sass/values.h\"\n\nnamespace Sass {\n\n n"
},
{
"path": "src/libsass/src/output.cpp",
"chars": 8976,
"preview": "#include \"sass.hpp\"\n#include \"ast.hpp\"\n#include \"output.hpp\"\n\nnamespace Sass {\n\n Output::Output(Sass_Output_Options& op"
},
{
"path": "src/libsass/src/output.hpp",
"chars": 1285,
"preview": "#ifndef SASS_OUTPUT_H\n#define SASS_OUTPUT_H\n\n#include <string>\n#include <vector>\n\n#include \"util.hpp\"\n#include \"inspect."
},
{
"path": "src/libsass/src/parser.cpp",
"chars": 109288,
"preview": "#include \"sass.hpp\"\n#include \"parser.hpp\"\n#include \"file.hpp\"\n#include \"inspect.hpp\"\n#include \"constants.hpp\"\n#include \""
},
{
"path": "src/libsass/src/parser.hpp",
"chars": 14700,
"preview": "#ifndef SASS_PARSER_H\n#define SASS_PARSER_H\n\n#include <string>\n#include <vector>\n\n#include \"ast.hpp\"\n#include \"position."
},
{
"path": "src/libsass/src/paths.hpp",
"chars": 1608,
"preview": "#ifndef SASS_PATHS_H\n#define SASS_PATHS_H\n\n#include <string>\n#include <vector>\n#include <sstream>\n\n\ntemplate<typename T>"
},
{
"path": "src/libsass/src/plugins.cpp",
"chars": 6169,
"preview": "#include \"sass.hpp\"\n#include <iostream>\n#include \"output.hpp\"\n#include \"plugins.hpp\"\n\n#ifdef _WIN32\n#include <windows.h>"
},
{
"path": "src/libsass/src/plugins.hpp",
"chars": 1517,
"preview": "#ifndef SASS_PLUGINS_H\n#define SASS_PLUGINS_H\n\n#include <string>\n#include <vector>\n#include \"utf8_string.hpp\"\n#include \""
},
{
"path": "src/libsass/src/position.cpp",
"chars": 5191,
"preview": "#include \"sass.hpp\"\n#include \"position.hpp\"\n\nnamespace Sass {\n\n\n Offset::Offset(const char chr)\n : line(chr == '\\n' ? "
},
{
"path": "src/libsass/src/position.hpp",
"chars": 3825,
"preview": "#ifndef SASS_POSITION_H\n#define SASS_POSITION_H\n\n#include <string>\n#include <cstring>\n// #include <iostream>\n\nnamespace "
},
{
"path": "src/libsass/src/prelexer.cpp",
"chars": 48857,
"preview": "#include \"sass.hpp\"\n#include <cctype>\n#include <iostream>\n#include <iomanip>\n#include \"util.hpp\"\n#include \"position.hpp\""
},
{
"path": "src/libsass/src/prelexer.hpp",
"chars": 16436,
"preview": "#ifndef SASS_PRELEXER_H\n#define SASS_PRELEXER_H\n\n#include <cstring>\n#include \"lexer.hpp\"\n\nnamespace Sass {\n // using na"
},
{
"path": "src/libsass/src/remove_placeholders.cpp",
"chars": 2519,
"preview": "#include \"sass.hpp\"\n#include \"remove_placeholders.hpp\"\n#include \"context.hpp\"\n#include \"inspect.hpp\"\n#include <iostream>"
},
{
"path": "src/libsass/src/remove_placeholders.hpp",
"chars": 742,
"preview": "#ifndef SASS_REMOVE_PLACEHOLDERS_H\n#define SASS_REMOVE_PLACEHOLDERS_H\n\n#pragma once\n\n#include \"ast.hpp\"\n#include \"operat"
}
]
// ... and 159 more files (download for full content)
About this extraction
This page contains the full source code of the sass/node-sass GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 359 files (1.8 MB), approximately 487.3k tokens, and a symbol index with 1948 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.