Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option source-map-map-inline produces an empty file #2987

Closed
nicoschoenmaker opened this issue Nov 16, 2016 · 3 comments
Closed

Option source-map-map-inline produces an empty file #2987

nicoschoenmaker opened this issue Nov 16, 2016 · 3 comments
Labels

Comments

@nicoschoenmaker
Copy link
Contributor

nicoschoenmaker commented Nov 16, 2016

Using the --source-map-map-inline option produces an empty file.

Steps to reproduce:

  • Go to an empty directory
  • Make sure we have node + less
wget https://nodejs.org/dist/v7.1.0/node-v7.1.0-linux-x64.tar.xz
tar -xf node-v7.1.0-linux-x64.tar.xz
./node-v7.1.0-linux-x64/bin/node ./node-v7.1.0-linux-x64/bin/npm install less
echo ".red { color: blue; }" > foo.less
  • Process the just created foo.less file:
./node-v7.1.0-linux-x64/bin/node node_modules/.bin/lessc foo.less --source-map-map-inline

Expected

.red {
  color: blue;
}
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQU8sV0FBQSIsImZpbGUiOiJmb28uY3NzIn0= */

Actual result: only a newline

Sidenotes:

./node-v7.1.0-linux-x64/bin/node node_modules/.bin/lessc foo.less --source-map-map-inline foo.css

Why is it a bug? In the docs the destination (foo.css) is specified as an optional argument. For my use case it would be a lot faster if I did not have to create a temporary file.

nicoschoenmaker pushed a commit to nicoschoenmaker/less.js that referenced this issue Nov 16, 2016
matthew-dean added a commit that referenced this issue Dec 21, 2016
Fixes #2987, --source-map-map-inline works as expected
@megahallon
Copy link

I believe you can also close #2897 as it is described now, however you will also get this issue (TypeError on path) when doing: lessc --source-map=foo foo.less

prowebcraft pushed a commit to prowebcraft/less.js that referenced this issue May 31, 2017
@stale
Copy link

stale bot commented Nov 14, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 14, 2017
@nicoschoenmaker
Copy link
Contributor Author

This issue was fixed with #2988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants