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

SourceMapIn for globbed files should support multiple sourceMapIn's #292

Open
tigerhawkvok opened this issue Jan 28, 2015 · 12 comments
Open

Comments

@tigerhawkvok
Copy link

Example:

module.exports = (grunt) ->
  grunt.loadNpmTasks("grunt-contrib-uglify")
  grunt.loadNpmTasks("grunt-contrib-coffee")
  grunt.initConfig
    pkg: grunt.file.readJSON('package.json')
    uglify:
      options:
        mangle:
          except:['jQuery']
      dist:
        options:
          sourceMap:true
          sourceMapIncludeSources:true
          sourceMapIn: (file) ->
            "scripts/maps/#{file}.map"
        files: [
          expand: true
          flatten: true
          cwd: "scripts/"
          src: ["*.js"]
          dest: "scripts/"
          ext: ".min.js"
          ]
    coffee:
      compile:
        options:
          join: false
          sourceMapDir: "scripts/maps"
          sourceMap: true
        files: [
          expand: true
          flatten: true
          cwd: "coffee"
          src: "*.coffee"
          dest: "scripts/"
          ext: ".js"
          ]
  grunt.registerTask("compile","Compile coffeescript",["coffee:compile","uglify:dist"])

This should work, reading in each sourcemap for each coffeescript file, and using the correct source map. Instead, an error explicitly acknowledging this lack of support comes up.

@jimthedev
Copy link

I would love to see this implemented. I think we could do it by allowing that variable to be an array of strings or a glob.

@richard16
Copy link

Would be nice. I'm using both coffeescript as well as concat. It's a bit of a pain that you can't pull both the sourcemaps in.

@betam4x
Copy link

betam4x commented Aug 13, 2015

Would be helpful. What i'm trying to do is take a bunch of JS files and CoffeeScript files, compress them into one .js file, and have all the proper sourcemaps generated so that it can be easily debugged.

@betam4x
Copy link

betam4x commented Aug 13, 2015

FYI I found a tool that does exactly that. grunt-contrib-mapcat. Works great!

@jvilk
Copy link

jvilk commented Oct 5, 2015

+1. This is very frustrating.

@stefan--
Copy link

+1

6 similar comments
@godo13405
Copy link

+1

@abirmingham
Copy link

+1

@bartoszbobin
Copy link

+1

@paulohenriqgoes
Copy link

+1

@fean
Copy link

fean commented Dec 29, 2016

+1

@audunolsen
Copy link

+1

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

No branches or pull requests