Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Add missing arguments to loadFile and loadFileSync #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add missing arguments to loadFile and loadFileSync #25

wants to merge 2 commits into from

Commits on Aug 23, 2017

  1. Add missing arguments to loadFile and loadFileSync

    Less's import-manager.js calls loadFile with a "callback" argument [1]
    and file-manager.js calls loadFileSync with an "encoding" argument [2],
    without which operating in synchronous mode (using the syncImport less
    option) is broken.
    
    [1] https://github.com/less/less.js/blob/4a0026ebf6d4c783365d3701ac796c18dcc9d30f/lib/less/import-manager.js#L119
    [2] https://github.com/less/less.js/blob/4a0026ebf6d4c783365d3701ac796c18dcc9d30f/lib/less-node/file-manager.js#L32
    parshap committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    cf5e4fc View commit details
    Browse the repository at this point in the history
  2. Fix loadFile error handling in sync mode

    When running in sync mode (syncImport option), loadFile should call the
    callback instead of returning a promise. This change implements logic
    similar to [1].
    
    [1] https://github.com/less/less.js/blob/49cbe520f6b38b4b8797dcba491501c0c461c7f5/lib/less-node/file-manager.js#L31
    parshap committed Aug 23, 2017
    Configuration menu
    Copy the full SHA
    5fcc7ad View commit details
    Browse the repository at this point in the history