Giter Club home page Giter Club logo

Comments (3)

dleffler avatar dleffler commented on July 17, 2024 1

Since the standard is for the sources to be a relative path, the real fix is to pass a 'sourceMapBaseName' of the root part of the path which when stripped from the full path by the parser will create a relative path. In your case the correct param passed should be:

$options = array(
	'sourceMap'			=> true,
	'sourceMapWriteTo'	=> __DIR__ . '/theme.map',
	'sourceMapURL'		=> '/less_php/theme.map',
        'sourceMapBaseName'   =>'/home/foo/public_html/',
);

The fix for my problem is to add the following lines to the Parser::AbsPath() function after the call to realpath()

$path = realpath($path);
if (!empty($path[1]) && $path[1] === ':') {
    $path = substr($path,2);
}

from less.php.

dleffler avatar dleffler commented on July 17, 2024

I can confirm the 'sources' entries are bad. On windows servers it also includes the drive letter. HOWEVER, the correct entry should only be the relative path on the web server...so the example above a correct 'sources' entry would be 'less_php/theme.less'.

The full path is supposed to be trimmed in the Generator->normalizeFilename() function, HOWEVER the passed filename is TOO full so that the sourceMapBasepath can't be found/replaced by the strpos/substr calls.

from less.php.

dali-rajab avatar dali-rajab commented on July 17, 2024

@dleffler thank you for your reply, I hope that the maintainers will fix that soon

from less.php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.