Skip to content

[WIP] Fix #39: Generate correct source paths #40

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

Closed
wants to merge 2 commits into from
Closed

[WIP] Fix #39: Generate correct source paths #40

wants to merge 2 commits into from

Conversation

lydell
Copy link

@lydell lydell commented May 31, 2014

  • Allow options.filename to be a path to the intended output file (not
    just the basename of it).

  • Set the file property of the source map to the basename of
    options.filename, or don’t set it at all if options.filename was
    omitted.

  • Allow options.sourcemap to be a string: The path to the intended
    location of the source map. If relative, it is relative to the current
    working directory. (Only the dirname of options.sourcemap is used.)

  • If options.sourcemap is set to true, assume that the source map is
    intended to either be placed next to options.filename, or be inlined
    into the CSS as a data uri, by using the dirname of options.filename
    or the current working directory if options.filename was omitted
    (instead of using the dirname of options.sourcemap as in the above
    bullet point).

  • Make relative source paths relative to the source map directory before
    adding them to the source map.

  • Make relative source paths from applied original maps relative to the
    source map directory before adding them to the map.

    TODO: Tests and docs.

lydell added 2 commits May 31, 2014 23:27
- Allow `options.filename` to be a path to the intended output file (not
  just the basename of it).

- Set the `file` property of the source map to the basename of
  `options.filename`, or don’t set it at all if `options.filename` was
  omitted.

- Allow `options.sourcemap` to be a string: The path to the intended
  location of the source map. If relative, it is relative to the current
  working directory. (Only the dirname of `options.sourcemap` is used.)

- If `options.sourcemap` is set to `true`, assume that the source map is
  intended to either be placed next to `options.filename`, or be inlined
  into the CSS as a data uri, by using the dirname of `options.filename`
  or the current working directory if `options.filename` was omitted
  (instead of using the dirname of `options.sourcemap` as in the above
  bullet point).

- Make relative source paths relative to the source map directory before
  adding them to the source map.

- Make relative source paths from applied original maps relative to the
  source map directory before adding them to the map.
@lydell
Copy link
Author

lydell commented Jun 1, 2014

I won’t bother to write tests until we have decided if this is the way to go.

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

Successfully merging this pull request may close these issues.

1 participant