less 2.4.0 → 2.5.3

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 (405) hide show
  1. package/.idea/jsLibraryMappings.xml +7 -7
  2. package/.idea/less.js.iml +9 -16
  3. package/.idea/libraries/less_js_node_modules.xml +14 -0
  4. package/.idea/misc.xml +14 -5
  5. package/.idea/modules.xml +8 -9
  6. package/.idea/vcs.xml +6 -7
  7. package/.idea/workspace.xml +592 -806
  8. package/.jscsrc +72 -72
  9. package/.travis.yml +1 -0
  10. package/CHANGELOG.md +54 -8
  11. package/Gruntfile.js +40 -13
  12. package/README.md +2 -0
  13. package/appveyor.yml +0 -6
  14. package/bin/lessc +22 -24
  15. package/bower.json +1 -2
  16. package/dist/less-rolledup.js +8572 -0
  17. package/dist/less.js +807 -401
  18. package/dist/less.min.js +9 -8
  19. package/lib/less/contexts.js +2 -0
  20. package/lib/less/environment/abstract-file-manager.js +5 -1
  21. package/lib/less/functions/color.js +46 -12
  22. package/lib/less/functions/function-caller.js +31 -2
  23. package/lib/less/functions/function-registry.js +28 -17
  24. package/lib/less/functions/math-helper.js +16 -0
  25. package/lib/less/functions/math.js +4 -16
  26. package/lib/less/functions/number.js +7 -2
  27. package/lib/less/functions/string.js +5 -3
  28. package/lib/less/functions/svg.js +19 -11
  29. package/lib/less/functions/types.js +1 -6
  30. package/lib/less/import-manager.js +8 -3
  31. package/lib/less/index.js +1 -1
  32. package/lib/less/parser/parser-input.js +55 -54
  33. package/lib/less/parser/parser.js +168 -52
  34. package/lib/less/plugins/function-importer.js +35 -0
  35. package/lib/less/source-map-output.js +1 -2
  36. package/lib/less/tree/anonymous.js +10 -2
  37. package/lib/less/tree/color.js +4 -1
  38. package/lib/less/tree/comment.js +0 -3
  39. package/lib/less/tree/dimension.js +5 -3
  40. package/lib/less/tree/directive.js +40 -15
  41. package/lib/less/tree/expression.js +5 -0
  42. package/lib/less/tree/import.js +22 -10
  43. package/lib/less/tree/media.js +3 -23
  44. package/lib/less/tree/mixin-call.js +17 -7
  45. package/lib/less/tree/mixin-definition.js +20 -6
  46. package/lib/less/tree/rule.js +19 -1
  47. package/lib/less/tree/ruleset.js +40 -27
  48. package/lib/less/tree/selector.js +8 -1
  49. package/lib/less/visitors/extend-visitor.js +1 -4
  50. package/lib/less/visitors/import-visitor.js +17 -2
  51. package/lib/less/visitors/join-selector-visitor.js +6 -0
  52. package/lib/less/visitors/to-css-visitor.js +48 -14
  53. package/lib/less-browser/bootstrap.js +5 -6
  54. package/lib/less-browser/index.js +20 -12
  55. package/lib/less-node/image-size.js +54 -31
  56. package/lib/less-node/index.js +1 -1
  57. package/lib/less-node/lessc-helper.js +2 -2
  58. package/lib/less-rhino/index.js +12 -8
  59. package/package.json +9 -13
  60. package/test/browser/less/urls.less +7 -1
  61. package/test/browser/less.js +30 -0
  62. package/test/browser/runner-VisitorPlugin-options.js +3 -0
  63. package/test/browser/runner-VisitorPlugin.js +3 -0
  64. package/test/browser/runner-filemanagerPlugin-options.js +4 -0
  65. package/test/browser/runner-filemanagerPlugin.js +3 -0
  66. package/test/browser/runner-global-vars-options.js +2 -1
  67. package/test/browser/runner-main-options.js +11 -11
  68. package/test/browser/runner-postProcessor.js +1 -1
  69. package/test/browser/runner-postProcessorPlugin-options.js +3 -0
  70. package/test/browser/runner-postProcessorPlugin.js +3 -0
  71. package/test/browser/runner-preProcessorPlugin-options.js +3 -0
  72. package/test/browser/runner-preProcessorPlugin.js +3 -0
  73. package/test/css/comments2.css +1 -1
  74. package/test/css/compression/compression.css +1 -1
  75. package/test/css/detached-rulesets.css +5 -0
  76. package/test/css/directives-bubling.css +119 -0
  77. package/test/css/extract-and-length.css +1 -1
  78. package/test/css/filemanagerPlugin/filemanager.css +3 -0
  79. package/test/css/functions.css +17 -1
  80. package/test/css/import-reference.css +5 -1
  81. package/test/css/import.css +4 -0
  82. package/test/css/include-path/include-path.css +4 -1
  83. package/test/css/include-path-string/include-path-string.css +3 -0
  84. package/test/css/legacy/legacy.css +14 -0
  85. package/test/css/media.css +0 -1
  86. package/test/css/mixins-args.css +51 -1
  87. package/test/css/plugin.css +44 -0
  88. package/test/css/postProcessorPlugin/postProcessor.css +4 -0
  89. package/test/css/preProcessorPlugin/preProcessor.css +3 -0
  90. package/test/css/scope.css +1 -1
  91. package/test/css/strings.css +1 -1
  92. package/test/css/url-args/urls.css +5 -5
  93. package/test/css/urls.css +8 -8
  94. package/test/css/variables.css +5 -5
  95. package/test/css/visitorPlugin/visitor.css +3 -0
  96. package/test/data/image.jpg +0 -0
  97. package/test/data/image.svg +2 -1
  98. package/test/data/page.html +1 -1
  99. package/test/index.js +5 -0
  100. package/test/less/detached-rulesets.less +9 -0
  101. package/test/less/directives-bubling.less +142 -0
  102. package/test/less/errors/at-rules-undefined-var.txt +4 -4
  103. package/test/less/errors/css-guard-default-func.txt +4 -4
  104. package/test/less/errors/javascript-undefined-var.txt +4 -4
  105. package/test/less/errors/mixins-guards-default-func-1.txt +4 -4
  106. package/test/less/errors/mixins-guards-default-func-2.txt +4 -4
  107. package/test/less/errors/mixins-guards-default-func-3.txt +4 -4
  108. package/test/less/errors/{parse-error-extra-parens.less → parse-error-media-no-block-1.less} +0 -0
  109. package/test/less/errors/parse-error-media-no-block-1.txt +3 -0
  110. package/test/less/errors/parse-error-media-no-block-2.less +1 -0
  111. package/test/less/errors/parse-error-media-no-block-2.txt +2 -0
  112. package/test/less/errors/parse-error-media-no-block-3.less +4 -0
  113. package/test/less/errors/parse-error-media-no-block-3.txt +3 -0
  114. package/test/less/errors/percentage-non-number-argument.less +3 -0
  115. package/test/less/errors/percentage-non-number-argument.txt +4 -0
  116. package/test/less/errors/property-interp-not-defined.txt +2 -2
  117. package/test/less/errors/svg-gradient2.txt +1 -1
  118. package/test/less/errors/svg-gradient3.txt +1 -1
  119. package/test/less/errors/svg-gradient4.less +4 -0
  120. package/test/less/errors/svg-gradient4.txt +4 -0
  121. package/test/less/errors/svg-gradient5.less +4 -0
  122. package/test/less/errors/svg-gradient5.txt +4 -0
  123. package/test/less/errors/svg-gradient6.less +4 -0
  124. package/test/less/errors/svg-gradient6.txt +4 -0
  125. package/test/less/filemanagerPlugin/colors.test +1 -0
  126. package/test/less/filemanagerPlugin/filemanager.less +4 -0
  127. package/test/less/functions.less +20 -2
  128. package/test/less/import/css-import.less +1 -0
  129. package/test/less/import/import-inline-invalid-css.less +1 -0
  130. package/test/less/import/import-reference.less +10 -1
  131. package/test/less/import/import-test-a.less +1 -0
  132. package/test/less/import-reference.less +4 -1
  133. package/test/less/import.less +1 -0
  134. package/test/less/include-path/include-path.less +3 -1
  135. package/test/less/include-path-string/include-path-string.less +3 -0
  136. package/test/less/legacy/legacy.less +14 -0
  137. package/test/less/mixins-args.less +48 -0
  138. package/test/less/mixins-guards.less +9 -0
  139. package/test/less/no-output.less +1 -1
  140. package/test/less/plugin/plugin-global.js +9 -0
  141. package/test/less/plugin/plugin-local.js +8 -0
  142. package/test/less/plugin/plugin-transitive.js +5 -0
  143. package/test/less/plugin/plugin-transitive.less +5 -0
  144. package/test/less/plugin.less +85 -0
  145. package/test/less/postProcessorPlugin/postProcessor.less +4 -0
  146. package/test/less/preProcessorPlugin/preProcessor.less +3 -0
  147. package/test/less/sourcemaps/imported.css +6 -6
  148. package/test/less/visitorPlugin/visitor.less +4 -0
  149. package/test/less-bom/charsets.less +3 -0
  150. package/test/less-bom/colors.less +98 -0
  151. package/test/less-bom/comments.less +102 -0
  152. package/test/less-bom/comments2.less +20 -0
  153. package/test/less-bom/compression/compression.less +36 -0
  154. package/test/less-bom/css-3.less +154 -0
  155. package/test/less-bom/css-escapes.less +33 -0
  156. package/test/less-bom/css-guards.less +103 -0
  157. package/test/less-bom/css.less +108 -0
  158. package/test/less-bom/debug/import/test.less +25 -0
  159. package/test/less-bom/debug/linenumbers.less +33 -0
  160. package/test/less-bom/detached-rulesets.less +112 -0
  161. package/test/less-bom/directives-bubling.less +142 -0
  162. package/test/less-bom/empty.less +1 -0
  163. package/test/less-bom/errors/add-mixed-units.less +3 -0
  164. package/test/less-bom/errors/add-mixed-units.txt +4 -0
  165. package/test/less-bom/errors/add-mixed-units2.less +3 -0
  166. package/test/less-bom/errors/add-mixed-units2.txt +4 -0
  167. package/test/less-bom/errors/at-rules-undefined-var.less +4 -0
  168. package/test/less-bom/errors/at-rules-undefined-var.txt +4 -0
  169. package/test/less-bom/errors/bad-variable-declaration1.less +1 -0
  170. package/test/less-bom/errors/bad-variable-declaration1.txt +2 -0
  171. package/test/less-bom/errors/color-func-invalid-color.less +3 -0
  172. package/test/less-bom/errors/color-func-invalid-color.txt +4 -0
  173. package/test/less-bom/errors/color-invalid-hex-code.less +3 -0
  174. package/test/less-bom/errors/color-invalid-hex-code.txt +4 -0
  175. package/test/less-bom/errors/color-invalid-hex-code2.less +3 -0
  176. package/test/less-bom/errors/color-invalid-hex-code2.txt +4 -0
  177. package/test/less-bom/errors/css-guard-default-func.less +4 -0
  178. package/test/less-bom/errors/css-guard-default-func.txt +4 -0
  179. package/test/less-bom/errors/detached-ruleset-1.less +6 -0
  180. package/test/less-bom/errors/detached-ruleset-1.txt +4 -0
  181. package/test/less-bom/errors/detached-ruleset-2.less +6 -0
  182. package/test/less-bom/errors/detached-ruleset-2.txt +4 -0
  183. package/test/less-bom/errors/detached-ruleset-3.less +4 -0
  184. package/test/less-bom/errors/detached-ruleset-3.txt +4 -0
  185. package/test/less-bom/errors/detached-ruleset-5.less +4 -0
  186. package/test/less-bom/errors/detached-ruleset-5.txt +3 -0
  187. package/test/less-bom/errors/detached-ruleset-6.less +5 -0
  188. package/test/less-bom/errors/detached-ruleset-6.txt +4 -0
  189. package/test/less-bom/errors/divide-mixed-units.less +3 -0
  190. package/test/less-bom/errors/divide-mixed-units.txt +4 -0
  191. package/test/less-bom/errors/extend-no-selector.less +3 -0
  192. package/test/less-bom/errors/extend-no-selector.txt +3 -0
  193. package/test/less-bom/errors/extend-not-at-end.less +3 -0
  194. package/test/less-bom/errors/extend-not-at-end.txt +3 -0
  195. package/test/less-bom/errors/import-malformed.less +1 -0
  196. package/test/less-bom/errors/import-malformed.txt +3 -0
  197. package/test/less-bom/errors/import-missing.less +6 -0
  198. package/test/less-bom/errors/import-missing.txt +3 -0
  199. package/test/less-bom/errors/import-no-semi.less +1 -0
  200. package/test/less-bom/errors/import-no-semi.txt +2 -0
  201. package/test/less-bom/errors/import-subfolder1.less +1 -0
  202. package/test/less-bom/errors/import-subfolder1.txt +3 -0
  203. package/test/less-bom/errors/import-subfolder2.less +1 -0
  204. package/test/less-bom/errors/import-subfolder2.txt +4 -0
  205. package/test/less-bom/errors/imports/import-subfolder1.less +1 -0
  206. package/test/less-bom/errors/imports/import-subfolder2.less +1 -0
  207. package/test/less-bom/errors/imports/import-test.less +4 -0
  208. package/test/less-bom/errors/imports/subfolder/mixin-not-defined.less +1 -0
  209. package/test/less-bom/errors/imports/subfolder/parse-error-curly-bracket.less +1 -0
  210. package/test/less-bom/errors/javascript-error.less +3 -0
  211. package/test/less-bom/errors/javascript-error.txt +4 -0
  212. package/test/less-bom/errors/javascript-undefined-var.less +3 -0
  213. package/test/less-bom/errors/javascript-undefined-var.txt +4 -0
  214. package/test/less-bom/errors/mixed-mixin-definition-args-1.less +6 -0
  215. package/test/less-bom/errors/mixed-mixin-definition-args-1.txt +4 -0
  216. package/test/less-bom/errors/mixed-mixin-definition-args-2.less +6 -0
  217. package/test/less-bom/errors/mixed-mixin-definition-args-2.txt +4 -0
  218. package/test/less-bom/errors/mixin-not-defined.less +11 -0
  219. package/test/less-bom/errors/mixin-not-defined.txt +3 -0
  220. package/test/less-bom/errors/mixin-not-matched.less +6 -0
  221. package/test/less-bom/errors/mixin-not-matched.txt +3 -0
  222. package/test/less-bom/errors/mixin-not-matched2.less +6 -0
  223. package/test/less-bom/errors/mixin-not-matched2.txt +3 -0
  224. package/test/less-bom/errors/mixin-not-visible-in-scope-1.less +9 -0
  225. package/test/less-bom/errors/mixin-not-visible-in-scope-1.txt +4 -0
  226. package/test/less-bom/errors/mixins-guards-default-func-1.less +9 -0
  227. package/test/less-bom/errors/mixins-guards-default-func-1.txt +4 -0
  228. package/test/less-bom/errors/mixins-guards-default-func-2.less +9 -0
  229. package/test/less-bom/errors/mixins-guards-default-func-2.txt +4 -0
  230. package/test/less-bom/errors/mixins-guards-default-func-3.less +9 -0
  231. package/test/less-bom/errors/mixins-guards-default-func-3.txt +4 -0
  232. package/test/less-bom/errors/multiple-guards-on-css-selectors.less +4 -0
  233. package/test/less-bom/errors/multiple-guards-on-css-selectors.txt +4 -0
  234. package/test/less-bom/errors/multiple-guards-on-css-selectors2.less +4 -0
  235. package/test/less-bom/errors/multiple-guards-on-css-selectors2.txt +4 -0
  236. package/test/less-bom/errors/multiply-mixed-units.less +7 -0
  237. package/test/less-bom/errors/multiply-mixed-units.txt +4 -0
  238. package/test/less-bom/errors/parens-error-1.less +3 -0
  239. package/test/less-bom/errors/parens-error-1.txt +4 -0
  240. package/test/less-bom/errors/parens-error-2.less +3 -0
  241. package/test/less-bom/errors/parens-error-2.txt +4 -0
  242. package/test/less-bom/errors/parens-error-3.less +3 -0
  243. package/test/less-bom/errors/parens-error-3.txt +4 -0
  244. package/test/less-bom/errors/parse-error-curly-bracket.less +4 -0
  245. package/test/less-bom/errors/parse-error-curly-bracket.txt +4 -0
  246. package/test/less-bom/errors/parse-error-media-no-block-1.less +5 -0
  247. package/test/less-bom/errors/parse-error-media-no-block-1.txt +3 -0
  248. package/test/less-bom/errors/parse-error-media-no-block-2.less +1 -0
  249. package/test/less-bom/errors/parse-error-media-no-block-2.txt +2 -0
  250. package/test/less-bom/errors/parse-error-media-no-block-3.less +4 -0
  251. package/test/less-bom/errors/parse-error-media-no-block-3.txt +3 -0
  252. package/test/less-bom/errors/parse-error-missing-bracket.less +2 -0
  253. package/test/less-bom/errors/parse-error-missing-bracket.txt +3 -0
  254. package/test/less-bom/errors/parse-error-missing-parens.less +5 -0
  255. package/test/less-bom/errors/parse-error-missing-parens.txt +3 -0
  256. package/test/less-bom/errors/parse-error-with-import.less +13 -0
  257. package/test/less-bom/errors/parse-error-with-import.txt +4 -0
  258. package/test/less-bom/errors/percentage-missing-space.less +3 -0
  259. package/test/less-bom/errors/percentage-missing-space.txt +4 -0
  260. package/test/less-bom/errors/percentage-non-number-argument.less +3 -0
  261. package/test/less-bom/errors/percentage-non-number-argument.txt +4 -0
  262. package/test/less-bom/errors/property-asterisk-only-name.less +3 -0
  263. package/test/less-bom/errors/property-asterisk-only-name.txt +4 -0
  264. package/test/less-bom/errors/property-ie5-hack.less +3 -0
  265. package/test/less-bom/errors/property-ie5-hack.txt +3 -0
  266. package/test/less-bom/errors/property-in-root.less +4 -0
  267. package/test/less-bom/errors/property-in-root.txt +4 -0
  268. package/test/less-bom/errors/property-in-root2.less +1 -0
  269. package/test/less-bom/errors/property-in-root2.txt +4 -0
  270. package/test/less-bom/errors/property-in-root3.less +4 -0
  271. package/test/less-bom/errors/property-in-root3.txt +3 -0
  272. package/test/less-bom/errors/property-interp-not-defined.less +1 -0
  273. package/test/less-bom/errors/property-interp-not-defined.txt +2 -0
  274. package/test/less-bom/errors/recursive-variable.less +1 -0
  275. package/test/less-bom/errors/recursive-variable.txt +2 -0
  276. package/test/less-bom/errors/single-character.less +1 -0
  277. package/test/less-bom/errors/single-character.txt +2 -0
  278. package/test/less-bom/errors/svg-gradient1.less +3 -0
  279. package/test/less-bom/errors/svg-gradient1.txt +4 -0
  280. package/test/less-bom/errors/svg-gradient2.less +3 -0
  281. package/test/less-bom/errors/svg-gradient2.txt +4 -0
  282. package/test/less-bom/errors/svg-gradient3.less +3 -0
  283. package/test/less-bom/errors/svg-gradient3.txt +4 -0
  284. package/test/less-bom/errors/svg-gradient4.less +4 -0
  285. package/test/less-bom/errors/svg-gradient4.txt +4 -0
  286. package/test/less-bom/errors/svg-gradient5.less +4 -0
  287. package/test/less-bom/errors/svg-gradient5.txt +4 -0
  288. package/test/less-bom/errors/svg-gradient6.less +4 -0
  289. package/test/less-bom/errors/svg-gradient6.txt +4 -0
  290. package/test/less-bom/errors/unit-function.less +3 -0
  291. package/test/less-bom/errors/unit-function.txt +4 -0
  292. package/test/less-bom/extend-chaining.less +91 -0
  293. package/test/less-bom/extend-clearfix.less +19 -0
  294. package/test/less-bom/extend-exact.less +46 -0
  295. package/test/less-bom/extend-media.less +24 -0
  296. package/test/less-bom/extend-nest.less +65 -0
  297. package/test/less-bom/extend-selector.less +99 -0
  298. package/test/less-bom/extend.less +81 -0
  299. package/test/less-bom/extract-and-length.less +133 -0
  300. package/test/less-bom/filemanagerPlugin/colors.test +1 -0
  301. package/test/less-bom/filemanagerPlugin/filemanager.less +4 -0
  302. package/test/less-bom/functions.less +232 -0
  303. package/test/less-bom/globalVars/extended.json +5 -0
  304. package/test/less-bom/globalVars/extended.less +10 -0
  305. package/test/less-bom/globalVars/simple.json +3 -0
  306. package/test/less-bom/globalVars/simple.less +3 -0
  307. package/test/less-bom/ie-filters.less +15 -0
  308. package/test/less-bom/import/css-import.less +1 -0
  309. package/test/less-bom/import/deeper/deeper-2/url-import-2.less +3 -0
  310. package/test/less-bom/import/deeper/deeper-2/url-import.less +1 -0
  311. package/test/less-bom/import/deeper/import-once-test-a.less +1 -0
  312. package/test/less-bom/import/deeper/url-import.less +1 -0
  313. package/test/less-bom/import/import-and-relative-paths-test.less +17 -0
  314. package/test/less-bom/import/import-charset-test.less +1 -0
  315. package/test/less-bom/import/import-inline-invalid-css.less +1 -0
  316. package/test/less-bom/import/import-interpolation.less +2 -0
  317. package/test/less-bom/import/import-interpolation2.less +5 -0
  318. package/test/less-bom/import/import-once-test-c.less +6 -0
  319. package/test/less-bom/import/import-reference.less +98 -0
  320. package/test/less-bom/import/import-test-a.less +5 -0
  321. package/test/less-bom/import/import-test-b.less +8 -0
  322. package/test/less-bom/import/import-test-c.less +6 -0
  323. package/test/less-bom/import/import-test-d.css +1 -0
  324. package/test/less-bom/import/import-test-e.less +2 -0
  325. package/test/less-bom/import/import-test-f.less +5 -0
  326. package/test/less-bom/import/imports/font.less +8 -0
  327. package/test/less-bom/import/imports/logo.less +6 -0
  328. package/test/less-bom/import/interpolation-vars.less +6 -0
  329. package/test/less-bom/import/invalid-css.less +1 -0
  330. package/test/less-bom/import/urls.less +1 -0
  331. package/test/less-bom/import-inline.less +3 -0
  332. package/test/less-bom/import-interpolation.less +8 -0
  333. package/test/less-bom/import-once.less +6 -0
  334. package/test/less-bom/import-reference.less +26 -0
  335. package/test/less-bom/import.less +31 -0
  336. package/test/less-bom/include-path/include-path.less +8 -0
  337. package/test/less-bom/include-path-string/include-path-string.less +3 -0
  338. package/test/less-bom/javascript.less +38 -0
  339. package/test/less-bom/lazy-eval.less +6 -0
  340. package/test/less-bom/legacy/legacy.less +21 -0
  341. package/test/less-bom/media.less +234 -0
  342. package/test/less-bom/merge.less +78 -0
  343. package/test/less-bom/mixins-args.less +263 -0
  344. package/test/less-bom/mixins-closure.less +26 -0
  345. package/test/less-bom/mixins-guards-default-func.less +195 -0
  346. package/test/less-bom/mixins-guards.less +280 -0
  347. package/test/less-bom/mixins-important.less +53 -0
  348. package/test/less-bom/mixins-interpolated.less +75 -0
  349. package/test/less-bom/mixins-named-args.less +36 -0
  350. package/test/less-bom/mixins-nested.less +22 -0
  351. package/test/less-bom/mixins-pattern.less +102 -0
  352. package/test/less-bom/mixins.less +145 -0
  353. package/test/less-bom/modifyVars/extended.json +5 -0
  354. package/test/less-bom/modifyVars/extended.less +11 -0
  355. package/test/less-bom/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
  356. package/test/less-bom/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
  357. package/test/less-bom/no-js-errors/no-js-errors.less +3 -0
  358. package/test/less-bom/no-js-errors/no-js-errors.txt +4 -0
  359. package/test/less-bom/no-output.less +2 -0
  360. package/test/less-bom/operations.less +62 -0
  361. package/test/less-bom/parens.less +45 -0
  362. package/test/less-bom/plugin/plugin-global.js +9 -0
  363. package/test/less-bom/plugin/plugin-local.js +8 -0
  364. package/test/less-bom/plugin/plugin-transitive.js +5 -0
  365. package/test/less-bom/plugin/plugin-transitive.less +5 -0
  366. package/test/less-bom/plugin.less +85 -0
  367. package/test/less-bom/postProcessorPlugin/postProcessor.less +4 -0
  368. package/test/less-bom/preProcessorPlugin/preProcessor.less +3 -0
  369. package/test/less-bom/property-name-interp.less +56 -0
  370. package/test/less-bom/rulesets.less +30 -0
  371. package/test/less-bom/scope.less +104 -0
  372. package/test/less-bom/selectors.less +184 -0
  373. package/test/less-bom/sourcemaps/basic.json +3 -0
  374. package/test/less-bom/sourcemaps/basic.less +27 -0
  375. package/test/less-bom/sourcemaps/imported.css +7 -0
  376. package/test/less-bom/sourcemaps-empty/empty.less +1 -0
  377. package/test/less-bom/sourcemaps-empty/var-defs.less +1 -0
  378. package/test/less-bom/static-urls/urls.less +33 -0
  379. package/test/less-bom/strict-units/strict-units.less +4 -0
  380. package/test/less-bom/strings.less +73 -0
  381. package/test/less-bom/url-args/urls.less +63 -0
  382. package/test/less-bom/urls.less +94 -0
  383. package/test/less-bom/variables-in-at-rules.less +20 -0
  384. package/test/less-bom/variables.less +119 -0
  385. package/test/less-bom/visitorPlugin/visitor.less +4 -0
  386. package/test/less-bom/whitespace.less +44 -0
  387. package/test/less-test.js +9 -5
  388. package/test/plugins/filemanager/index.js +19 -0
  389. package/test/plugins/postprocess/index.js +14 -0
  390. package/test/plugins/preprocess/index.js +19 -0
  391. package/test/plugins/visitor/index.js +24 -0
  392. package/test.less +1 -0
  393. package/.idea/codeStyleSettings.xml +0 -13
  394. package/.idea/encodings.xml +0 -5
  395. package/.idea/inspectionProfiles/Project_Default.xml +0 -8
  396. package/.idea/inspectionProfiles/profiles_settings.xml +0 -7
  397. package/.idea/jsLinters/jscs.xml +0 -4
  398. package/.idea/jsLinters/jshint.xml +0 -70
  399. package/.idea/libraries/sass_stdlib.xml +0 -8
  400. package/.idea/scopes/scope_settings.xml +0 -5
  401. package/projectFilesBackup/.idea/libraries/sass_stdlib.xml +0 -8
  402. package/test/less/errors/detached-ruleset-4.less +0 -5
  403. package/test/less/errors/detached-ruleset-4.txt +0 -4
  404. package/test/less/errors/parse-error-extra-parens.txt +0 -3
  405. package/test/sourcemaps/maps/import-map.map +0 -1
package/.jscsrc CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
3
- "disallowKeywords": ["with"],
4
- "disallowMixedSpacesAndTabs": true,
5
- "disallowMultipleLineBreaks": true,
6
- "disallowOperatorBeforeLineBreak": ["."],
7
- "disallowSpaceAfterKeywords": [
8
- "void"//,
9
- //"typeof"
10
- ],
11
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
12
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
13
- "disallowSpacesInCallExpression": true,
14
- "disallowSpacesInNamedFunctionExpression": {
15
- "beforeOpeningRoundBrace": true},
16
- "disallowTrailingComma": true,
17
- "disallowTrailingWhitespace": true,
18
- "maximumLineLength": 160,
19
- "requireCommaBeforeLineBreak": true,
20
- "requireCurlyBraces": [ "if",
21
- "else",
22
- "for",
23
- "while",
24
- "do",
25
- "try",
26
- "catch"],
27
- "requireOperatorBeforeLineBreak": [ "?",
28
- "=",
29
- "+",
30
- "-",
31
- "/",
32
- "*",
33
- "==",
34
- "===",
35
- "!=",
36
- "!==",
37
- ">",
38
- ">=",
39
- "<",
40
- "<="],
41
- "requireSpaceAfterBinaryOperators": true,
42
- "requireSpaceAfterKeywords": [
43
- "else",
44
- "case",
45
- "try",
46
- "typeof",
47
- "return",
48
- "if",
49
- "for",
50
- "while",
51
- "do"
52
- ],
53
- "requireSpaceBeforeBlockStatements": true,
54
- "requireSpaceBeforeBinaryOperators": [
55
- "=",
56
- "+",
57
- "-",
58
- "/",
59
- "*",
60
- "==",
61
- "===",
62
- "!=",
63
- "!=="
64
- ],
65
- "requireSpaceBeforeBlockStatements": true,
66
- "requireSpaceBetweenArguments": true,
67
- "requireSpacesInConditionalExpression": true,
68
- "requireSpacesInForStatement": true,
69
- "requireSpacesInNamedFunctionExpression": {
70
- "beforeOpeningCurlyBrace": true
71
- },
72
- "validateIndentation": 4
1
+ {
2
+ "disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
3
+ "disallowKeywords": ["with"],
4
+ "disallowMixedSpacesAndTabs": true,
5
+ "disallowMultipleLineBreaks": true,
6
+ "disallowOperatorBeforeLineBreak": ["."],
7
+ "disallowSpaceAfterKeywords": [
8
+ "void"//,
9
+ //"typeof"
10
+ ],
11
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
12
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
13
+ "disallowSpacesInCallExpression": true,
14
+ "disallowSpacesInNamedFunctionExpression": {
15
+ "beforeOpeningRoundBrace": true},
16
+ "disallowTrailingComma": true,
17
+ "disallowTrailingWhitespace": true,
18
+ "maximumLineLength": 160,
19
+ "requireCommaBeforeLineBreak": true,
20
+ "requireCurlyBraces": [ "if",
21
+ "else",
22
+ "for",
23
+ "while",
24
+ "do",
25
+ "try",
26
+ "catch"],
27
+ "requireOperatorBeforeLineBreak": [ "?",
28
+ "=",
29
+ "+",
30
+ "-",
31
+ "/",
32
+ "*",
33
+ "==",
34
+ "===",
35
+ "!=",
36
+ "!==",
37
+ ">",
38
+ ">=",
39
+ "<",
40
+ "<="],
41
+ "requireSpaceAfterBinaryOperators": true,
42
+ "requireSpaceAfterKeywords": [
43
+ "else",
44
+ "case",
45
+ "try",
46
+ "typeof",
47
+ "return",
48
+ "if",
49
+ "for",
50
+ "while",
51
+ "do"
52
+ ],
53
+ "requireSpaceBeforeBlockStatements": true,
54
+ "requireSpaceBeforeBinaryOperators": [
55
+ "=",
56
+ "+",
57
+ "-",
58
+ "/",
59
+ "*",
60
+ "==",
61
+ "===",
62
+ "!=",
63
+ "!=="
64
+ ],
65
+ "requireSpaceBeforeBlockStatements": true,
66
+ "requireSpaceBetweenArguments": true,
67
+ "requireSpacesInConditionalExpression": true,
68
+ "requireSpacesInForStatement": true,
69
+ "requireSpacesInNamedFunctionExpression": {
70
+ "beforeOpeningCurlyBrace": true
71
+ },
72
+ "validateIndentation": 4
73
73
  }
package/.travis.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  language: node_js
2
2
  node_js:
3
+ - "4.0.0"
3
4
  - "0.12"
4
5
  - "0.11"
5
6
  - "0.10"
package/CHANGELOG.md CHANGED
@@ -1,3 +1,49 @@
1
+ # 2.5.3
2
+
3
+ 2015-09-25
4
+
5
+ - Fix import inline a URL
6
+
7
+ # 2.5.2
8
+
9
+ 2015-09-24
10
+
11
+ - No output should result in an empty sourcemap
12
+ - Import inline located inside file imported by reference should not be present in output
13
+ - Shorthand colors will stay shorthand
14
+ - Make percentage work like other math functions and throw an error on NaN
15
+ - Fixed mixin definition matching problem when mixin definition contains parameters with default values
16
+ - Observe reference for imported comments
17
+
18
+ # 2.5.1
19
+
20
+ 2015-05-21
21
+
22
+ - Fix problems with less being async in some browsers
23
+ - Minor fix only likely to affect programmatic usage of ruleset find
24
+ - Fix error when a namespaced mixin is invoked in global scope
25
+
26
+ # 2.5.0
27
+
28
+ 2015-04-03
29
+
30
+ - supports the scoped `@plugin` directive to load function plugins
31
+ - All directives are bubbled (e.g. supports), not just media
32
+ - Performance improvements to the parser - should help non-chrome browsers with very large less files to be a lot quicker.
33
+ - the image size function respects include paths like other file functions
34
+ - colour functions take a relative argument that applies percentages relatively instead of absolutely
35
+ - include paths now allows : as a separator on windows (recognising and not splitting drive names by the backslash)
36
+ - `@import (css)` does not pull the directive above comments
37
+ - Fix for import statements without quotes sometimes causing issues
38
+ - replace supports dimensions and colours
39
+ - the browser field is set in the package.json for use with browserify
40
+ - another fix to support paths being passed as a string instead of an array
41
+ - detached rulesets can be used as default arguments
42
+ - Fix a lot of false warnings about extends
43
+ - errors written to stderr more consistently
44
+ - consistently keep units if strict units is off
45
+ - Better support for comments in function all arguments
46
+
1
47
  # 2.4.0
2
48
 
3
49
  2015-02-07
@@ -5,7 +51,7 @@
5
51
  - Support for plugins that pre-process (to add libraries silently etc.)
6
52
  - Empty sourcemaps now work
7
53
  - Extract and Length functions now ignore comments in a list (more work to come to fix the general problem)
8
- - fragment url's are treated absolute since they refer to the html document
54
+ - fragment urls are treated absolute since they refer to the html document
9
55
  - Extends on a selector joined with `&` now work better
10
56
  - Nested mixins work better with !important (regression in 2.3.0)
11
57
  - The promise dependency is now actually optional (introduced in 2.0.0)
@@ -23,7 +69,7 @@
23
69
 
24
70
  2015-01-27
25
71
 
26
- - add isruleset function
72
+ - add `isruleset` function
27
73
  - add optional import option, causing less to not fail if file not found
28
74
  - Fix browsers-side cache.
29
75
  - Many fixes to import reference - support `@support` and keyframe
@@ -47,12 +93,12 @@
47
93
  - The node version of less now has image-size, image-width, image-height which return the image dimensions of a file
48
94
  - Fixed an issue that could cause the parse to occur more than once and the callback be called multiple times
49
95
  - if you are outputting to the console, lessc defaults to silent so warnings do not end up in output
50
- - isunit function supports '' to test if a dimension has no unit
96
+ - `isunit` function supports `''` to test if a dimension has no unit
51
97
  - data-uri function now counts characters after base64 encoding instead of bytes before encoding to determine ie8 support
52
98
  - fix bug effecting guards on pseudo class selectors
53
99
  - do not cache on the browser when used with modifyVars
54
100
  - detection if less does not parse last character in file
55
- - detection of whether a file is css now requires /css, .css, ?css, &css instead of just css. You can still tell less the type of file using import options.
101
+ - detection of whether a file is css now requires `/css`, `.css`, `?css`, `&css` instead of just `css`. You can still tell less the type of file using import options.
56
102
  - remove extra new line added to sourcemap entry inline file
57
103
  - support safari extension
58
104
  - less.parse now exposes a way to get the AST. We do not recommend you use this unless you need to.
@@ -69,7 +115,7 @@
69
115
  2014-11-27
70
116
 
71
117
  - Improved keyword and anonymous usage with the replace function
72
- - Added getCSSAppendage to sourcemap builder to avoid duplication in plugins
118
+ - Added `getCSSAppendage` to sourcemap builder to avoid duplication in plugins
73
119
  - Fix problem with plugins when used with the promises version of render
74
120
  - If the render callback throws an exception it now propogates instead of calling the callback again with an error
75
121
 
@@ -77,7 +123,7 @@
77
123
 
78
124
  2014-11-23
79
125
 
80
- - Fixed isSync option, it was using sync file operations but promises are guaranteed to call back async. We now support promises as a feature rather than the 1st class way of doing things.
126
+ - Fixed `isSync` option, it was using sync file operations but promises are guaranteed to call back async. We now support promises as a feature rather than the 1st class way of doing things.
81
127
  - Browser code is now synchronous again, like in v1, meaning it blocks the site until less is compiled
82
128
  - Some fixes for variable imports which affected filemanagers when synchronous
83
129
  - Fixed lessc makefile dependencies option
@@ -97,7 +143,7 @@
97
143
  - browser tests now pass in IE 8-11 and FF
98
144
  - added index.js and browser.js in root as shortcuts
99
145
  - fixed some local variable spellings
100
- - support for @counter-style directive
146
+ - support for `@counter-style` directive
101
147
 
102
148
  # 2.0.0-b3
103
149
 
@@ -106,7 +152,7 @@
106
152
  - some refactoring of browser structure to allow use of api vs normal browser bundle
107
153
  - browser bundle no longer leaks require
108
154
  - browser can now be scoped with just window
109
- - browser useFileCache defaults to true, but file cache is now cleared when refreshing or in watch mode
155
+ - browser `useFileCache` defaults to `true`, but file cache is now cleared when refreshing or in watch mode
110
156
 
111
157
  # 2.0.0-b2
112
158
 
package/Gruntfile.js CHANGED
@@ -36,7 +36,7 @@ module.exports = function (grunt) {
36
36
  command: 'node test'
37
37
  },
38
38
  benchmark: {
39
- command: 'node benchmark/less-benchmark.js'
39
+ command: 'node benchmark/index.js'
40
40
  },
41
41
  "sourcemap-test": {
42
42
  command: [
@@ -51,7 +51,6 @@ module.exports = function (grunt) {
51
51
  src: ['./lib/less-browser/bootstrap.js'],
52
52
  options: {
53
53
  exclude: ["promise"],
54
- require: ["promise/polyfill.js"],
55
54
  browserifyOptions: {
56
55
  standalone: 'less'
57
56
  }
@@ -251,13 +250,45 @@ module.exports = function (grunt) {
251
250
  specs: 'test/browser/runner-postProcessor.js',
252
251
  outfile: 'tmp/browser/test-runner-post-processor.html'
253
252
  }
254
- }
253
+ },
254
+ postProcessorPlugin: {
255
+ src: ['test/less/postProcessorPlugin/*.less'],
256
+ options: {
257
+ helpers: ['test/plugins/postprocess/index.js','test/browser/runner-postProcessorPlugin-options.js'],
258
+ specs: 'test/browser/runner-postProcessorPlugin.js',
259
+ outfile: 'tmp/browser/test-runner-post-processor-plugin.html'
260
+ }
261
+ },
262
+ preProcessorPlugin: {
263
+ src: ['test/less/preProcessorPlugin/*.less'],
264
+ options: {
265
+ helpers: ['test/plugins/preprocess/index.js','test/browser/runner-preProcessorPlugin-options.js'],
266
+ specs: 'test/browser/runner-preProcessorPlugin.js',
267
+ outfile: 'tmp/browser/test-runner-pre-processor-plugin.html'
268
+ }
269
+ },
270
+ visitorPlugin: {
271
+ src: ['test/less/visitorPlugin/*.less'],
272
+ options: {
273
+ helpers: ['test/plugins/visitor/index.js','test/browser/runner-VisitorPlugin-options.js'],
274
+ specs: 'test/browser/runner-VisitorPlugin.js',
275
+ outfile: 'tmp/browser/test-runner-visitor-plugin.html'
276
+ }
277
+ },
278
+ filemanagerPlugin: {
279
+ src: ['test/less/filemanagerPlugin/*.less'],
280
+ options: {
281
+ helpers: ['test/plugins/filemanager/index.js','test/browser/runner-filemanagerPlugin-options.js'],
282
+ specs: 'test/browser/runner-filemanagerPlugin.js',
283
+ outfile: 'tmp/browser/test-runner-filemanager-plugin.html'
284
+ }
285
+ }
255
286
  },
256
287
 
257
288
  'saucelabs-jasmine': {
258
289
  all: {
259
290
  options: {
260
- urls: ["post-processor", "global-vars", "modify-vars", "production", "rootpath-relative",
291
+ urls: ["filemanager-plugin","visitor-plugin","pre-processor-plugin","post-processor-plugin","post-processor", "global-vars", "modify-vars", "production", "rootpath-relative",
261
292
  "rootpath", "relative-urls", "browser", "no-js-errors", "legacy", "strict-units"
262
293
  ].map(function(testName) {
263
294
  return "http://localhost:8081/tmp/browser/test-runner-" + testName + ".html";
@@ -320,7 +351,7 @@ module.exports = function (grunt) {
320
351
  });
321
352
 
322
353
  // Load these plugins to provide the necessary tasks
323
- require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
354
+ require('jit-grunt')(grunt);
324
355
 
325
356
  // Actually load this plugin's task(s).
326
357
  grunt.loadTasks('build/tasks');
@@ -330,18 +361,11 @@ module.exports = function (grunt) {
330
361
  'test'
331
362
  ]);
332
363
 
333
- grunt.registerTask('updateBowerJson', function () {
334
- var bowerJson = require('./bower.json');
335
- bowerJson.version = grunt.config('pkg.version');
336
- fs.writeFileSync('./bower.json', JSON.stringify(bowerJson, null, 2));
337
- });
338
-
339
364
  // Release
340
365
  grunt.registerTask('dist', [
341
366
  'browserify:browser',
342
367
  'concat:dist',
343
- 'uglify:dist',
344
- 'updateBowerJson'
368
+ 'uglify:dist'
345
369
  ]);
346
370
 
347
371
  // Release Rhino Version
@@ -418,6 +442,9 @@ module.exports = function (grunt) {
418
442
  // Run all tests
419
443
  grunt.registerTask('test', testTasks);
420
444
 
445
+ // Run all tests
446
+ grunt.registerTask('quicktest', testTasks.slice(0, testTasks.length -1));
447
+
421
448
  // generate a good test environment for testing sourcemaps
422
449
  grunt.registerTask('sourcemap-test', [
423
450
  'clean:sourcemap-test',
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  # [Less.js](http://lesscss.org)
6
6
 
7
+ [![Join the chat at https://gitter.im/less/less.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/less/less.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
8
+
7
9
  > The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org).
8
10
 
9
11
  This is the JavaScript, official, stable version of Less.
package/appveyor.yml CHANGED
@@ -2,14 +2,8 @@
2
2
  environment:
3
3
  matrix:
4
4
  - nodejs_version: "0.10"
5
- - nodejs_version: "0.11"
6
5
  - nodejs_version: "0.12"
7
6
 
8
- # Allow failing jobs for bleeding-edge Node.js versions.
9
- matrix:
10
- allow_failures:
11
- - nodejs_version: "0.11"
12
-
13
7
  # Install scripts. (runs after repo cloning)
14
8
  install:
15
9
  # Get the latest stable version of Node 0.STABLE.latest
package/bin/lessc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var path = require('path'),
4
4
  fs = require('../lib/less-node/fs'),
5
- os = require('os'),
5
+ os = require("os"),
6
6
  errno,
7
7
  mkdirp;
8
8
 
@@ -49,8 +49,9 @@ process.on('exit', function() { process.reallyExit(currentErrorcode); });
49
49
 
50
50
  var checkArgFunc = function(arg, option) {
51
51
  if (!option) {
52
- console.log(arg + " option requires a parameter");
52
+ console.error(arg + " option requires a parameter");
53
53
  continueProcessing = false;
54
+ currentErrorcode = 1;
54
55
  return false;
55
56
  }
56
57
  return true;
@@ -59,8 +60,9 @@ var checkArgFunc = function(arg, option) {
59
60
  var checkBooleanArg = function(arg) {
60
61
  var onOff = /^((on|t|true|y|yes)|(off|f|false|n|no))$/i.exec(arg);
61
62
  if (!onOff) {
62
- console.log(" unable to parse " + arg + " as a boolean. use one of on/t/true/y/yes/off/f/false/n/no");
63
+ console.error(" unable to parse " + arg + " as a boolean. use one of on/t/true/y/yes/off/f/false/n/no");
63
64
  continueProcessing = false;
65
+ currentErrorcode = 1;
64
66
  return false;
65
67
  }
66
68
  return Boolean(onOff[2]);
@@ -71,7 +73,6 @@ var parseVariableOption = function(option, variables) {
71
73
  variables[parts[0]] = parts[1];
72
74
  };
73
75
 
74
- var warningMessages = "";
75
76
  var sourceMapFileInline = false;
76
77
 
77
78
  function printUsage() {
@@ -152,7 +153,10 @@ function printUsage() {
152
153
  break;
153
154
  case 'include-path':
154
155
  if (checkArgFunc(arg, match[2])) {
155
- options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':')
156
+ // ; supported on windows.
157
+ // : supported on windows and linux, excluding a drive letter like C:\ so C:\file:D:\file parses to 2
158
+ options.paths = match[2]
159
+ .split(os.type().match(/Windows/) ? /:(?!\\)|;/ : ':')
156
160
  .map(function(p) {
157
161
  if (p) {
158
162
  return path.resolve(process.cwd(), p);
@@ -246,10 +250,8 @@ function printUsage() {
246
250
  if (plugin) {
247
251
  plugins.push(plugin);
248
252
  } else {
249
- console.log("Unable to load plugin " + name +
253
+ console.error("Unable to load plugin " + name +
250
254
  " please make sure that it is installed under or at the same level as less");
251
- console.log();
252
- printUsage();
253
255
  currentErrorcode = 1;
254
256
  }
255
257
  break;
@@ -258,11 +260,9 @@ function printUsage() {
258
260
  if (plugin) {
259
261
  plugins.push(plugin);
260
262
  } else {
261
- console.log("Unable to interpret argument " + arg +
263
+ console.error("Unable to interpret argument " + arg +
262
264
  " - if it is a plugin (less-plugin-" + arg + "), make sure that it is installed under or at" +
263
265
  " the same level as less");
264
- console.log();
265
- printUsage();
266
266
  currentErrorcode = 1;
267
267
  }
268
268
  break;
@@ -281,9 +281,6 @@ function printUsage() {
281
281
  var outputbase = args[2];
282
282
  if (output) {
283
283
  output = path.resolve(process.cwd(), output);
284
- if (warningMessages) {
285
- console.log(warningMessages);
286
- }
287
284
  }
288
285
 
289
286
  if (options.sourceMap) {
@@ -325,8 +322,8 @@ function printUsage() {
325
322
  }
326
323
 
327
324
  if (! input) {
328
- console.log("lessc: no input files");
329
- console.log("");
325
+ console.error("lessc: no input files");
326
+ console.error("");
330
327
  printUsage();
331
328
  currentErrorcode = 1;
332
329
  return;
@@ -356,6 +353,7 @@ function printUsage() {
356
353
 
357
354
  if (!sourceMapFileInline) {
358
355
  var writeSourceMap = function(output, onDone) {
356
+ output = output || "";
359
357
  var filename = sourceMapOptions.sourceMapFullFilename;
360
358
  ensureDirectory(filename);
361
359
  fs.writeFile(filename, output, 'utf8', function (err) {
@@ -366,8 +364,8 @@ function printUsage() {
366
364
  } else {
367
365
  description += err.code + " " + err.message;
368
366
  }
369
- less.logger.error('lessc: failed to create file ' + filename);
370
- less.logger.error(description);
367
+ console.error('lessc: failed to create file ' + filename);
368
+ console.error(description);
371
369
  } else {
372
370
  less.logger.info('lessc: wrote ' + filename);
373
371
  }
@@ -395,8 +393,8 @@ function printUsage() {
395
393
  } else {
396
394
  description += err.code + " " + err.message;
397
395
  }
398
- less.logger.error('lessc: failed to create file ' + output);
399
- less.logger.error(description);
396
+ console.error('lessc: failed to create file ' + output);
397
+ console.error(description);
400
398
  } else {
401
399
  less.logger.info('lessc: wrote ' + output);
402
400
  onSuccess();
@@ -420,7 +418,7 @@ function printUsage() {
420
418
 
421
419
  var parseLessFile = function (e, data) {
422
420
  if (e) {
423
- console.log("lessc: " + e.message);
421
+ console.error("lessc: " + e.message);
424
422
  currentErrorcode = 1;
425
423
  return;
426
424
  }
@@ -446,13 +444,13 @@ function printUsage() {
446
444
  }
447
445
  },
448
446
  warn: function(msg) {
449
- // do not show warning if outputting css to the console or the silent option is used
450
- if (!silent && output) {
447
+ // do not show warning if the silent option is used
448
+ if (!silent) {
451
449
  console.warn(msg);
452
450
  }
453
451
  },
454
452
  error: function(msg) {
455
- console.log(msg);
453
+ console.error(msg);
456
454
  }
457
455
  });
458
456
 
package/bower.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "name": "less",
3
- "version": "2.4.0",
4
3
  "main": "dist/less.js",
5
4
  "ignore": [
6
5
  "**/.*",
@@ -22,4 +21,4 @@
22
21
  ".jshintrc",
23
22
  ".npmignore"
24
23
  ]
25
- }
24
+ }