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.
- package/.idea/jsLibraryMappings.xml +7 -7
- package/.idea/less.js.iml +9 -16
- package/.idea/libraries/less_js_node_modules.xml +14 -0
- package/.idea/misc.xml +14 -5
- package/.idea/modules.xml +8 -9
- package/.idea/vcs.xml +6 -7
- package/.idea/workspace.xml +592 -806
- package/.jscsrc +72 -72
- package/.travis.yml +1 -0
- package/CHANGELOG.md +54 -8
- package/Gruntfile.js +40 -13
- package/README.md +2 -0
- package/appveyor.yml +0 -6
- package/bin/lessc +22 -24
- package/bower.json +1 -2
- package/dist/less-rolledup.js +8572 -0
- package/dist/less.js +807 -401
- package/dist/less.min.js +9 -8
- package/lib/less/contexts.js +2 -0
- package/lib/less/environment/abstract-file-manager.js +5 -1
- package/lib/less/functions/color.js +46 -12
- package/lib/less/functions/function-caller.js +31 -2
- package/lib/less/functions/function-registry.js +28 -17
- package/lib/less/functions/math-helper.js +16 -0
- package/lib/less/functions/math.js +4 -16
- package/lib/less/functions/number.js +7 -2
- package/lib/less/functions/string.js +5 -3
- package/lib/less/functions/svg.js +19 -11
- package/lib/less/functions/types.js +1 -6
- package/lib/less/import-manager.js +8 -3
- package/lib/less/index.js +1 -1
- package/lib/less/parser/parser-input.js +55 -54
- package/lib/less/parser/parser.js +168 -52
- package/lib/less/plugins/function-importer.js +35 -0
- package/lib/less/source-map-output.js +1 -2
- package/lib/less/tree/anonymous.js +10 -2
- package/lib/less/tree/color.js +4 -1
- package/lib/less/tree/comment.js +0 -3
- package/lib/less/tree/dimension.js +5 -3
- package/lib/less/tree/directive.js +40 -15
- package/lib/less/tree/expression.js +5 -0
- package/lib/less/tree/import.js +22 -10
- package/lib/less/tree/media.js +3 -23
- package/lib/less/tree/mixin-call.js +17 -7
- package/lib/less/tree/mixin-definition.js +20 -6
- package/lib/less/tree/rule.js +19 -1
- package/lib/less/tree/ruleset.js +40 -27
- package/lib/less/tree/selector.js +8 -1
- package/lib/less/visitors/extend-visitor.js +1 -4
- package/lib/less/visitors/import-visitor.js +17 -2
- package/lib/less/visitors/join-selector-visitor.js +6 -0
- package/lib/less/visitors/to-css-visitor.js +48 -14
- package/lib/less-browser/bootstrap.js +5 -6
- package/lib/less-browser/index.js +20 -12
- package/lib/less-node/image-size.js +54 -31
- package/lib/less-node/index.js +1 -1
- package/lib/less-node/lessc-helper.js +2 -2
- package/lib/less-rhino/index.js +12 -8
- package/package.json +9 -13
- package/test/browser/less/urls.less +7 -1
- package/test/browser/less.js +30 -0
- package/test/browser/runner-VisitorPlugin-options.js +3 -0
- package/test/browser/runner-VisitorPlugin.js +3 -0
- package/test/browser/runner-filemanagerPlugin-options.js +4 -0
- package/test/browser/runner-filemanagerPlugin.js +3 -0
- package/test/browser/runner-global-vars-options.js +2 -1
- package/test/browser/runner-main-options.js +11 -11
- package/test/browser/runner-postProcessor.js +1 -1
- package/test/browser/runner-postProcessorPlugin-options.js +3 -0
- package/test/browser/runner-postProcessorPlugin.js +3 -0
- package/test/browser/runner-preProcessorPlugin-options.js +3 -0
- package/test/browser/runner-preProcessorPlugin.js +3 -0
- package/test/css/comments2.css +1 -1
- package/test/css/compression/compression.css +1 -1
- package/test/css/detached-rulesets.css +5 -0
- package/test/css/directives-bubling.css +119 -0
- package/test/css/extract-and-length.css +1 -1
- package/test/css/filemanagerPlugin/filemanager.css +3 -0
- package/test/css/functions.css +17 -1
- package/test/css/import-reference.css +5 -1
- package/test/css/import.css +4 -0
- package/test/css/include-path/include-path.css +4 -1
- package/test/css/include-path-string/include-path-string.css +3 -0
- package/test/css/legacy/legacy.css +14 -0
- package/test/css/media.css +0 -1
- package/test/css/mixins-args.css +51 -1
- package/test/css/plugin.css +44 -0
- package/test/css/postProcessorPlugin/postProcessor.css +4 -0
- package/test/css/preProcessorPlugin/preProcessor.css +3 -0
- package/test/css/scope.css +1 -1
- package/test/css/strings.css +1 -1
- package/test/css/url-args/urls.css +5 -5
- package/test/css/urls.css +8 -8
- package/test/css/variables.css +5 -5
- package/test/css/visitorPlugin/visitor.css +3 -0
- package/test/data/image.jpg +0 -0
- package/test/data/image.svg +2 -1
- package/test/data/page.html +1 -1
- package/test/index.js +5 -0
- package/test/less/detached-rulesets.less +9 -0
- package/test/less/directives-bubling.less +142 -0
- package/test/less/errors/at-rules-undefined-var.txt +4 -4
- package/test/less/errors/css-guard-default-func.txt +4 -4
- package/test/less/errors/javascript-undefined-var.txt +4 -4
- package/test/less/errors/mixins-guards-default-func-1.txt +4 -4
- package/test/less/errors/mixins-guards-default-func-2.txt +4 -4
- package/test/less/errors/mixins-guards-default-func-3.txt +4 -4
- package/test/less/errors/{parse-error-extra-parens.less → parse-error-media-no-block-1.less} +0 -0
- package/test/less/errors/parse-error-media-no-block-1.txt +3 -0
- package/test/less/errors/parse-error-media-no-block-2.less +1 -0
- package/test/less/errors/parse-error-media-no-block-2.txt +2 -0
- package/test/less/errors/parse-error-media-no-block-3.less +4 -0
- package/test/less/errors/parse-error-media-no-block-3.txt +3 -0
- package/test/less/errors/percentage-non-number-argument.less +3 -0
- package/test/less/errors/percentage-non-number-argument.txt +4 -0
- package/test/less/errors/property-interp-not-defined.txt +2 -2
- package/test/less/errors/svg-gradient2.txt +1 -1
- package/test/less/errors/svg-gradient3.txt +1 -1
- package/test/less/errors/svg-gradient4.less +4 -0
- package/test/less/errors/svg-gradient4.txt +4 -0
- package/test/less/errors/svg-gradient5.less +4 -0
- package/test/less/errors/svg-gradient5.txt +4 -0
- package/test/less/errors/svg-gradient6.less +4 -0
- package/test/less/errors/svg-gradient6.txt +4 -0
- package/test/less/filemanagerPlugin/colors.test +1 -0
- package/test/less/filemanagerPlugin/filemanager.less +4 -0
- package/test/less/functions.less +20 -2
- package/test/less/import/css-import.less +1 -0
- package/test/less/import/import-inline-invalid-css.less +1 -0
- package/test/less/import/import-reference.less +10 -1
- package/test/less/import/import-test-a.less +1 -0
- package/test/less/import-reference.less +4 -1
- package/test/less/import.less +1 -0
- package/test/less/include-path/include-path.less +3 -1
- package/test/less/include-path-string/include-path-string.less +3 -0
- package/test/less/legacy/legacy.less +14 -0
- package/test/less/mixins-args.less +48 -0
- package/test/less/mixins-guards.less +9 -0
- package/test/less/no-output.less +1 -1
- package/test/less/plugin/plugin-global.js +9 -0
- package/test/less/plugin/plugin-local.js +8 -0
- package/test/less/plugin/plugin-transitive.js +5 -0
- package/test/less/plugin/plugin-transitive.less +5 -0
- package/test/less/plugin.less +85 -0
- package/test/less/postProcessorPlugin/postProcessor.less +4 -0
- package/test/less/preProcessorPlugin/preProcessor.less +3 -0
- package/test/less/sourcemaps/imported.css +6 -6
- package/test/less/visitorPlugin/visitor.less +4 -0
- 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 +112 -0
- package/test/less-bom/directives-bubling.less +142 -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-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-media-no-block-1.less +5 -0
- package/test/less-bom/errors/parse-error-media-no-block-1.txt +3 -0
- package/test/less-bom/errors/parse-error-media-no-block-2.less +1 -0
- package/test/less-bom/errors/parse-error-media-no-block-2.txt +2 -0
- package/test/less-bom/errors/parse-error-media-no-block-3.less +4 -0
- package/test/less-bom/errors/parse-error-media-no-block-3.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/percentage-non-number-argument.less +3 -0
- package/test/less-bom/errors/percentage-non-number-argument.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/svg-gradient4.less +4 -0
- package/test/less-bom/errors/svg-gradient4.txt +4 -0
- package/test/less-bom/errors/svg-gradient5.less +4 -0
- package/test/less-bom/errors/svg-gradient5.txt +4 -0
- package/test/less-bom/errors/svg-gradient6.less +4 -0
- package/test/less-bom/errors/svg-gradient6.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/filemanagerPlugin/colors.test +1 -0
- package/test/less-bom/filemanagerPlugin/filemanager.less +4 -0
- package/test/less-bom/functions.less +232 -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/css-import.less +1 -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-inline-invalid-css.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 +98 -0
- package/test/less-bom/import/import-test-a.less +5 -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 +6 -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 +26 -0
- package/test/less-bom/import.less +31 -0
- package/test/less-bom/include-path/include-path.less +8 -0
- package/test/less-bom/include-path-string/include-path-string.less +3 -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 +21 -0
- package/test/less-bom/media.less +234 -0
- package/test/less-bom/merge.less +78 -0
- package/test/less-bom/mixins-args.less +263 -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 +280 -0
- package/test/less-bom/mixins-important.less +53 -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/plugin/plugin-global.js +9 -0
- package/test/less-bom/plugin/plugin-local.js +8 -0
- package/test/less-bom/plugin/plugin-transitive.js +5 -0
- package/test/less-bom/plugin/plugin-transitive.less +5 -0
- package/test/less-bom/plugin.less +85 -0
- package/test/less-bom/postProcessorPlugin/postProcessor.less +4 -0
- package/test/less-bom/preProcessorPlugin/preProcessor.less +3 -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 +184 -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/sourcemaps-empty/empty.less +1 -0
- package/test/less-bom/sourcemaps-empty/var-defs.less +1 -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/visitorPlugin/visitor.less +4 -0
- package/test/less-bom/whitespace.less +44 -0
- package/test/less-test.js +9 -5
- package/test/plugins/filemanager/index.js +19 -0
- package/test/plugins/postprocess/index.js +14 -0
- package/test/plugins/preprocess/index.js +19 -0
- package/test/plugins/visitor/index.js +24 -0
- package/test.less +1 -0
- package/.idea/codeStyleSettings.xml +0 -13
- package/.idea/encodings.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -8
- package/.idea/inspectionProfiles/profiles_settings.xml +0 -7
- package/.idea/jsLinters/jscs.xml +0 -4
- package/.idea/jsLinters/jshint.xml +0 -70
- package/.idea/libraries/sass_stdlib.xml +0 -8
- package/.idea/scopes/scope_settings.xml +0 -5
- package/projectFilesBackup/.idea/libraries/sass_stdlib.xml +0 -8
- package/test/less/errors/detached-ruleset-4.less +0 -5
- package/test/less/errors/detached-ruleset-4.txt +0 -4
- package/test/less/errors/parse-error-extra-parens.txt +0 -3
- 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
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
|
|
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
|
|
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
|
|
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
|
|
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/
|
|
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('
|
|
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
|
+
[](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(
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
329
|
-
console.
|
|
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
|
-
|
|
370
|
-
|
|
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
|
-
|
|
399
|
-
|
|
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.
|
|
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
|
|
450
|
-
if (!silent
|
|
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.
|
|
453
|
+
console.error(msg);
|
|
456
454
|
}
|
|
457
455
|
});
|
|
458
456
|
|