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

Source maps for CSS? #369

Closed
benlk opened this issue Jan 23, 2015 · 5 comments
Closed

Source maps for CSS? #369

benlk opened this issue Jan 23, 2015 · 5 comments

Comments

@benlk
Copy link
Collaborator

benlk commented Jan 23, 2015

Largo's CSS rules are scattered across a large number of LESS files, and sometimes tracking down which file is creating a property is difficult. It would be nice to have grunt watch or grunt less build source maps, even if they aren't included in this repository and are .gitignore'd.

Not something for 0.4, but something I think should be considered for future builds.

@aschweigert
Copy link

I'm definitely pro-explaining more about what's where. We had a request previously to include an unminified version of style.css in addition to the minified version so that might be a good place to start, but having more documentation here would also help

@benlk
Copy link
Collaborator Author

benlk commented Jan 27, 2015

If we're building the source map files, should they be included in the repo, or should they be in .gitignore? cc @rnagle

grunt-contrib-less doesn't currently support outputting multiple source maps, or compiling a single source map from multiple files. When gruntjs/grunt-contrib-less#243 is merged in, we'll be able to set combineSourceFiles: true in the less development task.

The solution until then is to have the Gruntfile compile an all-in-one .less file and then rander source maps from that.

@aschweigert aschweigert added this to the 0.5 milestone Feb 3, 2015
@benlk
Copy link
Collaborator Author

benlk commented Feb 20, 2015

It looks like gruntjs/grunt-contrib-less#243 isn't going to be merged in. (Unless a contributor reopens; they appear to be divided on the subject.)

We can try this workaround or figure out something using grunt-contrib-concat.

@benlk
Copy link
Collaborator Author

benlk commented Mar 18, 2015

I've created a sourcemaps branch. f6b0daf puts sourcemaps inline, when grunt watch and grunt less:development are run. it does not run that way for grunt less:production.

Advantages of this over separate map files:

  • currently possible

Disadvantages:

  • inline source maps in development should not make it into production
  • inline source maps can be up to 250,000 characters in css/style.css and will negatively affect performance if committed, unless the inline sourcemaps are stripped by minification and if we use the minified version of files in production.
  • inline source maps cannot be used independent of minification.

@aschweigert aschweigert modified the milestones: 0.5, Backlog Mar 23, 2015
@benlk benlk mentioned this issue Apr 8, 2015
7 tasks
@benlk
Copy link
Collaborator Author

benlk commented Apr 14, 2015

#646 merged, so closing this!

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

2 participants