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

Provide source maps where available #74

Closed
silentrob opened this issue Aug 21, 2013 · 21 comments
Closed

Provide source maps where available #74

silentrob opened this issue Aug 21, 2013 · 21 comments

Comments

@silentrob
Copy link
Collaborator

Harp should support source maps where available.
http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

This is landing in Less 1.5
less/less.js#1050

CoffeeScript 1.6
TypeScript supports it

Jade has an issue, but...
pugjs/pug#941

This boils down to generating a second file and referencing it via header.

@ghost ghost assigned sintaxi Aug 21, 2013
@sintaxi
Copy link
Owner

sintaxi commented Aug 21, 2013

Very cool. Wow, the demand for source maps is pretty crazy.

@kennethormandy
Copy link
Collaborator

Stylus has an issues for it too
https://github.com/LearnBoost/stylus/issues/1072

@lfac-pt
Copy link

lfac-pt commented Aug 22, 2013

👍

1 similar comment
@kebot
Copy link
Contributor

kebot commented Aug 23, 2013

+1

@jesstelford
Copy link

Wow, the epicness source maps is pretty awesome.

FTFY ;)

@kebot
Copy link
Contributor

kebot commented Aug 29, 2013

CoffeeScript and Less SourceMap support is added in my fork, will pull-request after my another pull-request is merged.
https://github.com/kebot/terraform/tree/sourcemap

@silentrob
Copy link
Collaborator Author

Holy cow thats rad!

@L8D
Copy link

L8D commented Sep 14, 2013

👍 awesome job @kebot

@kebot
Copy link
Contributor

kebot commented Sep 15, 2013

@sintaxi Do you reviewed my pull-request of the support of in memory cache, the source map support is based on it?

@giodamelio
Copy link

👍

@KidkArolis
Copy link

Is there any progress on this?

@remy
Copy link
Contributor

remy commented Mar 23, 2014

+1

@amitkeret
Copy link

+1

@davej
Copy link

davej commented Aug 4, 2015

Hate to just tack on a +1. I tried Harp and love the simplicity but source maps is the feature which prevents me from switching from Gulp.

@og2t
Copy link

og2t commented Oct 8, 2015

Same here. Minification of JS and CSS without source maps doesn't work when you need to debug ;-)

@tjnicolaides
Copy link

Just wanted to run this terraform PR past the group to see if I'm on the right path before implementing in the harp project, too.

Once I get into Harp, I'm struggling between the following two choices:

  1. Should sourcemaps be ON or OFF by default, with a config option to toggle? Or, if they're available for a particular file extension, are they always ON?
  2. Should users have a config option to change which directory maps get written to, with the default being the same directory as the minified CSS/JS? Or are should they always be written to the same directory?

Once we have the .scss maps proofed out, would we finish adding .less/.styl maps to terraform.git, or all available sourcemapped extensions, or just roll out the one for harp.git?

@kennethormandy
Copy link
Collaborator

@sintaxi will have the final word on this, but my expectation would be:

  1. On by default for all preprocessors (regular HTML, CSS, and JS goes through a different codepath right now) in development environments (ex. harp server) but not in production environments (ex. harp compile, or when using Harp as middleware)
  2. Source maps should be served and updated on each request, but not written to the file system every time, which is how the preprocessors already work.

Our goal would be to have them for all preprocessors, but we wouldn’t be opposed to starting with Sass and tagging a release of Terraform, if that was significantly easier.

@davej
Copy link

davej commented Nov 28, 2015

By the way, I ended up writing my own middleware that compiles the usual suspects (sass, less, stylus, coffeescript, babel, etc..) and does sourcemaps too: https://github.com/davej/piggy-in-the-middle

@tjnicolaides
Copy link

Ok Harp team, please have a look at the sourcemap pull requests I've opened in Harp and Terraform and advise on how you'd like to see them improved in order to be accepted. Our dev team makes heavy use of Harp and we're really looking forward to making use of *.scss sourcemaps in 2016. Thanks!

lunelson added a commit to lunelson/terraform that referenced this issue Jan 5, 2016
* 'master' of github.com:sintaxi/terraform: (22 commits)
  version bump v1.0.0
  ..
  Version bump for reference in Harp
  Sourcemaps support for stylus stylesheets
  Need to update Stylus to 0.53.0 in order to receive source maps support. Had to change how the custom error generation was being handled (styl.js, line 21)
  Adding sourcemaps for .less stylesheets
  Adding sourcemaps for .sass stylesheets
  Adding sourcemaps for .scss in order to facilitate sourcemap support in Harp: sintaxi/harp#74
  Version bump v0.13.2
  Adds patch updates for Node-sass and PostCSS
  `getCurrent` handles dots in the path.
  Add a failing test for `getCurrent` with a dotted path.
  Updates CI targets
  Version bump v0.13.1
  Updates Autoprefixer
  Updates Node-sass
  Removes Node v0.10.x from CI
  Version bump v0.13.0
  Updates dependencies, drops Node v0.10.x support
  add and require lodash to templates
  ...

# Conflicts:
#	lib/terraform.js
#	package.json
@peterwilli
Copy link

This is a bit of a bummer :( I just really fell in love with Harp when I found out that my coffeescripts doesn't have source maps mapped to their minified JS counterparts :(

@og2t
Copy link

og2t commented Aug 13, 2016

+1

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

No branches or pull requests