sassc 2.0.1 → 2.1.0.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.gitmodules +1 -1
  4. data/.travis.yml +7 -3
  5. data/CHANGELOG.md +3 -0
  6. data/CODE_OF_CONDUCT.md +1 -1
  7. data/README.md +1 -1
  8. data/Rakefile +23 -8
  9. data/ext/extconf.rb +39 -0
  10. data/ext/libsass/.gitignore +1 -0
  11. data/ext/libsass/GNUmakefile.am +23 -39
  12. data/ext/libsass/Makefile +56 -91
  13. data/ext/libsass/Makefile.conf +16 -2
  14. data/ext/libsass/configure.ac +8 -12
  15. data/ext/libsass/include/sass/base.h +1 -0
  16. data/ext/libsass/include/sass/context.h +1 -1
  17. data/ext/libsass/src/GNUmakefile.am +1 -5
  18. data/ext/libsass/src/ast.cpp +747 -2010
  19. data/ext/libsass/src/ast.hpp +239 -2383
  20. data/ext/libsass/src/{to_c.cpp → ast2c.cpp} +22 -16
  21. data/ext/libsass/src/ast2c.hpp +39 -0
  22. data/ext/libsass/src/ast_def_macros.hpp +62 -10
  23. data/ext/libsass/src/ast_fwd_decl.cpp +1 -0
  24. data/ext/libsass/src/ast_fwd_decl.hpp +43 -165
  25. data/ext/libsass/src/ast_sel_cmp.cpp +909 -0
  26. data/ext/libsass/src/ast_sel_unify.cpp +280 -0
  27. data/ext/libsass/src/ast_selectors.cpp +1475 -0
  28. data/ext/libsass/src/ast_selectors.hpp +568 -0
  29. data/ext/libsass/src/ast_supports.cpp +130 -0
  30. data/ext/libsass/src/ast_supports.hpp +121 -0
  31. data/ext/libsass/src/ast_values.cpp +967 -0
  32. data/ext/libsass/src/ast_values.hpp +489 -0
  33. data/ext/libsass/src/backtrace.cpp +4 -0
  34. data/ext/libsass/src/base64vlq.cpp +3 -0
  35. data/ext/libsass/src/bind.cpp +18 -17
  36. data/ext/libsass/src/bind.hpp +3 -1
  37. data/ext/libsass/src/c2ast.cpp +64 -0
  38. data/ext/libsass/src/c2ast.hpp +14 -0
  39. data/ext/libsass/src/cencode.c +2 -2
  40. data/ext/libsass/src/check_nesting.cpp +52 -56
  41. data/ext/libsass/src/check_nesting.hpp +35 -34
  42. data/ext/libsass/src/color_maps.cpp +156 -153
  43. data/ext/libsass/src/color_maps.hpp +152 -152
  44. data/ext/libsass/src/constants.cpp +15 -0
  45. data/ext/libsass/src/constants.hpp +13 -0
  46. data/ext/libsass/src/context.cpp +24 -14
  47. data/ext/libsass/src/context.hpp +6 -6
  48. data/ext/libsass/src/cssize.cpp +69 -71
  49. data/ext/libsass/src/cssize.hpp +50 -50
  50. data/ext/libsass/src/debugger.hpp +117 -110
  51. data/ext/libsass/src/emitter.cpp +13 -12
  52. data/ext/libsass/src/emitter.hpp +13 -9
  53. data/ext/libsass/src/environment.cpp +15 -1
  54. data/ext/libsass/src/environment.hpp +6 -0
  55. data/ext/libsass/src/error_handling.cpp +36 -59
  56. data/ext/libsass/src/error_handling.hpp +29 -16
  57. data/ext/libsass/src/eval.cpp +302 -323
  58. data/ext/libsass/src/eval.hpp +64 -55
  59. data/ext/libsass/src/expand.cpp +94 -88
  60. data/ext/libsass/src/expand.hpp +33 -37
  61. data/ext/libsass/src/extend.cpp +38 -36
  62. data/ext/libsass/src/extend.hpp +15 -15
  63. data/ext/libsass/src/file.cpp +34 -2
  64. data/ext/libsass/src/fn_colors.cpp +594 -0
  65. data/ext/libsass/src/fn_colors.hpp +85 -0
  66. data/ext/libsass/src/fn_lists.cpp +284 -0
  67. data/ext/libsass/src/fn_lists.hpp +34 -0
  68. data/ext/libsass/src/fn_maps.cpp +94 -0
  69. data/ext/libsass/src/fn_maps.hpp +30 -0
  70. data/ext/libsass/src/fn_miscs.cpp +256 -0
  71. data/ext/libsass/src/fn_miscs.hpp +40 -0
  72. data/ext/libsass/src/fn_numbers.cpp +220 -0
  73. data/ext/libsass/src/fn_numbers.hpp +45 -0
  74. data/ext/libsass/src/fn_selectors.cpp +235 -0
  75. data/ext/libsass/src/fn_selectors.hpp +35 -0
  76. data/ext/libsass/src/fn_strings.cpp +254 -0
  77. data/ext/libsass/src/fn_strings.hpp +34 -0
  78. data/ext/libsass/src/fn_utils.cpp +156 -0
  79. data/ext/libsass/src/fn_utils.hpp +56 -0
  80. data/ext/libsass/src/inspect.cpp +101 -152
  81. data/ext/libsass/src/inspect.hpp +69 -73
  82. data/ext/libsass/src/json.cpp +2 -2
  83. data/ext/libsass/src/lexer.cpp +6 -3
  84. data/ext/libsass/src/listize.cpp +9 -11
  85. data/ext/libsass/src/listize.hpp +11 -7
  86. data/ext/libsass/src/memory/SharedPtr.cpp +2 -83
  87. data/ext/libsass/src/memory/SharedPtr.hpp +127 -143
  88. data/ext/libsass/src/node.cpp +13 -10
  89. data/ext/libsass/src/node.hpp +3 -3
  90. data/ext/libsass/src/operation.hpp +184 -144
  91. data/ext/libsass/src/operators.cpp +43 -17
  92. data/ext/libsass/src/operators.hpp +5 -5
  93. data/ext/libsass/src/output.cpp +21 -18
  94. data/ext/libsass/src/output.hpp +14 -21
  95. data/ext/libsass/src/parser.cpp +215 -183
  96. data/ext/libsass/src/parser.hpp +28 -24
  97. data/ext/libsass/src/plugins.cpp +5 -1
  98. data/ext/libsass/src/position.cpp +3 -0
  99. data/ext/libsass/src/prelexer.cpp +9 -3
  100. data/ext/libsass/src/prelexer.hpp +9 -9
  101. data/ext/libsass/src/remove_placeholders.cpp +14 -11
  102. data/ext/libsass/src/remove_placeholders.hpp +8 -9
  103. data/ext/libsass/src/sass.cpp +9 -3
  104. data/ext/libsass/src/sass.hpp +12 -9
  105. data/ext/libsass/src/sass2scss.cpp +45 -14
  106. data/ext/libsass/src/sass_context.cpp +18 -15
  107. data/ext/libsass/src/sass_functions.cpp +6 -3
  108. data/ext/libsass/src/sass_functions.hpp +1 -1
  109. data/ext/libsass/src/sass_util.cpp +3 -0
  110. data/ext/libsass/src/sass_values.cpp +21 -13
  111. data/ext/libsass/src/source_map.cpp +5 -2
  112. data/ext/libsass/src/source_map.hpp +2 -2
  113. data/ext/libsass/src/subset_map.cpp +4 -1
  114. data/ext/libsass/src/to_value.cpp +23 -21
  115. data/ext/libsass/src/to_value.hpp +18 -22
  116. data/ext/libsass/src/units.cpp +4 -0
  117. data/ext/libsass/src/units.hpp +1 -0
  118. data/ext/libsass/src/utf8/checked.h +12 -10
  119. data/ext/libsass/src/utf8/core.h +3 -0
  120. data/ext/libsass/src/utf8_string.cpp +3 -0
  121. data/ext/libsass/src/util.cpp +67 -75
  122. data/ext/libsass/src/util.hpp +64 -19
  123. data/ext/libsass/src/util_string.cpp +75 -0
  124. data/ext/libsass/src/util_string.hpp +19 -0
  125. data/ext/libsass/src/values.cpp +22 -13
  126. data/ext/libsass/src/values.hpp +2 -2
  127. data/ext/libsass/win/libsass.targets +30 -4
  128. data/ext/libsass/win/libsass.vcxproj.filters +82 -4
  129. data/lib/sassc.rb +24 -0
  130. data/lib/sassc/engine.rb +2 -2
  131. data/lib/sassc/native.rb +8 -1
  132. data/lib/sassc/version.rb +1 -1
  133. data/sassc.gemspec +19 -11
  134. data/test/engine_test.rb +26 -1
  135. data/test/native_test.rb +1 -1
  136. metadata +66 -72
  137. data/ext/Rakefile +0 -3
  138. data/ext/libsass/.github/CONTRIBUTING.md +0 -65
  139. data/ext/libsass/.github/ISSUE_TEMPLATE.md +0 -54
  140. data/ext/libsass/.travis.yml +0 -64
  141. data/ext/libsass/Readme.md +0 -104
  142. data/ext/libsass/SECURITY.md +0 -10
  143. data/ext/libsass/appveyor.yml +0 -91
  144. data/ext/libsass/docs/README.md +0 -20
  145. data/ext/libsass/docs/api-context-example.md +0 -45
  146. data/ext/libsass/docs/api-context-internal.md +0 -163
  147. data/ext/libsass/docs/api-context.md +0 -295
  148. data/ext/libsass/docs/api-doc.md +0 -215
  149. data/ext/libsass/docs/api-function-example.md +0 -67
  150. data/ext/libsass/docs/api-function-internal.md +0 -8
  151. data/ext/libsass/docs/api-function.md +0 -74
  152. data/ext/libsass/docs/api-importer-example.md +0 -112
  153. data/ext/libsass/docs/api-importer-internal.md +0 -20
  154. data/ext/libsass/docs/api-importer.md +0 -86
  155. data/ext/libsass/docs/api-value-example.md +0 -55
  156. data/ext/libsass/docs/api-value-internal.md +0 -76
  157. data/ext/libsass/docs/api-value.md +0 -154
  158. data/ext/libsass/docs/build-on-darwin.md +0 -27
  159. data/ext/libsass/docs/build-on-gentoo.md +0 -55
  160. data/ext/libsass/docs/build-on-windows.md +0 -139
  161. data/ext/libsass/docs/build-shared-library.md +0 -35
  162. data/ext/libsass/docs/build-with-autotools.md +0 -78
  163. data/ext/libsass/docs/build-with-makefiles.md +0 -68
  164. data/ext/libsass/docs/build-with-mingw.md +0 -107
  165. data/ext/libsass/docs/build-with-visual-studio.md +0 -90
  166. data/ext/libsass/docs/build.md +0 -97
  167. data/ext/libsass/docs/compatibility-plan.md +0 -48
  168. data/ext/libsass/docs/contributing.md +0 -17
  169. data/ext/libsass/docs/custom-functions-internal.md +0 -122
  170. data/ext/libsass/docs/dev-ast-memory.md +0 -223
  171. data/ext/libsass/docs/implementations.md +0 -56
  172. data/ext/libsass/docs/plugins.md +0 -47
  173. data/ext/libsass/docs/setup-environment.md +0 -68
  174. data/ext/libsass/docs/source-map-internals.md +0 -51
  175. data/ext/libsass/docs/trace.md +0 -26
  176. data/ext/libsass/docs/triage.md +0 -17
  177. data/ext/libsass/docs/unicode.md +0 -39
  178. data/ext/libsass/extconf.rb +0 -6
  179. data/ext/libsass/script/bootstrap +0 -13
  180. data/ext/libsass/script/branding +0 -10
  181. data/ext/libsass/script/ci-build-libsass +0 -134
  182. data/ext/libsass/script/ci-build-plugin +0 -62
  183. data/ext/libsass/script/ci-install-compiler +0 -6
  184. data/ext/libsass/script/ci-install-deps +0 -20
  185. data/ext/libsass/script/ci-report-coverage +0 -42
  186. data/ext/libsass/script/spec +0 -5
  187. data/ext/libsass/script/tap-driver +0 -652
  188. data/ext/libsass/script/tap-runner +0 -1
  189. data/ext/libsass/script/test-leaks.pl +0 -103
  190. data/ext/libsass/src/functions.cpp +0 -2234
  191. data/ext/libsass/src/functions.hpp +0 -198
  192. data/ext/libsass/src/to_c.hpp +0 -39
  193. data/ext/libsass/test/test_node.cpp +0 -94
  194. data/ext/libsass/test/test_paths.cpp +0 -28
  195. data/ext/libsass/test/test_selector_difference.cpp +0 -25
  196. data/ext/libsass/test/test_specificity.cpp +0 -25
  197. data/ext/libsass/test/test_subset_map.cpp +0 -472
  198. data/ext/libsass/test/test_superselector.cpp +0 -69
  199. data/ext/libsass/test/test_unification.cpp +0 -31
  200. data/lib/tasks/libsass.rb +0 -33
@@ -1,64 +0,0 @@
1
- language: cpp
2
- sudo: false
3
-
4
-
5
- # don't create redundant code coverage reports
6
- # - AUTOTOOLS=yes COVERAGE=yes BUILD=static
7
- # - AUTOTOOLS=no COVERAGE=yes BUILD=shared
8
- # - AUTOTOOLS=no COVERAGE=no BUILD=static
9
-
10
- # further speed up day by day travis-ci builds
11
- # re-enable this if you change the makefiles
12
- # this will still catch all coding errors!
13
- # - AUTOTOOLS=yes COVERAGE=no BUILD=static
14
-
15
- # currenty there are various issues when
16
- # built with coverage, clang and autotools
17
- # - AUTOTOOLS=yes COVERAGE=yes BUILD=shared
18
-
19
- matrix:
20
- include :
21
- - os: linux
22
- compiler: gcc
23
- env: AUTOTOOLS=no COVERAGE=yes BUILD=static
24
- - os: linux
25
- compiler: g++-5
26
- env: AUTOTOOLS=yes COVERAGE=no BUILD=shared
27
- addons:
28
- apt:
29
- sources:
30
- - ubuntu-toolchain-r-test
31
- packages:
32
- - g++-5
33
- - os: linux
34
- compiler: clang++-3.7
35
- env: AUTOTOOLS=no COVERAGE=yes BUILD=static
36
- addons:
37
- apt:
38
- sources:
39
- - ubuntu-toolchain-r-test
40
- - llvm-toolchain-precise-3.7
41
- packages:
42
- - clang-3.7
43
- - os: linux
44
- compiler: clang
45
- env: AUTOTOOLS=yes COVERAGE=no BUILD=shared
46
- - os: osx
47
- compiler: clang
48
- env: AUTOTOOLS=no COVERAGE=no BUILD=shared
49
- - os: osx
50
- compiler: clang
51
- env: AUTOTOOLS=no COVERAGE=yes BUILD=static
52
- - os: osx
53
- compiler: clang
54
- env: AUTOTOOLS=yes COVERAGE=no BUILD=shared
55
-
56
- script:
57
- - ./script/ci-build-libsass
58
- - ./script/ci-build-plugin math
59
- - ./script/ci-build-plugin glob
60
- - ./script/ci-build-plugin digest
61
- - ./script/ci-build-plugin tests
62
- before_install: ./script/ci-install-deps
63
- install: ./script/ci-install-compiler
64
- after_success: ./script/ci-report-coverage
@@ -1,104 +0,0 @@
1
- LibSass - Sass compiler written in C++
2
- ======================================
3
-
4
- Currently maintained by Marcel Greter ([@mgreter]) and Michael Mifsud ([@xzyfer])
5
- Originally created by Aaron Leung ([@akhleung]) and Hampton Catlin ([@hcatlin])
6
-
7
- [![Unix CI](https://travis-ci.org/sass/libsass.svg?branch=master)](https://travis-ci.org/sass/libsass "Travis CI")
8
- [![Windows CI](https://ci.appveyor.com/api/projects/status/github/sass/libsass?svg=true)](https://ci.appveyor.com/project/sass/libsass/branch/master "Appveyor CI")
9
- [![Coverage Status](https://img.shields.io/coveralls/sass/libsass.svg)](https://coveralls.io/r/sass/libsass?branch=feature%2Ftest-travis-ci-3 "Code coverage of spec tests")
10
- [![Percentage of issues still open](http://isitmaintained.com/badge/open/sass/libsass.svg)](http://isitmaintained.com/project/sass/libsass "Percentage of issues still open")
11
- [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/sass/libsass.svg)](http://isitmaintained.com/project/sass/libsass "Average time to resolve an issue")
12
- [![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=283068)](https://www.bountysource.com/trackers/283068-libsass?utm_source=283068&utm_medium=shield&utm_campaign=TRACKER_BADGE "Bountysource")
13
- [![Join us](https://libsass-slack.herokuapp.com/badge.svg)](https://libsass-slack.herokuapp.com/ "Slack communication channels")
14
-
15
-
16
- [LibSass](https://github.com/sass/libsass "LibSass GitHub Project") is just a library!
17
- If you want to use LibSass to compile Sass, you need an implementer. Some
18
- implementations are only bindings into other programming languages. But most also
19
- ship with a command line interface (CLI) you can use directly. There is also
20
- [SassC](https://github.com/sass/sassc), which is the official lightweight
21
- CLI tool built by the same people as LibSass.
22
-
23
- ### Excerpt of "sanctioned" implementations:
24
-
25
- - https://github.com/sass/node-sass (Node.js)
26
- - https://github.com/sass/perl-libsass (Perl)
27
- - https://github.com/sass/libsass-python (Python)
28
- - https://github.com/wellington/go-libsass (Go)
29
- - https://github.com/sass/sassc-ruby (Ruby)
30
- - https://github.com/sass/libsass-net (C#)
31
- - https://github.com/medialize/sass.js (JS)
32
- - https://github.com/bit3/jsass (Java)
33
-
34
- This list does not say anything about the quality of either the listed or not listed [implementations](docs/implementations.md)!
35
- The authors of the listed projects above are just known to work regularly together with LibSass developers.
36
-
37
- About
38
- -----
39
-
40
- LibSass is a C++ port of the original Ruby Sass CSS compiler with a [C API](docs/api-doc.md).
41
- We coded LibSass with portability and efficiency in mind. You can expect LibSass to be a lot
42
- faster than Ruby Sass and on par or faster than the best alternative CSS compilers around.
43
-
44
- Developing
45
- ----------
46
-
47
- As noted above, the LibSass repository does not contain any binaries or other way to execute
48
- LibSass. Therefore, you need an implementer to develop LibSass. Easiest is to start with
49
- the official [SassC](http://github.com/sass/sassc) CLI wrapper. It is *guaranteed* to compile
50
- with the latest code in LibSass master, since it is also used in the CI process. There is no
51
- limitation here, as you may use any other LibSass implementer to test your LibSass branch!
52
-
53
- Testing
54
- -------
55
-
56
- Since LibSass is a pure library, tests are run through the [Sass-Spec](https://github.com/sass/sass-spec)
57
- project using the [SassC](http://github.com/sass/sassc) CLI wrapper. To run the tests against LibSass while
58
- developing, you can run `./script/spec`. This will clone SassC and Sass-Spec under the project folder and
59
- then run the Sass-Spec test suite. You may want to update the clones to ensure you have the latest version.
60
- Note that the scripts in the `./script` folder are mainly intended for our CI needs.
61
-
62
- Building
63
- --------
64
-
65
- To build LibSass you need GCC 4.6+ or Clang/LLVM. If your OS is older, you may need to upgrade
66
- them first (or install clang as an alternative). On Windows, you need MinGW with GCC 4.6+ or VS 2013
67
- Update 4+. It is also possible to build LibSass with Clang/LLVM on Windows with various build chains
68
- and/or command line interpreters.
69
-
70
- See the [build docs for further instructions](docs/build.md)!
71
-
72
- Compatibility
73
- -------------
74
-
75
- Current LibSass 3.4 should be compatible with Sass 3.4. Please refer to the [sass compatibility
76
- page](http://sass-compatibility.github.io/) for a more detailed comparison. But note that there
77
- are still a few incomplete edges which we are aware of. Otherwise LibSass has reached a good level
78
- of stability, thanks to our ever growing [Sass-Spec test suite](https://github.com/sass/sass-spec).
79
-
80
- About Sass
81
- ----------
82
-
83
- Sass is a CSS pre-processor language to add on exciting, new, awesome features to CSS. Sass was
84
- the first language of its kind and by far the most mature and up to date codebase.
85
-
86
- Sass was originally conceived of by the co-creator of this library, Hampton Catlin ([@hcatlin]).
87
- Most of the language has been the result of years of work by Natalie Weizenbaum ([@nex3]) and
88
- Chris Eppstein ([@chriseppstein]).
89
-
90
- For more information about Sass itself, please visit http://sass-lang.com
91
-
92
- Initial development of LibSass by Aaron Leung and Hampton Catlin was supported by [Moovweb](http://www.moovweb.com).
93
-
94
- Licensing
95
- ---------
96
-
97
- Our [MIT license](LICENSE) is designed to be as simple and liberal as possible.
98
-
99
- [@hcatlin]: https://github.com/hcatlin
100
- [@akhleung]: https://github.com/akhleung
101
- [@chriseppstein]: https://github.com/chriseppstein
102
- [@nex3]: https://github.com/nex3
103
- [@mgreter]: https://github.com/mgreter
104
- [@xzyfer]: https://github.com/xzyfer
@@ -1,10 +0,0 @@
1
- Serious about security
2
- ======================
3
-
4
- The LibSass team recognizes the important contributions the security research
5
- community can make. We therefore encourage reporting security issues with the
6
- code contained in this repository.
7
-
8
- If you believe you have discovered a security vulnerability, please report it at
9
- https://hackerone.com/libsass instead of GitHub.
10
-
@@ -1,91 +0,0 @@
1
- os: Visual Studio 2013
2
-
3
- environment:
4
- CTEST_OUTPUT_ON_FAILURE: 1
5
- ruby_version: 22-x64
6
- TargetPath: sassc/bin/sassc.exe
7
- matrix:
8
- - Compiler: msvc
9
- Config: Release
10
- Platform: Win32
11
- - Compiler: msvc
12
- Config: Debug
13
- Platform: Win32
14
- - Compiler: msvc
15
- Config: Release
16
- Platform: Win64
17
- - Compiler: mingw
18
- Build: static
19
- - Compiler: mingw
20
- Build: shared
21
-
22
- cache:
23
- - C:\Ruby%ruby_version%\lib\ruby\gems
24
- - C:\mingw64
25
-
26
- install:
27
- - git clone https://github.com/sass/sassc.git
28
- - git clone https://github.com/sass/sass-spec.git
29
- - set PATH=C:\Ruby%ruby_version%\bin;%PATH%
30
- - ps: |
31
- if(!(gem which minitest 2>$nul)) { gem install minitest --no-ri --no-rdoc }
32
- if ($env:Compiler -eq "mingw" -AND -Not (Test-Path "C:\mingw64")) {
33
- # Install MinGW.
34
- $file = "x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z"
35
- wget https://bintray.com/artifact/download/drewwells/generic/$file -OutFile $file
36
- &7z x -oC:\ $file > $null
37
- }
38
- - set PATH=C:\mingw64\bin;%PATH%
39
- - set CC=gcc
40
-
41
- build_script:
42
- - ps: |
43
- if ($env:Compiler -eq "mingw") {
44
- mingw32-make -j4 sassc
45
- } else {
46
- msbuild /m:4 /p:"Configuration=$env:Config;Platform=$env:Platform" sassc\win\sassc.sln
47
- }
48
-
49
- # print the branding art
50
- mv script/branding script/branding.ps1
51
- script/branding.ps1
52
-
53
- # print the version info
54
- &$env:TargetPath -v
55
- ruby -v
56
-
57
- test_script:
58
- - ps: |
59
- $PRNR = $env:APPVEYOR_PULL_REQUEST_NUMBER
60
- if ($PRNR) {
61
- echo "Fetching info for PR $PRNR"
62
- wget https://api.github.com/repos/sass/libsass/pulls/$PRNR -OutFile pr.json
63
- $json = cat pr.json -Raw
64
- $SPEC_PR = [regex]::match($json,'sass\/sass-spec(#|\/pull\/)([0-9]+)').Groups[2].Value
65
- if ($SPEC_PR) {
66
- echo "Checkout sass spec PR $SPEC_PR"
67
- git -C sass-spec fetch -q -u origin pull/$SPEC_PR/head:ci-spec-pr-$SPEC_PR
68
- git -C sass-spec checkout -q --force ci-spec-pr-$SPEC_PR
69
- }
70
- }
71
- $env:TargetPath = Join-Path $pwd.Path $env:TargetPath
72
- If (Test-Path "$env:TargetPath") {
73
- ruby sass-spec/sass-spec.rb -V 3.5 --probe-todo --impl libsass -c $env:TargetPath -s sass-spec/spec
74
- if(-not($?)) {
75
- echo "sass-spec tests failed"
76
- exit 1
77
- }
78
- } else {
79
- echo "spec runner not found (compile error?)"
80
- exit 1
81
- }
82
- Write-Host "Explicitly testing the case when cwd has Cyrillic characters: " -nonewline
83
- # See comments in gh-1774 for details.
84
- cd sass-spec/spec/libsass/Sáss-UŢF8/
85
- &$env:TargetPath ./input.scss 2>&1>$null
86
- if(-not($?)) {
87
- echo "Failed!"
88
- exit 1
89
- } else {
90
- echo "Success!"
91
- }
@@ -1,20 +0,0 @@
1
- Welcome to the LibSass documentation!
2
-
3
- ## First Off
4
- LibSass is just a library. To run the code locally (i.e. to compile your stylesheets), you need an implementer. SassC (get it?) is an implementer written in C. There are a number of other implementations of LibSass - for example Node. We encourage you to write your own port - the whole point of LibSass is that we want to bring Sass to many other languages, not just Ruby!
5
-
6
- We're working hard on moving to full parity with Ruby Sass... learn more at the [The-LibSass-Compatibility-Plan](compatibility-plan.md)!
7
-
8
- ### Implementing LibSass
9
-
10
- If you're interested in implementing LibSass in your own project see the [API Documentation](api-doc.md) which now includes implementing
11
- your own [Sass functions](api-function.md). You may wish to [look at other implementations](implementations.md) for your language of choice.
12
- Or make your own!
13
-
14
- ### Contributing to LibSass
15
-
16
- | Issue Tracker | Issue Triage | Community Guidelines |
17
- |-------------------|----------------------------------|-----------------------------|
18
- | We're always needing help, so check out our issue tracker, help some people out, and read our article on [Contributing](contributing.md)! It's got all the details on what to do! | To help understand the process of triaging bugs, have a look at our [Issue-Triage](triage.md) document. | Oh, and don't forget we always follow [[Sass Community Guidelines|http://sass-lang.com/community-guidelines]]. Be nice and everyone else will be nice too! |
19
-
20
- Please refer to the steps on [Building LibSass](build.md)
@@ -1,45 +0,0 @@
1
- ## Example main.c
2
-
3
- ```C
4
- #include <stdio.h>
5
- #include "sass/context.h"
6
-
7
- int main( int argc, const char* argv[] )
8
- {
9
-
10
- // get the input file from first argument or use default
11
- const char* input = argc > 1 ? argv[1] : "styles.scss";
12
-
13
- // create the file context and get all related structs
14
- struct Sass_File_Context* file_ctx = sass_make_file_context(input);
15
- struct Sass_Context* ctx = sass_file_context_get_context(file_ctx);
16
- struct Sass_Options* ctx_opt = sass_context_get_options(ctx);
17
-
18
- // configure some options ...
19
- sass_option_set_precision(ctx_opt, 10);
20
-
21
- // context is set up, call the compile step now
22
- int status = sass_compile_file_context(file_ctx);
23
-
24
- // print the result or the error to the stdout
25
- if (status == 0) puts(sass_context_get_output_string(ctx));
26
- else puts(sass_context_get_error_message(ctx));
27
-
28
- // release allocated memory
29
- sass_delete_file_context(file_ctx);
30
-
31
- // exit status
32
- return status;
33
-
34
- }
35
- ```
36
-
37
- ### Compile main.c
38
-
39
- ```bash
40
- gcc -c main.c -o main.o
41
- gcc -o sample main.o -lsass
42
- echo "foo { margin: 21px * 2; }" > foo.scss
43
- ./sample foo.scss => "foo { margin: 42px }"
44
- ```
45
-
@@ -1,163 +0,0 @@
1
- ```C
2
- // Input behaviours
3
- enum Sass_Input_Style {
4
- SASS_CONTEXT_NULL,
5
- SASS_CONTEXT_FILE,
6
- SASS_CONTEXT_DATA,
7
- SASS_CONTEXT_FOLDER
8
- };
9
-
10
- // sass config options structure
11
- struct Sass_Inspect_Options {
12
-
13
- // Output style for the generated css code
14
- // A value from above SASS_STYLE_* constants
15
- enum Sass_Output_Style output_style;
16
-
17
- // Precision for fractional numbers
18
- int precision;
19
-
20
- };
21
-
22
- // sass config options structure
23
- struct Sass_Output_Options : Sass_Inspect_Options {
24
-
25
- // String to be used for indentation
26
- const char* indent;
27
- // String to be used to for line feeds
28
- const char* linefeed;
29
-
30
- // Emit comments in the generated CSS indicating
31
- // the corresponding source line.
32
- bool source_comments;
33
-
34
- };
35
-
36
- // sass config options structure
37
- struct Sass_Options : Sass_Output_Options {
38
-
39
- // embed sourceMappingUrl as data uri
40
- bool source_map_embed;
41
-
42
- // embed include contents in maps
43
- bool source_map_contents;
44
-
45
- // create file urls for sources
46
- bool source_map_file_urls;
47
-
48
- // Disable sourceMappingUrl in css output
49
- bool omit_source_map_url;
50
-
51
- // Treat source_string as sass (as opposed to scss)
52
- bool is_indented_syntax_src;
53
-
54
- // The input path is used for source map
55
- // generation. It can be used to define
56
- // something with string compilation or to
57
- // overload the input file path. It is
58
- // set to "stdin" for data contexts and
59
- // to the input file on file contexts.
60
- char* input_path;
61
-
62
- // The output path is used for source map
63
- // generation. LibSass will not write to
64
- // this file, it is just used to create
65
- // information in source-maps etc.
66
- char* output_path;
67
-
68
- // Colon-separated list of paths
69
- // Semicolon-separated on Windows
70
- // Maybe use array interface instead?
71
- char* include_path;
72
- char* plugin_path;
73
-
74
- // Include paths (linked string list)
75
- struct string_list* include_paths;
76
- // Plugin paths (linked string list)
77
- struct string_list* plugin_paths;
78
-
79
- // Path to source map file
80
- // Enables source map generation
81
- // Used to create sourceMappingUrl
82
- char* source_map_file;
83
-
84
- // Directly inserted in source maps
85
- char* source_map_root;
86
-
87
- // Custom functions that can be called from sccs code
88
- Sass_Function_List c_functions;
89
-
90
- // Callback to overload imports
91
- Sass_Importer_List c_importers;
92
-
93
- // List of custom headers
94
- Sass_Importer_List c_headers;
95
-
96
- };
97
-
98
- // base for all contexts
99
- struct Sass_Context : Sass_Options
100
- {
101
-
102
- // store context type info
103
- enum Sass_Input_Style type;
104
-
105
- // generated output data
106
- char* output_string;
107
-
108
- // generated source map json
109
- char* source_map_string;
110
-
111
- // error status
112
- int error_status;
113
- char* error_json;
114
- char* error_text;
115
- char* error_message;
116
- // error position
117
- char* error_file;
118
- size_t error_line;
119
- size_t error_column;
120
- const char* error_src;
121
-
122
- // report imported files
123
- char** included_files;
124
-
125
- };
126
-
127
- // struct for file compilation
128
- struct Sass_File_Context : Sass_Context {
129
-
130
- // no additional fields required
131
- // input_path is already on options
132
-
133
- };
134
-
135
- // struct for data compilation
136
- struct Sass_Data_Context : Sass_Context {
137
-
138
- // provided source string
139
- char* source_string;
140
- char* srcmap_string;
141
-
142
- };
143
-
144
- // Compiler states
145
- enum Sass_Compiler_State {
146
- SASS_COMPILER_CREATED,
147
- SASS_COMPILER_PARSED,
148
- SASS_COMPILER_EXECUTED
149
- };
150
-
151
- // link c and cpp context
152
- struct Sass_Compiler {
153
- // progress status
154
- Sass_Compiler_State state;
155
- // original c context
156
- Sass_Context* c_ctx;
157
- // Sass::Context
158
- Sass::Context* cpp_ctx;
159
- // Sass::Block
160
- Sass::Block_Obj root;
161
- };
162
- ```
163
-