less 2.1.1 → 2.3.1
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.
- package/.idea/inspectionProfiles/Project_Default.xml +1 -0
- package/.idea/jsLinters/jscs.xml +4 -0
- package/.idea/jsLinters/jshint.xml +58 -4
- package/.idea/workspace.xml +451 -758
- package/.jscsrc +38 -0
- package/.jshintrc +0 -2
- package/.travis.yml +0 -1
- package/CHANGELOG.md +52 -0
- package/Gruntfile.js +37 -3
- package/bin/lessc +380 -316
- package/bower.json +1 -1
- package/dist/less.js +790 -479
- package/dist/less.min.js +7 -7
- package/lib/less/contexts.js +1 -1
- package/lib/less/data/unit-conversions.js +3 -3
- package/lib/less/environment/abstract-file-manager.js +4 -4
- package/lib/less/environment/environment.js +9 -0
- package/lib/less/functions/color-blending.js +3 -3
- package/lib/less/functions/color.js +8 -8
- package/lib/less/functions/data-uri.js +39 -31
- package/lib/less/functions/string.js +3 -1
- package/lib/less/functions/svg.js +12 -15
- package/lib/less/functions/types.js +15 -2
- package/lib/less/import-manager.js +10 -5
- package/lib/less/index.js +2 -1
- package/lib/less/parse-tree.js +8 -2
- package/lib/less/parse.js +65 -0
- package/lib/less/parser/parser-input.js +3 -2
- package/lib/less/parser/parser.js +24 -11
- package/lib/less/render.js +7 -36
- package/lib/less/source-map-output.js +3 -3
- package/lib/less/transform-tree.js +1 -1
- package/lib/less/tree/assignment.js +0 -1
- package/lib/less/tree/color.js +4 -4
- package/lib/less/tree/condition.js +1 -1
- package/lib/less/tree/debug-info.js +6 -2
- package/lib/less/tree/dimension.js +1 -1
- package/lib/less/tree/directive.js +25 -6
- package/lib/less/tree/expression.js +1 -1
- package/lib/less/tree/import.js +2 -2
- package/lib/less/tree/index.js +1 -0
- package/lib/less/tree/media.js +3 -2
- package/lib/less/tree/mixin-call.js +3 -4
- package/lib/less/tree/mixin-definition.js +4 -3
- package/lib/less/tree/quoted.js +1 -1
- package/lib/less/tree/rule.js +2 -3
- package/lib/less/tree/ruleset.js +263 -157
- package/lib/less/tree/selector.js +2 -1
- package/lib/less/tree/url.js +5 -2
- package/lib/less/tree/value.js +1 -1
- package/lib/less/tree/variable.js +1 -1
- package/lib/less/visitors/extend-visitor.js +60 -25
- package/lib/less/visitors/import-sequencer.js +20 -14
- package/lib/less/visitors/import-visitor.js +13 -10
- package/lib/less/visitors/to-css-visitor.js +37 -5
- package/lib/less-browser/add-default-options.js +5 -1
- package/lib/less-browser/bootstrap.js +10 -8
- package/lib/less-browser/cache.js +1 -1
- package/lib/less-browser/index.js +13 -12
- package/lib/less-browser/utils.js +9 -6
- package/lib/less-node/file-manager.js +51 -28
- package/lib/less-node/image-size.js +34 -0
- package/lib/less-node/index.js +3 -0
- package/lib/less-node/lessc-helper.js +3 -2
- package/lib/less-node/url-file-manager.js +2 -2
- package/lib/less-rhino/index.js +2 -4
- package/package.json +10 -7
- package/test/browser/common.js +13 -11
- package/test/browser/css/urls.css +6 -3
- package/test/browser/jasmine-jsreporter.js +2 -3
- package/test/browser/less/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
- package/test/browser/less/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
- package/test/browser/less/urls.less +1 -0
- package/test/browser/less.js +15 -9424
- package/test/browser/runner-errors-options.js +0 -1
- package/test/browser/runner-errors-spec.js +0 -1
- package/test/browser/runner-legacy-options.js +0 -1
- package/test/browser/runner-no-js-errors-spec.js +0 -1
- package/test/browser/runner-production-options.js +0 -1
- package/test/browser/runner-relative-urls-options.js +0 -1
- package/test/browser/runner-rootpath-options.js +0 -1
- package/test/browser/runner-rootpath-relative-options.js +0 -1
- package/test/browser/runner-strict-units-options.js +0 -1
- package/test/copy-bom.js +72 -0
- package/test/css/comments.css +1 -0
- package/test/css/css-3.css +2 -0
- package/test/css/functions.css +2 -0
- package/test/css/import-interpolation.css +6 -0
- package/test/css/import-reference.css +25 -0
- package/test/css/include-path/include-path.css +6 -0
- package/test/css/mixins-important.css +6 -0
- package/test/css/selectors.css +10 -1
- package/test/css/url-args/urls.css +3 -3
- package/test/css/urls.css +12 -4
- package/test/css/variables.css +7 -1
- package/test/data/image.svg +3 -0
- package/test/index.js +14 -10
- package/test/less/comments.less +1 -0
- package/test/less/css-3.less +3 -0
- package/test/less/css-guards.less +2 -1
- package/test/less/errors/detached-ruleset-2.txt +1 -1
- package/test/less/errors/import-missing.txt +1 -1
- package/test/less/errors/parens-error-1.txt +1 -1
- package/test/less/errors/parens-error-2.txt +1 -1
- package/test/less/errors/parens-error-3.txt +1 -1
- package/test/less/errors/single-character.less +1 -0
- package/test/less/errors/single-character.txt +2 -0
- package/test/less/functions.less +5 -0
- package/test/less/import/import-interpolation.less +1 -0
- package/test/less/import/import-reference.less +38 -0
- package/test/less/import-reference.less +3 -1
- package/test/less/import.less +2 -0
- package/test/less/include-path/include-path.less +6 -0
- package/test/less/mixins-important.less +12 -0
- package/test/less/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
- package/test/less/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
- package/test/less/selectors.less +19 -4
- package/test/less/urls.less +10 -1
- package/test/less/variables.less +17 -3
- package/test/less-bom/charsets.less +3 -0
- package/test/less-bom/colors.less +98 -0
- package/test/less-bom/comments.less +102 -0
- package/test/less-bom/comments2.less +20 -0
- package/test/less-bom/compression/compression.less +36 -0
- package/test/less-bom/css-3.less +154 -0
- package/test/less-bom/css-escapes.less +33 -0
- package/test/less-bom/css-guards.less +103 -0
- package/test/less-bom/css.less +108 -0
- package/test/less-bom/debug/import/test.less +25 -0
- package/test/less-bom/debug/linenumbers.less +33 -0
- package/test/less-bom/detached-rulesets.less +103 -0
- package/test/less-bom/empty.less +1 -0
- package/test/less-bom/errors/add-mixed-units.less +3 -0
- package/test/less-bom/errors/add-mixed-units.txt +4 -0
- package/test/less-bom/errors/add-mixed-units2.less +3 -0
- package/test/less-bom/errors/add-mixed-units2.txt +4 -0
- package/test/less-bom/errors/at-rules-undefined-var.less +4 -0
- package/test/less-bom/errors/at-rules-undefined-var.txt +4 -0
- package/test/less-bom/errors/bad-variable-declaration1.less +1 -0
- package/test/less-bom/errors/bad-variable-declaration1.txt +2 -0
- package/test/less-bom/errors/color-func-invalid-color.less +3 -0
- package/test/less-bom/errors/color-func-invalid-color.txt +4 -0
- package/test/less-bom/errors/color-invalid-hex-code.less +3 -0
- package/test/less-bom/errors/color-invalid-hex-code.txt +4 -0
- package/test/less-bom/errors/color-invalid-hex-code2.less +3 -0
- package/test/less-bom/errors/color-invalid-hex-code2.txt +4 -0
- package/test/less-bom/errors/css-guard-default-func.less +4 -0
- package/test/less-bom/errors/css-guard-default-func.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-1.less +6 -0
- package/test/less-bom/errors/detached-ruleset-1.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-2.less +6 -0
- package/test/less-bom/errors/detached-ruleset-2.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-3.less +4 -0
- package/test/less-bom/errors/detached-ruleset-3.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-4.less +5 -0
- package/test/less-bom/errors/detached-ruleset-4.txt +4 -0
- package/test/less-bom/errors/detached-ruleset-5.less +4 -0
- package/test/less-bom/errors/detached-ruleset-5.txt +3 -0
- package/test/less-bom/errors/detached-ruleset-6.less +5 -0
- package/test/less-bom/errors/detached-ruleset-6.txt +4 -0
- package/test/less-bom/errors/divide-mixed-units.less +3 -0
- package/test/less-bom/errors/divide-mixed-units.txt +4 -0
- package/test/less-bom/errors/extend-no-selector.less +3 -0
- package/test/less-bom/errors/extend-no-selector.txt +3 -0
- package/test/less-bom/errors/extend-not-at-end.less +3 -0
- package/test/less-bom/errors/extend-not-at-end.txt +3 -0
- package/test/less-bom/errors/import-malformed.less +1 -0
- package/test/less-bom/errors/import-malformed.txt +3 -0
- package/test/less-bom/errors/import-missing.less +6 -0
- package/test/less-bom/errors/import-missing.txt +3 -0
- package/test/less-bom/errors/import-no-semi.less +1 -0
- package/test/less-bom/errors/import-no-semi.txt +2 -0
- package/test/less-bom/errors/import-subfolder1.less +1 -0
- package/test/less-bom/errors/import-subfolder1.txt +3 -0
- package/test/less-bom/errors/import-subfolder2.less +1 -0
- package/test/less-bom/errors/import-subfolder2.txt +4 -0
- package/test/less-bom/errors/imports/import-subfolder1.less +1 -0
- package/test/less-bom/errors/imports/import-subfolder2.less +1 -0
- package/test/less-bom/errors/imports/import-test.less +4 -0
- package/test/less-bom/errors/imports/subfolder/mixin-not-defined.less +1 -0
- package/test/less-bom/errors/imports/subfolder/parse-error-curly-bracket.less +1 -0
- package/test/less-bom/errors/javascript-error.less +3 -0
- package/test/less-bom/errors/javascript-error.txt +4 -0
- package/test/less-bom/errors/javascript-undefined-var.less +3 -0
- package/test/less-bom/errors/javascript-undefined-var.txt +4 -0
- package/test/less-bom/errors/mixed-mixin-definition-args-1.less +6 -0
- package/test/less-bom/errors/mixed-mixin-definition-args-1.txt +4 -0
- package/test/less-bom/errors/mixed-mixin-definition-args-2.less +6 -0
- package/test/less-bom/errors/mixed-mixin-definition-args-2.txt +4 -0
- package/test/less-bom/errors/mixin-not-defined.less +11 -0
- package/test/less-bom/errors/mixin-not-defined.txt +3 -0
- package/test/less-bom/errors/mixin-not-matched.less +6 -0
- package/test/less-bom/errors/mixin-not-matched.txt +3 -0
- package/test/less-bom/errors/mixin-not-matched2.less +6 -0
- package/test/less-bom/errors/mixin-not-matched2.txt +3 -0
- package/test/less-bom/errors/mixin-not-visible-in-scope-1.less +9 -0
- package/test/less-bom/errors/mixin-not-visible-in-scope-1.txt +4 -0
- package/test/less-bom/errors/mixins-guards-default-func-1.less +9 -0
- package/test/less-bom/errors/mixins-guards-default-func-1.txt +4 -0
- package/test/less-bom/errors/mixins-guards-default-func-2.less +9 -0
- package/test/less-bom/errors/mixins-guards-default-func-2.txt +4 -0
- package/test/less-bom/errors/mixins-guards-default-func-3.less +9 -0
- package/test/less-bom/errors/mixins-guards-default-func-3.txt +4 -0
- package/test/less-bom/errors/multiple-guards-on-css-selectors.less +4 -0
- package/test/less-bom/errors/multiple-guards-on-css-selectors.txt +4 -0
- package/test/less-bom/errors/multiple-guards-on-css-selectors2.less +4 -0
- package/test/less-bom/errors/multiple-guards-on-css-selectors2.txt +4 -0
- package/test/less-bom/errors/multiply-mixed-units.less +7 -0
- package/test/less-bom/errors/multiply-mixed-units.txt +4 -0
- package/test/less-bom/errors/parens-error-1.less +3 -0
- package/test/less-bom/errors/parens-error-1.txt +4 -0
- package/test/less-bom/errors/parens-error-2.less +3 -0
- package/test/less-bom/errors/parens-error-2.txt +4 -0
- package/test/less-bom/errors/parens-error-3.less +3 -0
- package/test/less-bom/errors/parens-error-3.txt +4 -0
- package/test/less-bom/errors/parse-error-curly-bracket.less +4 -0
- package/test/less-bom/errors/parse-error-curly-bracket.txt +4 -0
- package/test/less-bom/errors/parse-error-extra-parens.less +5 -0
- package/test/less-bom/errors/parse-error-extra-parens.txt +3 -0
- package/test/less-bom/errors/parse-error-missing-bracket.less +2 -0
- package/test/less-bom/errors/parse-error-missing-bracket.txt +3 -0
- package/test/less-bom/errors/parse-error-missing-parens.less +5 -0
- package/test/less-bom/errors/parse-error-missing-parens.txt +3 -0
- package/test/less-bom/errors/parse-error-with-import.less +13 -0
- package/test/less-bom/errors/parse-error-with-import.txt +4 -0
- package/test/less-bom/errors/percentage-missing-space.less +3 -0
- package/test/less-bom/errors/percentage-missing-space.txt +4 -0
- package/test/less-bom/errors/property-asterisk-only-name.less +3 -0
- package/test/less-bom/errors/property-asterisk-only-name.txt +4 -0
- package/test/less-bom/errors/property-ie5-hack.less +3 -0
- package/test/less-bom/errors/property-ie5-hack.txt +3 -0
- package/test/less-bom/errors/property-in-root.less +4 -0
- package/test/less-bom/errors/property-in-root.txt +4 -0
- package/test/less-bom/errors/property-in-root2.less +1 -0
- package/test/less-bom/errors/property-in-root2.txt +4 -0
- package/test/less-bom/errors/property-in-root3.less +4 -0
- package/test/less-bom/errors/property-in-root3.txt +3 -0
- package/test/less-bom/errors/property-interp-not-defined.less +1 -0
- package/test/less-bom/errors/property-interp-not-defined.txt +2 -0
- package/test/less-bom/errors/recursive-variable.less +1 -0
- package/test/less-bom/errors/recursive-variable.txt +2 -0
- package/test/less-bom/errors/single-character.less +1 -0
- package/test/less-bom/errors/single-character.txt +2 -0
- package/test/less-bom/errors/svg-gradient1.less +3 -0
- package/test/less-bom/errors/svg-gradient1.txt +4 -0
- package/test/less-bom/errors/svg-gradient2.less +3 -0
- package/test/less-bom/errors/svg-gradient2.txt +4 -0
- package/test/less-bom/errors/svg-gradient3.less +3 -0
- package/test/less-bom/errors/svg-gradient3.txt +4 -0
- package/test/less-bom/errors/unit-function.less +3 -0
- package/test/less-bom/errors/unit-function.txt +4 -0
- package/test/less-bom/extend-chaining.less +91 -0
- package/test/less-bom/extend-clearfix.less +19 -0
- package/test/less-bom/extend-exact.less +46 -0
- package/test/less-bom/extend-media.less +24 -0
- package/test/less-bom/extend-nest.less +65 -0
- package/test/less-bom/extend-selector.less +99 -0
- package/test/less-bom/extend.less +81 -0
- package/test/less-bom/extract-and-length.less +133 -0
- package/test/less-bom/functions.less +201 -0
- package/test/less-bom/globalVars/extended.json +5 -0
- package/test/less-bom/globalVars/extended.less +10 -0
- package/test/less-bom/globalVars/simple.json +3 -0
- package/test/less-bom/globalVars/simple.less +3 -0
- package/test/less-bom/ie-filters.less +15 -0
- package/test/less-bom/import/deeper/deeper-2/url-import-2.less +3 -0
- package/test/less-bom/import/deeper/deeper-2/url-import.less +1 -0
- package/test/less-bom/import/deeper/import-once-test-a.less +1 -0
- package/test/less-bom/import/deeper/url-import.less +1 -0
- package/test/less-bom/import/import-and-relative-paths-test.less +17 -0
- package/test/less-bom/import/import-charset-test.less +1 -0
- package/test/less-bom/import/import-interpolation.less +2 -0
- package/test/less-bom/import/import-interpolation2.less +5 -0
- package/test/less-bom/import/import-once-test-c.less +6 -0
- package/test/less-bom/import/import-reference.less +89 -0
- package/test/less-bom/import/import-test-a.less +4 -0
- package/test/less-bom/import/import-test-b.less +8 -0
- package/test/less-bom/import/import-test-c.less +6 -0
- package/test/less-bom/import/import-test-d.css +1 -0
- package/test/less-bom/import/import-test-e.less +2 -0
- package/test/less-bom/import/import-test-f.less +5 -0
- package/test/less-bom/import/imports/font.less +8 -0
- package/test/less-bom/import/imports/logo.less +5 -0
- package/test/less-bom/import/interpolation-vars.less +6 -0
- package/test/less-bom/import/invalid-css.less +1 -0
- package/test/less-bom/import/urls.less +1 -0
- package/test/less-bom/import-inline.less +3 -0
- package/test/less-bom/import-interpolation.less +8 -0
- package/test/less-bom/import-once.less +6 -0
- package/test/less-bom/import-reference.less +23 -0
- package/test/less-bom/import.less +30 -0
- package/test/less-bom/include-path/include-path.less +6 -0
- package/test/less-bom/javascript.less +38 -0
- package/test/less-bom/lazy-eval.less +6 -0
- package/test/less-bom/legacy/legacy.less +7 -0
- package/test/less-bom/media.less +234 -0
- package/test/less-bom/merge.less +78 -0
- package/test/less-bom/mixins-args.less +215 -0
- package/test/less-bom/mixins-closure.less +26 -0
- package/test/less-bom/mixins-guards-default-func.less +195 -0
- package/test/less-bom/mixins-guards.less +271 -0
- package/test/less-bom/mixins-important.less +37 -0
- package/test/less-bom/mixins-interpolated.less +75 -0
- package/test/less-bom/mixins-named-args.less +36 -0
- package/test/less-bom/mixins-nested.less +22 -0
- package/test/less-bom/mixins-pattern.less +102 -0
- package/test/less-bom/mixins.less +145 -0
- package/test/less-bom/modifyVars/extended.json +5 -0
- package/test/less-bom/modifyVars/extended.less +11 -0
- package/test/less-bom/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
- package/test/less-bom/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
- package/test/less-bom/no-js-errors/no-js-errors.less +3 -0
- package/test/less-bom/no-js-errors/no-js-errors.txt +4 -0
- package/test/less-bom/no-output.less +2 -0
- package/test/less-bom/operations.less +62 -0
- package/test/less-bom/parens.less +45 -0
- package/test/less-bom/property-name-interp.less +56 -0
- package/test/less-bom/rulesets.less +30 -0
- package/test/less-bom/scope.less +104 -0
- package/test/less-bom/selectors.less +174 -0
- package/test/less-bom/sourcemaps/basic.json +3 -0
- package/test/less-bom/sourcemaps/basic.less +27 -0
- package/test/less-bom/sourcemaps/imported.css +7 -0
- package/test/less-bom/static-urls/urls.less +33 -0
- package/test/less-bom/strict-units/strict-units.less +4 -0
- package/test/less-bom/strings.less +73 -0
- package/test/less-bom/url-args/urls.less +63 -0
- package/test/less-bom/urls.less +94 -0
- package/test/less-bom/variables-in-at-rules.less +20 -0
- package/test/less-bom/variables.less +119 -0
- package/test/less-bom/whitespace.less +44 -0
- package/test/less-test.js +127 -28
- package/test/modify-vars.js +6 -4
package/.jscsrc
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
|
|
3
|
+
"disallowKeywords": ["with"],
|
|
4
|
+
"disallowMixedSpacesAndTabs": true,
|
|
5
|
+
"disallowMultipleLineBreaks": true,
|
|
6
|
+
"disallowOperatorBeforeLineBreak": ["."],
|
|
7
|
+
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
|
|
8
|
+
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
|
9
|
+
"disallowSpacesInCallExpression": true,
|
|
10
|
+
"disallowSpacesInNamedFunctionExpression": {
|
|
11
|
+
"beforeOpeningRoundBrace": true},
|
|
12
|
+
"disallowTrailingComma": true,
|
|
13
|
+
"disallowTrailingWhitespace": true,
|
|
14
|
+
"maximumLineLength": 160,
|
|
15
|
+
"requireCommaBeforeLineBreak": true,
|
|
16
|
+
"requireCurlyBraces": [ "if",
|
|
17
|
+
"else",
|
|
18
|
+
"for",
|
|
19
|
+
"while",
|
|
20
|
+
"do",
|
|
21
|
+
"try",
|
|
22
|
+
"catch"],
|
|
23
|
+
"requireOperatorBeforeLineBreak": [ "?",
|
|
24
|
+
"=",
|
|
25
|
+
"+",
|
|
26
|
+
"-",
|
|
27
|
+
"/",
|
|
28
|
+
"*",
|
|
29
|
+
"==",
|
|
30
|
+
"===",
|
|
31
|
+
"!=",
|
|
32
|
+
"!==",
|
|
33
|
+
">",
|
|
34
|
+
">=",
|
|
35
|
+
"<",
|
|
36
|
+
"<="],
|
|
37
|
+
"requireSpaceAfterBinaryOperators": true
|
|
38
|
+
}
|
package/.jshintrc
CHANGED
package/.travis.yml
CHANGED
|
@@ -5,7 +5,6 @@ node_js:
|
|
|
5
5
|
install:
|
|
6
6
|
- npm install -g grunt-cli
|
|
7
7
|
- npm install
|
|
8
|
-
env:
|
|
9
8
|
env:
|
|
10
9
|
global:
|
|
11
10
|
- secure: TrNVruWYaUK5ALga1y7wRY+MLjWJECUSCsBmKW5EUmIevOUxqHWu7M89FANKxstEeFRRAGH3QJbloRxnzIgh0U0ah5npE9XA1bYXGO5khoXeIyk7pNRfjIo8aEnJH1Vp8vWA6J6ovxdJ7lCFKEGvGKxGde50knVl7KFVVULlX2U=
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
# 2.3.1
|
|
2
|
+
|
|
3
|
+
2015-01-28
|
|
4
|
+
|
|
5
|
+
- Fix depends option (regression in 2.3.0)
|
|
6
|
+
- Support parent selector (`&`) used in sub element expression (e.g. `:not(.c_&)`)
|
|
7
|
+
|
|
8
|
+
# 2.3.0
|
|
9
|
+
|
|
10
|
+
2015-01-27
|
|
11
|
+
|
|
12
|
+
- add isruleset function
|
|
13
|
+
- add optional import option, causing less to not fail if file not found
|
|
14
|
+
- Fix browsers-side cache.
|
|
15
|
+
- Many fixes to import reference - support `@support` and keyframe
|
|
16
|
+
- Selectors now interpolate pseudo selectors (e.g. `:@{hover}`)
|
|
17
|
+
- Fix comments missed off if they were at the end of the file
|
|
18
|
+
- Fix !important used with parametric mixins
|
|
19
|
+
- Emits warnings for extends when the target is not found
|
|
20
|
+
- include-path now works on data-uri
|
|
21
|
+
- variables and function calls work for path in data-uri
|
|
22
|
+
- Fix absolute paths not working on imports sometimes.
|
|
23
|
+
- Unicode BOM removed again
|
|
24
|
+
- Misc. bug fixes
|
|
25
|
+
|
|
26
|
+
# 2.2.0
|
|
27
|
+
|
|
28
|
+
2015-01-04
|
|
29
|
+
|
|
30
|
+
- do not apply relative paths to svg-gradient and data-uri functions data-uri output
|
|
31
|
+
- using import filename interpolation and import inline together now works
|
|
32
|
+
- deprecate the compression option (still works, but outputs a warning unless silent)
|
|
33
|
+
- The node version of less now has image-size, image-width, image-height which return the image dimensions of a file
|
|
34
|
+
- Fixed an issue that could cause the parse to occur more than once and the callback be called multiple times
|
|
35
|
+
- if you are outputting to the console, lessc defaults to silent so warnings do not end up in output
|
|
36
|
+
- isunit function supports '' to test if a dimension has no unit
|
|
37
|
+
- data-uri function now counts characters after base64 encoding instead of bytes before encoding to determine ie8 support
|
|
38
|
+
- fix bug effecting guards on pseudo class selectors
|
|
39
|
+
- do not cache on the browser when used with modifyVars
|
|
40
|
+
- detection if less does not parse last character in file
|
|
41
|
+
- 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.
|
|
42
|
+
- remove extra new line added to sourcemap entry inline file
|
|
43
|
+
- support safari extension
|
|
44
|
+
- less.parse now exposes a way to get the AST. We do not recommend you use this unless you need to.
|
|
45
|
+
|
|
46
|
+
# 2.1.2
|
|
47
|
+
|
|
48
|
+
2014-12-20
|
|
49
|
+
|
|
50
|
+
- Fix for use with requirejs
|
|
51
|
+
- Fixes for data-uri function
|
|
52
|
+
|
|
1
53
|
# 2.1.1
|
|
2
54
|
|
|
3
55
|
2014-11-27
|
package/Gruntfile.js
CHANGED
|
@@ -6,6 +6,8 @@ module.exports = function (grunt) {
|
|
|
6
6
|
// Report the elapsed execution time of tasks.
|
|
7
7
|
require('time-grunt')(grunt);
|
|
8
8
|
|
|
9
|
+
var COMPRESS_FOR_TESTS = true;
|
|
10
|
+
|
|
9
11
|
// Project configuration.
|
|
10
12
|
grunt.initConfig({
|
|
11
13
|
|
|
@@ -63,7 +65,7 @@ module.exports = function (grunt) {
|
|
|
63
65
|
banner: '<%= meta.banner %>'
|
|
64
66
|
},
|
|
65
67
|
browsertest: {
|
|
66
|
-
src: '<%= browserify.browser.dest %>',
|
|
68
|
+
src: COMPRESS_FOR_TESTS ? '<%= uglify.test.dest %>' : '<%= browserify.browser.dest %>',
|
|
67
69
|
dest: 'test/browser/less.js'
|
|
68
70
|
},
|
|
69
71
|
dist: {
|
|
@@ -93,11 +95,18 @@ module.exports = function (grunt) {
|
|
|
93
95
|
uglify: {
|
|
94
96
|
options: {
|
|
95
97
|
banner: '<%= meta.banner %>',
|
|
96
|
-
mangle: true
|
|
98
|
+
mangle: true,
|
|
99
|
+
compress: {
|
|
100
|
+
pure_getters: true
|
|
101
|
+
}
|
|
97
102
|
},
|
|
98
103
|
dist: {
|
|
99
104
|
src: ['<%= concat.dist.dest %>'],
|
|
100
105
|
dest: 'dist/less.min.js'
|
|
106
|
+
},
|
|
107
|
+
test: {
|
|
108
|
+
src: '<%= browserify.browser.dest %>',
|
|
109
|
+
dest: 'tmp/less.min.js'
|
|
101
110
|
}
|
|
102
111
|
},
|
|
103
112
|
|
|
@@ -115,6 +124,13 @@ module.exports = function (grunt) {
|
|
|
115
124
|
}
|
|
116
125
|
},
|
|
117
126
|
|
|
127
|
+
jscs: {
|
|
128
|
+
src: ["test/**/*.js", "lib/less*/**/*.js", "bin/lessc"],
|
|
129
|
+
options: {
|
|
130
|
+
config: ".jscsrc"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
|
|
118
134
|
connect: {
|
|
119
135
|
server: {
|
|
120
136
|
options: {
|
|
@@ -297,7 +313,7 @@ module.exports = function (grunt) {
|
|
|
297
313
|
|
|
298
314
|
// Clean the version of less built for the tests
|
|
299
315
|
clean: {
|
|
300
|
-
test: ['test/browser/less.js', 'tmp'],
|
|
316
|
+
test: ['test/browser/less.js', 'tmp', 'test/less-bom'],
|
|
301
317
|
"sourcemap-test": ['test/sourcemaps/*.css', 'test/sourcemaps/*.map'],
|
|
302
318
|
sauce_log: ["sc_*.log"]
|
|
303
319
|
}
|
|
@@ -338,6 +354,7 @@ module.exports = function (grunt) {
|
|
|
338
354
|
// Create the browser version of less.js
|
|
339
355
|
grunt.registerTask('browsertest-lessjs', [
|
|
340
356
|
'browserify:browser',
|
|
357
|
+
'uglify:test',
|
|
341
358
|
'concat:browsertest'
|
|
342
359
|
]);
|
|
343
360
|
|
|
@@ -355,6 +372,20 @@ module.exports = function (grunt) {
|
|
|
355
372
|
'connect::keepalive'
|
|
356
373
|
]);
|
|
357
374
|
|
|
375
|
+
var previous_force_state = grunt.option("force");
|
|
376
|
+
|
|
377
|
+
grunt.registerTask("force",function(set){
|
|
378
|
+
if (set === "on") {
|
|
379
|
+
grunt.option("force",true);
|
|
380
|
+
}
|
|
381
|
+
else if (set === "off") {
|
|
382
|
+
grunt.option("force",false);
|
|
383
|
+
}
|
|
384
|
+
else if (set === "restore") {
|
|
385
|
+
grunt.option("force",previous_force_state);
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
|
|
358
389
|
grunt.registerTask('sauce', [
|
|
359
390
|
'browsertest-lessjs',
|
|
360
391
|
'jasmine::build',
|
|
@@ -371,6 +402,7 @@ module.exports = function (grunt) {
|
|
|
371
402
|
var testTasks = [
|
|
372
403
|
'clean',
|
|
373
404
|
'jshint',
|
|
405
|
+
'jscs',
|
|
374
406
|
'shell:test',
|
|
375
407
|
'browsertest'
|
|
376
408
|
];
|
|
@@ -378,7 +410,9 @@ module.exports = function (grunt) {
|
|
|
378
410
|
if (isNaN(Number(process.env.TRAVIS_PULL_REQUEST, 10)) &&
|
|
379
411
|
Number(process.env.TRAVIS_NODE_VERSION) === 0.11 &&
|
|
380
412
|
(process.env.TRAVIS_BRANCH === "master" || process.env.TRAVIS_BRANCH === "sauce")) {
|
|
413
|
+
testTasks.push("force:on");
|
|
381
414
|
testTasks.push("sauce-after-setup");
|
|
415
|
+
testTasks.push("force:off");
|
|
382
416
|
}
|
|
383
417
|
|
|
384
418
|
// Run all tests
|