linemanjs / lineman-browserify

A Lineman plugin that configures Browserify for you
6 stars 5 forks source link

Errors are always reported as coming from browserified files. #5

Open tandrewnichols opened 10 years ago

tandrewnichols commented 10 years ago

I'm not sure if this is a lineman-browserify bug or something in our configuration. We have one coffeescript file that we are browserifying, and when errors are logged in the console, they all say they come from line 1 of that file (request-decoration.coffee:1). Maybe this is a concat_sourcemap issue? Here's the output of lineman config browserify --process:

{
  "app_js": {
    "files": {
      "generated/js/browserifyBundle.js": []
    },
    "options": {
      "debug": true
    }
  },
  "app_coffee": {
    "files": {
      "generated/js/browserifyBundle.coffee.js": [
        "bower_components/feature-toggle-lib/lib/request-decoration.coffee"
      ]
    },
    "options": {
      "debug": true,
      "transform": [
        "coffeeify"
      ],
      "standalone": "FtoggleRequestDecoration"
    }
  }
}

And of lineman config concat_sourcemap --process:

{
  "options": {
    "sourcesContent": true
  },
  "js": {
    "src": [
      [
        "vendor/js/jquery.js",
        "vendor/js/jquery.*.js",
        "vendor/js/underscore.js",
        "vendor/js/bootstrap.js",
        "vendor/js/angular-file-upload-shim.js",
        "vendor/js/angular.js",
        "vendor/js/**/*.js"
      ],
      [
        "app/js/app.js",
        "../server/common/js/**/*.js",
        "app/js/lib/underscore_mixins.js",
        "app/**/*.js"
      ],
      "generated/js/app.coffee.js",
      "generated/js/browserifyBundle.coffee.js",
      "generated/angular/template-cache.js"
    ],
    "dest": "generated/js/app.js"
  },
  "spec": {
    "src": [
      "spec/helpers/**/*.js",
      "generated/js/spec-helpers.coffee.js",
      "spec/**/*.js",
      "generated/js/spec.coffee.js"
    ],
    "dest": "generated/js/spec.js"
  },
  "css": {
    "src": [
      "generated/css/vendor.less.css",
      "generated/css/vendor.sass.css",
      "vendor/css/**/*.css",
      "generated/css/app.less.css",
      "generated/css/app.sass.css",
      "app/css/**/*.css"
    ],
    "dest": "generated/css/app.css"
  },
  "client_js": {
    "expand": true,
    "cwd": "js",
    "src": [
      [
        "**/*.js",
        "**/*.htc",
        "**/*.swf"
      ]
    ],
    "dest": "generated/js"
  }
}
searls commented 10 years ago

Andrew, I found a bunch of issues with the plugin yesterday. Recommend you hold off until I give the all clear.

On Wed, Feb 26, 2014 at 3:22 PM, Andrew Nichols notifications@github.com wrote:

I'm not sure if this is a lineman-browserify bug or something in our configuration. We have one coffeescript file that we are browserifying, and when errors are logged in the console, they all say they come from line 1 of that file (request-decoration.coffee:1). Maybe this is a concat_sourcemap issue? Here's the output of lineman config browserify --process:

{
  "app_js": {
    "files": {
      "generated/js/browserifyBundle.js": []
    },
    "options": {
      "debug": true
    }
  },
  "app_coffee": {
    "files": {
      "generated/js/browserifyBundle.coffee.js": [
        "bower_components/feature-toggle-lib/lib/request-decoration.coffee"
      ]
    },
    "options": {
      "debug": true,
      "transform": [
        "coffeeify"
      ],
      "standalone": "FtoggleRequestDecoration"
    }
  }
}

And of lineman config concat_sourcemap --process:

{
  "options": {
    "sourcesContent": true
  },
  "js": {
    "src": [
      [
        "vendor/js/jquery.js",
        "vendor/js/jquery.*.js",
        "vendor/js/underscore.js",
        "vendor/js/bootstrap.js",
        "vendor/js/angular-file-upload-shim.js",
        "vendor/js/angular.js",
        "vendor/js/**/*.js"
      ],
      [
        "app/js/app.js",
        "../server/common/js/**/*.js",
        "app/js/lib/underscore_mixins.js",
        "app/**/*.js"
      ],
      "generated/js/app.coffee.js",
      "generated/js/browserifyBundle.coffee.js",
      "generated/angular/template-cache.js"
    ],
    "dest": "generated/js/app.js"
  },
  "spec": {
    "src": [
      "spec/helpers/**/*.js",
      "generated/js/spec-helpers.coffee.js",
      "spec/**/*.js",
      "generated/js/spec.coffee.js"
    ],
    "dest": "generated/js/spec.js"
  },
  "css": {
    "src": [
      "generated/css/vendor.less.css",
      "generated/css/vendor.sass.css",
      "vendor/css/**/*.css",
      "generated/css/app.less.css",
      "generated/css/app.sass.css",
      "app/css/**/*.css"
    ],
    "dest": "generated/css/app.css"
  },
  "client_js": {
    "expand": true,
    "cwd": "js",
    "src": [
      [
        "**/*.js",
        "**/*.htc",
        "**/*.swf"
      ]
    ],
    "dest": "generated/js"
  }
}

Reply to this email directly or view it on GitHub: https://github.com/linemanjs/lineman-browserify/issues/5

tandrewnichols commented 10 years ago

Ok, so we should go back to a custom grunt task? Or . . . .?

searls commented 10 years ago

If you can hobble along in a working state for now, sit tight and ignore non-breaking issues. Otherwise I would revert for now

On Wed, Feb 26, 2014 at 3:23 PM, Andrew Nichols notifications@github.com wrote:

Ok, so we should go back to a custom grunt task? Or . . . .?

Reply to this email directly or view it on GitHub: https://github.com/linemanjs/lineman-browserify/issues/5#issuecomment-36172098