less 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +4 -0
  3. data/Gemfile +1 -1
  4. data/less.gemspec +1 -1
  5. data/lib/less/defaults.rb +3 -3
  6. data/lib/less/java_script/v8_context.rb +1 -1
  7. data/lib/less/js/.gitattributes +3 -2
  8. data/lib/less/js/.gitignore +18 -2
  9. data/lib/less/js/.jshintrc +11 -0
  10. data/lib/less/js/CHANGELOG.md +87 -2
  11. data/lib/less/js/CONTRIBUTING.md +4 -3
  12. data/lib/less/js/Gruntfile.js +290 -0
  13. data/lib/less/js/README.md +342 -12
  14. data/lib/less/js/benchmark/benchmark.less +194 -194
  15. data/lib/less/js/benchmark/less-benchmark.js +9 -10
  16. data/lib/less/js/bin/lessc +154 -12
  17. data/lib/less/js/bower.json +18 -0
  18. data/lib/less/js/build.gradle +347 -0
  19. data/lib/less/js/build/README.md +350 -0
  20. data/lib/less/js/build/browser-header.js +4 -0
  21. data/lib/less/js/build/build.yml +160 -0
  22. data/lib/less/js/build/require-rhino.js +7 -2
  23. data/lib/less/js/build/rhino-header.js +4 -0
  24. data/lib/less/js/build/rhino-modules.js +131 -0
  25. data/lib/less/js/build/tasks/.gitkeep +1 -0
  26. data/lib/less/js/dist/less-1.5.0.js +6914 -0
  27. data/lib/less/js/dist/less-1.5.0.min.js +13 -0
  28. data/lib/less/js/dist/less-1.5.1.js +6941 -0
  29. data/lib/less/js/dist/less-1.5.1.min.js +13 -0
  30. data/lib/less/js/dist/less-1.6.0.js +7485 -0
  31. data/lib/less/js/dist/less-1.6.0.min.js +16 -0
  32. data/lib/less/js/dist/less-1.6.1.js +7513 -0
  33. data/lib/less/js/dist/less-1.6.1.min.js +16 -0
  34. data/lib/less/js/dist/less-1.6.2.js +7624 -0
  35. data/lib/less/js/dist/less-1.6.2.min.js +16 -0
  36. data/lib/less/js/dist/less-rhino-1.5.1.js +6831 -0
  37. data/lib/less/js/dist/less-rhino-1.6.2.js +9017 -0
  38. data/lib/less/js/dist/lessc-rhino-1.6.2.js +449 -0
  39. data/lib/less/js/gradle/wrapper/gradle-wrapper.jar +0 -0
  40. data/lib/less/js/gradle/wrapper/gradle-wrapper.properties +6 -0
  41. data/lib/less/js/gradlew +164 -0
  42. data/lib/less/js/gradlew.bat +90 -0
  43. data/lib/less/js/lib/less/browser.js +482 -367
  44. data/lib/less/js/lib/less/colors.js +0 -1
  45. data/lib/less/js/lib/less/encoder.js +4 -0
  46. data/lib/less/js/lib/less/env.js +50 -19
  47. data/lib/less/js/lib/less/extend-visitor.js +66 -41
  48. data/lib/less/js/lib/less/functions.js +309 -104
  49. data/lib/less/js/lib/less/import-visitor.js +21 -10
  50. data/lib/less/js/lib/less/index.js +90 -68
  51. data/lib/less/js/lib/less/join-selector-visitor.js +11 -4
  52. data/lib/less/js/lib/less/lessc_helper.js +56 -45
  53. data/lib/less/js/lib/less/parser.js +830 -460
  54. data/lib/less/js/lib/less/rhino.js +380 -58
  55. data/lib/less/js/lib/less/source-map-output.js +141 -0
  56. data/lib/less/js/lib/less/to-css-visitor.js +215 -0
  57. data/lib/less/js/lib/less/tree.js +57 -5
  58. data/lib/less/js/lib/less/tree/alpha.js +13 -5
  59. data/lib/less/js/lib/less/tree/anonymous.js +11 -5
  60. data/lib/less/js/lib/less/tree/assignment.js +11 -5
  61. data/lib/less/js/lib/less/tree/call.js +19 -8
  62. data/lib/less/js/lib/less/tree/color.js +59 -36
  63. data/lib/less/js/lib/less/tree/comment.js +17 -4
  64. data/lib/less/js/lib/less/tree/condition.js +3 -3
  65. data/lib/less/js/lib/less/tree/dimension.js +161 -153
  66. data/lib/less/js/lib/less/tree/directive.js +39 -18
  67. data/lib/less/js/lib/less/tree/element.js +41 -18
  68. data/lib/less/js/lib/less/tree/expression.js +11 -5
  69. data/lib/less/js/lib/less/tree/extend.js +11 -1
  70. data/lib/less/js/lib/less/tree/import.js +34 -20
  71. data/lib/less/js/lib/less/tree/javascript.js +16 -10
  72. data/lib/less/js/lib/less/tree/keyword.js +5 -2
  73. data/lib/less/js/lib/less/tree/media.js +39 -22
  74. data/lib/less/js/lib/less/tree/mixin.js +135 -56
  75. data/lib/less/js/lib/less/tree/negative.js +4 -2
  76. data/lib/less/js/lib/less/tree/operation.js +17 -12
  77. data/lib/less/js/lib/less/tree/paren.js +5 -2
  78. data/lib/less/js/lib/less/tree/quoted.js +9 -6
  79. data/lib/less/js/lib/less/tree/rule.js +39 -21
  80. data/lib/less/js/lib/less/tree/ruleset.js +229 -145
  81. data/lib/less/js/lib/less/tree/selector.js +101 -34
  82. data/lib/less/js/lib/less/tree/unicode-descriptor.js +4 -3
  83. data/lib/less/js/lib/less/tree/url.js +33 -11
  84. data/lib/less/js/lib/less/tree/value.js +13 -6
  85. data/lib/less/js/lib/less/tree/variable.js +13 -8
  86. data/lib/less/js/lib/less/visitor.js +117 -25
  87. data/lib/less/js/lib/source-map/source-map-0.1.31.js +1933 -0
  88. data/lib/less/js/lib/source-map/source-map-footer.js +4 -0
  89. data/lib/less/js/lib/source-map/source-map-header.js +3 -0
  90. data/lib/less/js/package.json +30 -15
  91. data/lib/less/js/test/browser/common.js +131 -56
  92. data/lib/less/js/test/browser/css/global-vars/simple.css +3 -0
  93. data/lib/less/js/test/browser/css/modify-vars/simple.css +8 -0
  94. data/lib/less/js/test/browser/css/relative-urls/urls.css +8 -9
  95. data/lib/less/js/test/browser/css/rootpath-relative/urls.css +0 -1
  96. data/lib/less/js/test/browser/css/rootpath/urls.css +0 -1
  97. data/lib/less/js/test/browser/css/urls.css +18 -14
  98. data/lib/less/js/test/browser/es5.js +27 -0
  99. data/lib/less/js/test/{less/errors/color-operation-error.less → browser/less/console-errors/test-error.less} +0 -0
  100. data/lib/less/js/test/browser/less/console-errors/test-error.txt +2 -0
  101. data/lib/less/js/test/browser/less/global-vars/simple.less +3 -0
  102. data/lib/less/js/test/browser/less/modify-vars/imports/simple2.less +4 -0
  103. data/lib/less/js/test/browser/less/modify-vars/simple.less +8 -0
  104. data/lib/less/js/test/browser/less/relative-urls/urls.less +1 -1
  105. data/lib/less/js/test/browser/less/rootpath-relative/urls.less +1 -1
  106. data/lib/less/js/test/browser/less/rootpath/urls.less +1 -1
  107. data/lib/less/js/test/browser/less/urls.less +9 -1
  108. data/lib/less/js/test/browser/phantom-runner.js +112 -103
  109. data/lib/less/js/test/browser/runner-browser-options.js +42 -0
  110. data/lib/less/js/test/browser/{runner-browser.js → runner-browser-spec.js} +7 -2
  111. data/lib/less/js/test/browser/runner-console-errors.js +5 -0
  112. data/lib/less/js/test/browser/runner-errors-options.js +5 -0
  113. data/lib/less/js/test/browser/runner-errors-spec.js +4 -0
  114. data/lib/less/js/test/browser/runner-global-vars-options.js +4 -0
  115. data/lib/less/js/test/browser/runner-global-vars-spec.js +3 -0
  116. data/lib/less/js/test/browser/runner-legacy-options.js +4 -0
  117. data/lib/less/js/test/browser/{runner-legacy.js → runner-legacy-spec.js} +1 -4
  118. data/lib/less/js/test/browser/runner-main-options.js +15 -0
  119. data/lib/less/js/test/browser/runner-main-spec.js +3 -0
  120. data/lib/less/js/test/browser/runner-modify-vars-options.js +2 -0
  121. data/lib/less/js/test/browser/runner-modify-vars-spec.js +43 -0
  122. data/lib/less/js/test/browser/runner-no-js-errors-options.js +4 -0
  123. data/lib/less/js/test/browser/runner-no-js-errors-spec.js +4 -0
  124. data/lib/less/js/test/browser/runner-production-options.js +3 -0
  125. data/lib/less/js/test/browser/{runner-production.js → runner-production-spec.js} +1 -3
  126. data/lib/less/js/test/browser/runner-relative-urls-options.js +3 -0
  127. data/lib/less/js/test/browser/{runner-relative-urls.js → runner-relative-urls-spec.js} +1 -2
  128. data/lib/less/js/test/browser/runner-rootpath-options.js +3 -0
  129. data/lib/less/js/test/browser/runner-rootpath-relative-options.js +4 -0
  130. data/lib/less/js/test/browser/{runner-rootpath-relative.js → runner-rootpath-relative-spec.js} +1 -3
  131. data/lib/less/js/test/browser/{runner-rootpath.js → runner-rootpath-spec.js} +1 -2
  132. data/lib/less/js/test/browser/test-runner-template.tmpl +47 -0
  133. data/lib/less/js/test/css/colors.css +7 -0
  134. data/lib/less/js/test/css/comments.css +9 -4
  135. data/lib/less/js/test/css/compression/compression.css +3 -2
  136. data/lib/less/js/test/css/css-3.css +17 -5
  137. data/lib/less/js/test/css/css-guards.css +37 -0
  138. data/lib/less/js/test/css/debug/linenumbers-all.css +6 -0
  139. data/lib/less/js/test/css/debug/linenumbers-comments.css +5 -0
  140. data/lib/less/js/test/css/debug/linenumbers-mediaquery.css +5 -0
  141. data/lib/less/js/test/css/empty.css +0 -0
  142. data/lib/less/js/test/css/extend-chaining.css +9 -0
  143. data/lib/less/js/test/css/extend-selector.css +10 -2
  144. data/lib/less/js/test/css/extract-and-length.css +133 -0
  145. data/lib/less/js/test/css/functions.css +23 -10
  146. data/lib/less/js/test/css/globalVars/extended.css +12 -0
  147. data/lib/less/js/test/css/globalVars/simple.css +6 -0
  148. data/lib/less/js/test/css/import-inline.css +5 -0
  149. data/lib/less/js/test/css/import-once.css +12 -0
  150. data/lib/less/js/test/css/import-reference.css +49 -0
  151. data/lib/less/js/test/css/import.css +0 -2
  152. data/lib/less/js/test/css/media.css +21 -5
  153. data/lib/less/js/test/css/merge.css +26 -0
  154. data/lib/less/js/test/css/mixins-guards-default-func.css +129 -0
  155. data/lib/less/js/test/css/mixins-guards.css +6 -0
  156. data/lib/less/js/test/css/mixins-important.css +7 -0
  157. data/lib/less/js/test/css/mixins-interpolated.css +39 -0
  158. data/lib/less/js/test/css/mixins.css +20 -0
  159. data/lib/less/js/test/css/modifyVars/extended.css +9 -0
  160. data/lib/less/js/test/css/no-output.css +0 -0
  161. data/lib/less/js/test/css/parens.css +3 -0
  162. data/lib/less/js/test/css/property-name-interp.css +20 -0
  163. data/lib/less/js/test/css/selectors.css +12 -0
  164. data/lib/less/js/test/css/static-urls/urls.css +7 -4
  165. data/lib/less/js/test/css/strings.css +3 -0
  166. data/lib/less/js/test/css/url-args/urls.css +56 -0
  167. data/lib/less/js/test/css/urls.css +21 -9
  168. data/lib/less/js/test/index.js +45 -0
  169. data/lib/less/js/test/less-test.js +234 -191
  170. data/lib/less/js/test/less/colors.less +6 -0
  171. data/lib/less/js/test/less/comments.less +7 -1
  172. data/lib/less/js/test/less/compression/compression.less +21 -1
  173. data/lib/less/js/test/less/css-3.less +12 -0
  174. data/lib/less/js/test/less/css-guards.less +99 -0
  175. data/lib/less/js/test/less/debug/linenumbers.less +11 -1
  176. data/lib/less/js/test/less/empty.less +0 -0
  177. data/lib/less/js/test/less/errors/add-mixed-units.txt +4 -2
  178. data/lib/less/js/test/less/errors/add-mixed-units2.txt +4 -2
  179. data/lib/less/js/test/less/errors/color-func-invalid-color.less +3 -0
  180. data/lib/less/js/test/less/errors/color-func-invalid-color.txt +4 -0
  181. data/lib/less/js/test/less/errors/css-guard-default-func.less +4 -0
  182. data/lib/less/js/test/less/errors/css-guard-default-func.txt +4 -0
  183. data/lib/less/js/test/less/errors/import-subfolder2.txt +4 -2
  184. data/lib/less/js/test/less/errors/javascript-undefined-var.less +3 -0
  185. data/lib/less/js/test/less/errors/javascript-undefined-var.txt +4 -0
  186. data/lib/less/js/test/less/errors/mixins-guards-default-func-1.less +9 -0
  187. data/lib/less/js/test/less/errors/mixins-guards-default-func-1.txt +4 -0
  188. data/lib/less/js/test/less/errors/mixins-guards-default-func-2.less +9 -0
  189. data/lib/less/js/test/less/errors/mixins-guards-default-func-2.txt +4 -0
  190. data/lib/less/js/test/less/errors/mixins-guards-default-func-3.less +9 -0
  191. data/lib/less/js/test/less/errors/mixins-guards-default-func-3.txt +4 -0
  192. data/lib/less/js/test/less/errors/multiple-guards-on-css-selectors.less +4 -0
  193. data/lib/less/js/test/less/errors/multiple-guards-on-css-selectors.txt +4 -0
  194. data/lib/less/js/test/less/errors/multiple-guards-on-css-selectors2.less +4 -0
  195. data/lib/less/js/test/less/errors/multiple-guards-on-css-selectors2.txt +4 -0
  196. data/lib/less/js/test/less/errors/parse-error-curly-bracket.less +4 -1
  197. data/lib/less/js/test/less/errors/parse-error-curly-bracket.txt +4 -2
  198. data/lib/less/js/test/less/errors/parse-error-extra-parens.less +5 -0
  199. data/lib/less/js/test/less/errors/parse-error-extra-parens.txt +3 -0
  200. data/lib/less/js/test/less/errors/parse-error-missing-bracket.txt +2 -2
  201. data/lib/less/js/test/less/errors/parse-error-missing-parens.less +5 -0
  202. data/lib/less/js/test/less/errors/parse-error-missing-parens.txt +3 -0
  203. data/lib/less/js/test/less/errors/property-asterisk-only-name.less +3 -0
  204. data/lib/less/js/test/less/errors/property-asterisk-only-name.txt +4 -0
  205. data/lib/less/js/test/less/errors/property-interp-not-defined.less +1 -0
  206. data/lib/less/js/test/less/errors/property-interp-not-defined.txt +2 -0
  207. data/lib/less/js/test/less/errors/svg-gradient1.less +3 -0
  208. data/lib/less/js/test/less/errors/svg-gradient1.txt +4 -0
  209. data/lib/less/js/test/less/errors/svg-gradient2.less +3 -0
  210. data/lib/less/js/test/less/errors/svg-gradient2.txt +4 -0
  211. data/lib/less/js/test/less/errors/svg-gradient3.less +3 -0
  212. data/lib/less/js/test/less/errors/svg-gradient3.txt +4 -0
  213. data/lib/less/js/test/less/errors/unit-function.less +3 -0
  214. data/lib/less/js/test/less/errors/unit-function.txt +4 -0
  215. data/lib/less/js/test/less/extend-chaining.less +12 -0
  216. data/lib/less/js/test/less/extend-selector.less +15 -0
  217. data/lib/less/js/test/less/extract-and-length.less +133 -0
  218. data/lib/less/js/test/less/functions.less +15 -2
  219. data/lib/less/js/test/less/globalVars/extended.json +5 -0
  220. data/lib/less/js/test/less/globalVars/extended.less +10 -0
  221. data/lib/less/js/test/less/globalVars/simple.json +3 -0
  222. data/lib/less/js/test/less/globalVars/simple.less +3 -0
  223. data/lib/less/js/test/less/import-inline.less +2 -0
  224. data/lib/less/js/test/less/import-once.less +2 -0
  225. data/lib/less/js/test/less/import-reference.less +18 -0
  226. data/lib/less/js/test/less/import/import-and-relative-paths-test.less +11 -0
  227. data/lib/less/js/test/less/import/import-reference.less +43 -0
  228. data/lib/less/js/test/less/import/import-test-f.less +5 -0
  229. data/lib/less/js/test/less/import/invalid-css.less +1 -0
  230. data/lib/less/js/test/less/media.less +25 -1
  231. data/lib/less/js/test/less/merge.less +59 -0
  232. data/lib/less/js/test/less/mixins-args.less +10 -0
  233. data/lib/less/js/test/less/mixins-guards-default-func.less +195 -0
  234. data/lib/less/js/test/less/mixins-guards.less +16 -0
  235. data/lib/less/js/test/less/mixins-important.less +4 -1
  236. data/lib/less/js/test/less/mixins-interpolated.less +69 -0
  237. data/lib/less/js/test/less/mixins.less +27 -0
  238. data/lib/less/js/test/less/modifyVars/extended.json +5 -0
  239. data/lib/less/js/test/less/modifyVars/extended.less +11 -0
  240. data/lib/less/js/test/less/no-js-errors/no-js-errors.less +3 -0
  241. data/lib/less/js/test/less/no-js-errors/no-js-errors.txt +4 -0
  242. data/lib/less/js/test/less/no-output.less +2 -0
  243. data/lib/less/js/test/less/parens.less +4 -0
  244. data/lib/less/js/test/less/property-name-interp.less +53 -0
  245. data/lib/less/js/test/less/selectors.less +13 -0
  246. data/lib/less/js/test/less/sourcemaps/basic.json +3 -0
  247. data/lib/less/js/test/less/sourcemaps/basic.less +27 -0
  248. data/lib/less/js/test/less/sourcemaps/imported.css +7 -0
  249. data/lib/less/js/test/less/strings.less +6 -0
  250. data/lib/less/js/test/less/url-args/urls.less +63 -0
  251. data/lib/less/js/test/less/urls.less +15 -0
  252. data/lib/less/js/test/rhino/test-header.js +15 -0
  253. data/lib/less/js/test/sourcemaps/basic.json +1 -0
  254. data/lib/less/js/test/sourcemaps/index.html +17 -0
  255. data/lib/less/loader.rb +48 -40
  256. data/lib/less/version.rb +1 -1
  257. data/spec/less/parser_spec.rb +15 -15
  258. metadata +146 -40
  259. data/lib/less/js/Makefile +0 -102
  260. data/lib/less/js/build/header.js +0 -9
  261. data/lib/less/js/test/browser-test-prepare.js +0 -46
  262. data/lib/less/js/test/browser/runner-errors.js +0 -5
  263. data/lib/less/js/test/browser/runner-main.js +0 -15
  264. data/lib/less/js/test/browser/template.htm +0 -10
  265. data/lib/less/js/test/less/errors/color-operation-error.txt +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be1d8e73c0b849d27778ce76026be575faed01f7
4
- data.tar.gz: b6b86514ad4e34352d46b24d0ac1ac94c3241568
3
+ metadata.gz: cda87971c710025bff8ade858b229def9f977d87
4
+ data.tar.gz: 2507829b7fd2c2973021a9ecc5f6719bd935e50d
5
5
  SHA512:
6
- metadata.gz: 227be52a6ad06b7c44f24dc04700d101575bb4d2d59048635d5649ff94e9dd53b9be0075883bb60b063fefb9e6d8ba61c9ac771e704e3c9de78166ef50592333
7
- data.tar.gz: 541fca5eecb7f998193867d513f728343c0a9f637a8ae79b69b4917646ec688b89c79216a234061599c4307ca50ffa521cc5390275006988e52054c7845392d6
6
+ metadata.gz: 83a398fda51b41c60604cf740a6c63cfc5c4b1d07977d552973bf1412860929028ccef6e622c483b90698c4f938b63670a55d11f736993542d137ca191eb0b68
7
+ data.tar.gz: 504a2ccd28f704ba2f349975329bf5b929d516dada140c0072914c6c242e4b2a0a8e57d393d44e54e20383239cac791fd73e74d2ac1d43fcbb9ca4ece3f962de
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.5.0 2014/02/17
4
+
5
+ * upgrade to less 1.6.2
6
+
3
7
  ## 2.4.0 2013/09/02
4
8
 
5
9
  * upgrade to less 1.4.2
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem "therubyracer", "~> 0.11.0", :require => nil, :platforms => :ruby
5
+ gem "therubyracer", "~> 0.12.0", :require => nil, :platforms => :ruby
6
6
  gem "therubyrhino", ">= 2.0.2", :require => nil, :platforms => :jruby
7
7
 
8
8
  group :development do
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "http://lesscss.org"
12
12
  s.summary = %q{Leaner CSS, in your browser or Ruby (via less.js)}
13
13
  s.description = %q{Invoke the Less CSS compiler from Ruby}
14
-
15
14
  s.rubyforge_project = "less"
15
+ s.license = 'Apache 2.0'
16
16
 
17
17
  s.files = `git ls-files`.split("\n")
18
18
  Dir.chdir('lib/less/js') do
@@ -2,12 +2,12 @@ module Less
2
2
  module Defaults
3
3
 
4
4
  def defaults
5
- @defaults ||= { :paths => [], :relativeUrls => true }
5
+ @defaults ||= { :paths => [], :relativeUrls => true, :syncImport => true }
6
6
  end
7
7
 
8
8
  def paths
9
9
  defaults[:paths]
10
10
  end
11
-
11
+
12
12
  end
13
- end
13
+ end
@@ -77,7 +77,7 @@ module Less
77
77
  # }, env);
78
78
  #
79
79
  # comes back as value: RuntimeError !
80
- elsif e.value.to_s =~ /missing closing `\}`/
80
+ elsif e.value.to_s =~ /missing opening `\(`/
81
81
  raise Less::ParseError.new(e.value.to_s)
82
82
  end
83
83
  raise Less::Error.new(e)
@@ -3,7 +3,8 @@ lessc text eol=lf
3
3
  *.less text eol=lf
4
4
  *.css text eol=lf
5
5
  *.htm text eol=lf
6
-
6
+ gradlew.bat text eol=crlf
7
+ *.html text eol=lf
7
8
  *.jpg binary
8
9
  *.png binary
9
- *.jpeg binary
10
+ *.jpeg binary
@@ -1,8 +1,24 @@
1
- node_modules
1
+ # OS and IDE
2
2
  .emacs*
3
3
  *.flymake
4
4
  *~
5
5
  .#*
6
6
  .idea
7
+ *.sublime-*
8
+
9
+ # npm
10
+ node_modules
11
+ npm-debug.log
12
+
13
+ # project-specific
14
+ tmp
7
15
  test/browser/less.js
8
- test/browser/test-runner-*.htm
16
+ test/sourcemaps/*.map
17
+ test/sourcemaps/*.css
18
+
19
+ # grunt
20
+ .grunt
21
+
22
+ # gradle
23
+ .gradle
24
+ out
@@ -0,0 +1,11 @@
1
+ {
2
+ "evil": true,
3
+ "laxbreak": true,
4
+ "latedef": true,
5
+ "node": true,
6
+ "undef": true,
7
+ "unused": "vars",
8
+ "noarg": true,
9
+ "eqnull": true,
10
+ "forin": true
11
+ }
@@ -1,3 +1,88 @@
1
+ # 1.6.2
2
+
3
+ 2014-02-02
4
+
5
+ - The Rhino release is fixed!
6
+ - ability to use uppercase colours
7
+ - Fix a nasty bug causing syntax errors when selector interpolation is preceded by a long comment (and some other cases)
8
+ - Fix a major bug with the variable scope in guards on selectors (e.g. not mixins)
9
+ - Fold in `& when () {` to the current selector rather than duplicating it
10
+ - fix another issue with array prototypes
11
+ - add a url-args option which adds a value to all urls (for cache busting)
12
+ - Round numbers to 8 decimal places - thereby stopping javascript precision errors
13
+ - some improvements to the default() function in more complex scenarios
14
+ - improved missing '{' and '(' detection
15
+
16
+ # 1.6.1
17
+
18
+ 2014-01-12
19
+
20
+ - support ^ and ^^ shadow dom selectors
21
+ - fix sourcemap selector (used to report end of the element or selector) and directive position (previously not supported)
22
+ - fix parsing empty less files
23
+ - error on (currently) ambiguous guards on multiple css selectors
24
+ - older environments - protect against typeof regex returning function
25
+ - Do not use default keyword
26
+ - use innerHTML in tests, not innerText
27
+ - protect for-in in case Array and Object prototypes have custom fields
28
+
29
+ # 1.6.0
30
+
31
+ 2014-01-01
32
+
33
+ - Properties can be interpolated, e.g. @{prefix}-property: value;
34
+ - a default function has been added only valid in mixin definitions to determine if no other mixins have been matched
35
+ - Added a plugins option that allows specifying an array of visitors run on the less AST
36
+ - Performance improvements that may result in approx 20-40% speed up
37
+ - Javascript evaluations returning numbers can now be used in calculations/functions
38
+ - fixed issue when adding colours, taking the alpha over 1 and breaking when used in colour functions
39
+ - when adding together 2 colours with non zero alpha, the alpha will now be combined rather than added
40
+ - the advanced colour functions no longer ignore transparency, they blend that too
41
+ - Added --clean-option and cleancssOptions to allow passing in clean css options
42
+ - rgba declarations are now always clamped e.g. rgba(-1,258,258, -1) becomes rgba(0, 255, 255, 0)
43
+ - Fix possible issue with import reference not bringing in styles (may not be a bugfix, just a code tidy)
44
+ - Fix some issues with urls() being prefixed twice and unquoted urls in mixins being processed each time they are called
45
+ - Fixed error messages for undefined variables in javascript evaluation
46
+ - Fixed line/column numbers from math errors
47
+
48
+ # 1.5.1
49
+
50
+ 2013-11-17
51
+
52
+ - Added source-map-URL option
53
+ - Fixed a bug which meant the minimised 1.5.0 browser version was not wrapped, meaning it interfered with require js
54
+ - Fixed a bug where the browser version assume port was specified
55
+ - Added the ability to specify variables on the command line
56
+ - Upgraded clean-css and fixed it from trying to import
57
+ - correct a bug meaning imports weren't synchronous (syncImport option available for full synchronous behaviour)
58
+ - better mixin matching behaviour with calling multiple classes e.g. .a.b.c;
59
+
60
+ # 1.5.0
61
+
62
+ 2013-10-21
63
+
64
+ - sourcemap support
65
+ - support for import inline option to include css that you do NOT want less to parse e.g. `@import (inline) "file.css";`
66
+ - better support for modifyVars (refresh styles with new variables, using a file cache), is now more resiliant
67
+ - support for import reference option to reference external css, but not output it. Any mixin calls or extend's will be output.
68
+ - support for guards on selectors (currently only if you have a single selector)
69
+ - allow property merging through the +: syntax
70
+ - Added min/max functions
71
+ - Added length function and improved extract to work with comma seperated values
72
+ - when using import multiple, sub imports are imported multiple times into final output
73
+ - fix bad spaces between namespace operators
74
+ - do not compress comment if it begins with an exclamation mark
75
+ - Fix the saturate function to pass through when using the CSS syntax
76
+ - Added svg-gradient function
77
+ - Added no-js option to lessc (in browser, use javascriptEnabled: false) which disallows JavaScript in less files
78
+ - switched from the little supported and buggy cssmin (previously ycssmin) to clean-css
79
+ - support transparent as a color, but not convert between rgba(0, 0, 0, 0) and transparent
80
+ - remove sys.puts calls to stop deprecation warnings in future node.js releases
81
+ - Browser: added logLevel option to control logging (2 = everything, 1 = errors only, 0 = no logging)
82
+ - Browser: added errorReporting option which can be "html" (default) or "console" or a function
83
+ - Now uses grunt for building and testing
84
+ - A few bug fixes for media queries, extends, scoping, compression and import once.
85
+
1
86
  # 1.4.2
2
87
 
3
88
  2013-07-20
@@ -22,7 +107,7 @@
22
107
  - fix passing of strict maths option
23
108
 
24
109
  # 1.4.0 Beta 4
25
-
110
+
26
111
  2013-05-04
27
112
 
28
113
  - change strictMaths to strictMath. Enable this with --strict-math=on in lessc and strictMath:true in JavaScript.
@@ -55,7 +140,7 @@
55
140
  - significant bug fixes to our debug options
56
141
  - other parameters can be used as defaults in mixins e.g. .a(@a, @b:@a)
57
142
  - an error is shown if properties are used outside of a ruleset
58
- - added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 3
143
+ - added extract function which picks a value out of a list, e.g. extract(12 13 14, 3) => 14
59
144
  - added luma, hsvhue, hsvsaturation, hsvvalue functions
60
145
  - added pow, pi, mod, tan, sin, cos, atan, asin, acos and sqrt math functions
61
146
  - added convert function, e.g. convert(1rad, deg) => value in degrees
@@ -3,7 +3,7 @@
3
3
  > We welcome feature requests and bug reports. Please read these guidelines before submitting one.
4
4
 
5
5
 
6
- <span class="warning">**Words that begin with the at sign (`@`) must be wrapped in backticks!** </span>. as a courtesy to avoid sending notifications to any user that might have the `@username` being referenced. Remember, usernames start with the at sign.
6
+ <span class="warning">**Words that begin with the at sign (`@`) must be wrapped in backticks!** </span>. As a courtesy to avoid sending notifications to any user that might have the `@username` being referenced, please remember that GitHub usernames also start with the at sign. If you don't wrap them in backticks, users will get unintended notifications from you.
7
7
 
8
8
  GitHub has other great markdown features as well, [go here to learn more about them](https://help.github.com/articles/github-flavored-markdown).
9
9
 
@@ -17,7 +17,9 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
17
17
  3. **Test with the latest version**. We get a lot of issues that could be resolved by updating your version of Less.js.
18
18
  3. **Include a live example.** Please use [less2css.org](http://less2css.org/) for sharing your isolated test cases.
19
19
  4. **Share as much information as possible.** Include operating system and version. Describe how you use Less. If you use it in the browser, please include browser and version, and the version of Less.js you're using. Let us know if you're using the command line (`lessc`) or an external tool. And try to include steps to reproduce the bug.
20
+ 5. If you have a solution or suggestion for how to fix the bug you're reporting, please include it, or make a pull request - don't assume the maintainers know how to fix it just because you do.
20
21
 
22
+ Please report documentation issues in [the documentation project](https://github.com/less/less-docs).
21
23
 
22
24
  ## Feature Requests
23
25
 
@@ -33,8 +35,7 @@ _Pull requests are encouraged!_
33
35
  * Start by adding a feature request to get feedback and see how your idea is received.
34
36
  * If your pull request solves an existing issue, but it's different in some way, _please create a new issue_ and make sure to discuss it with the core contributors. Otherwise you risk your hard work being rejected.
35
37
  * Do not change the **./dist/** folder, we do this when releasing
36
- * _Please add tests_ for your work. Use `make test` to see if they pass node.js tests and `make browser-test` to see the browser ([PhantomJS](http://phantomjs.org/)) tests pass.
37
-
38
+ * _Please add tests_ for your work. Tests are invoked using `grunt test` command. It will run both node.js tests and browser ([PhantomJS](http://phantomjs.org/)) tests.
38
39
 
39
40
  ### Coding Standards
40
41
 
@@ -0,0 +1,290 @@
1
+ 'use strict';
2
+
3
+ module.exports = function(grunt) {
4
+
5
+ // Report the elapsed execution time of tasks.
6
+ require('time-grunt')(grunt);
7
+
8
+ // Project configuration.
9
+ grunt.initConfig({
10
+
11
+ // Metadata required for build.
12
+ build: grunt.file.readYAML('build/build.yml'),
13
+ pkg: grunt.file.readJSON('package.json'),
14
+ meta: {
15
+ license: '<%= _.pluck(pkg.licenses, "type").join(", ") %>',
16
+ copyright: 'Copyright (c) 2009-<%= grunt.template.today("yyyy") %>',
17
+ banner:
18
+ '/*! \n' +
19
+ ' * LESS - <%= pkg.description %> v<%= pkg.version %> \n' +
20
+ ' * http://lesscss.org \n' +
21
+ ' * \n' +
22
+ ' * <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> \n' +
23
+ ' * Licensed under the <%= meta.license %> License. \n' +
24
+ ' * \n' +
25
+ ' */ \n\n' +
26
+ ' /**' +
27
+ ' * @license <%= meta.license %>\n' +
28
+ ' */ \n\n'
29
+ },
30
+
31
+ shell: {
32
+ options: {stdout: true, failOnError: true},
33
+ test: {
34
+ command: 'node test'
35
+ },
36
+ benchmark: {
37
+ command: 'node benchmark/less-benchmark.js'
38
+ },
39
+ "browsertest-server": {
40
+ command: 'node node_modules/http-server/bin/http-server . -p 8088'
41
+ },
42
+ "sourcemap-test": {
43
+ command: [
44
+ 'node bin/lessc --source-map --source-map-map-inline test/less/import.less test/sourcemaps/import.css',
45
+ 'node bin/lessc --source-map --source-map-map-inline test/less/sourcemaps/basic.less test/sourcemaps/basic.css',
46
+ 'node node_modules/http-server/bin/http-server test/sourcemaps -p 8084'].join('&&')
47
+ }
48
+ },
49
+ concat: {
50
+ options: {
51
+ stripBanners: 'all',
52
+ banner: '<%= meta.banner %>\n\n(function (window, undefined) {',
53
+ footer: '\n})(window);'
54
+ },
55
+ // Browser versions
56
+ browsertest: {
57
+ src: ['<%= build.browser %>'],
58
+ dest: 'test/browser/less.js'
59
+ },
60
+ stable: {
61
+ src: ['<%= build.browser %>'],
62
+ dest: 'dist/less-<%= pkg.version %>.js'
63
+ },
64
+ // Rhino
65
+ rhino: {
66
+ options: {
67
+ banner: '/* LESS.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
68
+ footer: '' // override task-level footer
69
+ },
70
+ src: ['<%= build.rhino %>'],
71
+ dest: 'dist/less-rhino-<%= pkg.version %>.js'
72
+ },
73
+ // lessc for Rhino
74
+ rhinolessc: {
75
+ options: {
76
+ banner: '/* LESS.js v<%= pkg.version %> RHINO | <%= meta.copyright %>, <%= pkg.author.name %> <<%= pkg.author.email %>> */\n\n',
77
+ footer: '' // override task-level footer
78
+ },
79
+ src: ['<%= build.rhinolessc %>'],
80
+ dest: 'dist/lessc-rhino-<%= pkg.version %>.js'
81
+ },
82
+ // Generate readme
83
+ readme: {
84
+ // override task-level banner and footer
85
+ options: {process: true, banner: '', footer: ''},
86
+ src: ['build/README.md'],
87
+ dest: 'README.md'
88
+ }
89
+ },
90
+
91
+ uglify: {
92
+ options: {
93
+ banner: '<%= meta.banner %>',
94
+ mangle: true
95
+ },
96
+ stable: {
97
+ src: ['<%= concat.stable.dest %>'],
98
+ dest: 'dist/less-<%= pkg.version %>.min.js'
99
+ }
100
+ },
101
+
102
+ jshint: {
103
+ options: {jshintrc: '.jshintrc'},
104
+ files: {
105
+ src: [
106
+ 'Gruntfile.js',
107
+ 'lib/less/**/*.js'
108
+ ]
109
+ }
110
+ },
111
+
112
+ connect: {
113
+ server: {
114
+ options: {
115
+ port: 8081
116
+ }
117
+ }
118
+ },
119
+
120
+ jasmine: {
121
+ options: {
122
+ // version: '2.0.0-rc2',
123
+ keepRunner: true,
124
+ host: 'http://localhost:8081/',
125
+ vendor: ['test/browser/common.js', 'test/browser/less.js'],
126
+ template: 'test/browser/test-runner-template.tmpl'
127
+ },
128
+ main: {
129
+ // src is used to build list of less files to compile
130
+ src: ['test/less/*.less', '!test/less/javascript.less', '!test/less/urls.less', '!test/less/empty.less'],
131
+ options: {
132
+ helpers: 'test/browser/runner-main-options.js',
133
+ specs: 'test/browser/runner-main-spec.js',
134
+ outfile: 'tmp/browser/test-runner-main.html'
135
+ }
136
+ },
137
+ legacy: {
138
+ src: ['test/less/legacy/*.less'],
139
+ options: {
140
+ helpers: 'test/browser/runner-legacy-options.js',
141
+ specs: 'test/browser/runner-legacy-spec.js',
142
+ outfile: 'tmp/browser/test-runner-legacy.html'
143
+ }
144
+ },
145
+ errors: {
146
+ src: ['test/less/errors/*.less', '!test/less/errors/javascript-error.less'],
147
+ options: {
148
+ timeout: 20000,
149
+ helpers: 'test/browser/runner-errors-options.js',
150
+ specs: 'test/browser/runner-errors-spec.js',
151
+ outfile: 'tmp/browser/test-runner-errors.html'
152
+ }
153
+ },
154
+ noJsErrors: {
155
+ src: ['test/less/no-js-errors/*.less'],
156
+ options: {
157
+ helpers: 'test/browser/runner-no-js-errors-options.js',
158
+ specs: 'test/browser/runner-no-js-errors-spec.js',
159
+ outfile: 'tmp/browser/test-runner-no-js-errors.html'
160
+ }
161
+ },
162
+ browser: {
163
+ src: ['test/browser/less/*.less'],
164
+ options: {
165
+ helpers: 'test/browser/runner-browser-options.js',
166
+ specs: 'test/browser/runner-browser-spec.js',
167
+ outfile: 'tmp/browser/test-runner-browser.html'
168
+ }
169
+ },
170
+ relativeUrls: {
171
+ src: ['test/browser/less/relative-urls/*.less'],
172
+ options: {
173
+ helpers: 'test/browser/runner-relative-urls-options.js',
174
+ specs: 'test/browser/runner-relative-urls-spec.js',
175
+ outfile: 'tmp/browser/test-runner-relative-urls.html'
176
+ }
177
+ },
178
+ rootpath: {
179
+ src: ['test/browser/less/rootpath/*.less'],
180
+ options: {
181
+ helpers: 'test/browser/runner-rootpath-options.js',
182
+ specs: 'test/browser/runner-rootpath-spec.js',
183
+ outfile: 'tmp/browser/test-runner-rootpath.html'
184
+ }
185
+ },
186
+ rootpathRelative: {
187
+ src: ['test/browser/less/rootpath-relative/*.less'],
188
+ options: {
189
+ helpers: 'test/browser/runner-rootpath-relative-options.js',
190
+ specs: 'test/browser/runner-rootpath-relative-spec.js',
191
+ outfile: 'tmp/browser/test-runner-rootpath-relative.html'
192
+ }
193
+ },
194
+ production: {
195
+ src: ['test/browser/less/production/*.less'],
196
+ options: {
197
+ helpers: 'test/browser/runner-production-options.js',
198
+ specs: 'test/browser/runner-production-spec.js',
199
+ outfile: 'tmp/browser/test-runner-production.html'
200
+ }
201
+ },
202
+ modifyVars: {
203
+ src: ['test/browser/less/modify-vars/*.less'],
204
+ options: {
205
+ helpers: 'test/browser/runner-modify-vars-options.js',
206
+ specs: 'test/browser/runner-modify-vars-spec.js',
207
+ outfile: 'tmp/browser/test-runner-modify-vars.html'
208
+ }
209
+ },
210
+ globalVars: {
211
+ src: ['test/browser/less/global-vars/*.less'],
212
+ options: {
213
+ helpers: 'test/browser/runner-global-vars-options.js',
214
+ specs: 'test/browser/runner-global-vars-spec.js',
215
+ outfile: 'tmp/browser/test-runner-global-vars.html'
216
+ }
217
+ }
218
+ },
219
+
220
+ // Clean the version of less built for the tests
221
+ clean: {
222
+ test: ['test/browser/less.js', 'tmp'],
223
+ "sourcemap-test": ['test/sourcemaps/*.css', 'test/sourcemaps/*.map']
224
+ }
225
+ });
226
+
227
+ // Load these plugins to provide the necessary tasks
228
+ require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
229
+
230
+ // Actually load this plugin's task(s).
231
+ grunt.loadTasks('build/tasks');
232
+
233
+ // by default, run tests
234
+ grunt.registerTask('default', [
235
+ 'test'
236
+ ]);
237
+
238
+ // Release
239
+ grunt.registerTask('stable', [
240
+ 'concat:stable',
241
+ 'uglify:stable'
242
+ ]);
243
+
244
+ // Release Rhino Version
245
+ grunt.registerTask('rhino', [
246
+ 'concat:rhino',
247
+ 'concat:rhinolessc'
248
+ ]);
249
+
250
+ // Run all browser tests
251
+ grunt.registerTask('browsertest', [
252
+ 'browser',
253
+ 'connect',
254
+ 'jasmine'
255
+ ]);
256
+
257
+ // setup a web server to run the browser tests in a browser rather than phantom
258
+ grunt.registerTask('browsertest-server', [
259
+ 'shell:browsertest-server'
260
+ ]);
261
+
262
+ // Create the browser version of less.js
263
+ grunt.registerTask('browser', [
264
+ 'concat:browsertest'
265
+ ]);
266
+
267
+ // Run all tests
268
+ grunt.registerTask('test', [
269
+ 'clean',
270
+ 'jshint',
271
+ 'shell:test',
272
+ 'browsertest'
273
+ ]);
274
+
275
+ // generate a good test environment for testing sourcemaps
276
+ grunt.registerTask('sourcemap-test', [
277
+ 'clean:sourcemap-test',
278
+ 'shell:sourcemap-test'
279
+ ]);
280
+
281
+ // Run benchmark
282
+ grunt.registerTask('benchmark', [
283
+ 'shell:benchmark'
284
+ ]);
285
+
286
+ // Readme.
287
+ grunt.registerTask('readme', [
288
+ 'concat:readme'
289
+ ]);
290
+ };