stephenlacy / gulp-stylus

Stylus plugin for gulp
MIT License
223 stars 60 forks source link

Sourcemaps breaks #120

Closed ghost closed 9 years ago

ghost commented 9 years ago

The configuration bellow is not working:

gulp.src 'styles/**/*.styl'
    .pipe glp.sourcemaps.init()
    .pipe glp.stylus
        use: [
            glp.autoprefixerStylus(
                browsers: ["last 3 versions", "> 2%", "ie 8"]
                remove: no
            )
        ]
        linenos: yes
        compress: no
    .pipe glp.sourcemaps.write '.'
    .pipe gulp.dest 'build/'

Error output below:

Potentially unhandled rejection [2] Error: Source map to be applied is missing the "file" property
  at assertProperty (C:\project\node_modules\gulp-stylus\node_modules\vinyl-sourcemaps-apply\index.js:32:13)
  at applySourceMap (C:\project\node_modules\gulp-stylus\node_modules\vinyl-sourcemaps-apply\index.js:11:3)
  at C:\project\node_modules\gulp-stylus\index.js:39:13
  at tryCatchReject (C:\project\node_modules\gulp-stylus\node_modules\accord\node_modules\when\lib\makePromise.js:845:30)
  at runContinuation1 (C:\project\node_modules\gulp-stylus\node_modules\accord\node_modules\when\lib\makePromise.js:804:4)
  at Fulfilled.when (C:\project\node_modules\gulp-stylus\node_modules\accord\node_modules\when\lib\makePromise.js:592:4)
  at Pending.run (C:\project\node_modules\gulp-stylus\node_modules\accord\node_modules\when\lib\makePromise.js:483:13)
  at Scheduler._drain (C:\project\node_modules\gulp-stylus\node_modules\accord\node_modules\when\lib\Scheduler.js:62:19)
  at Scheduler.drain (C:\project\node_modules\gulp-stylus\node_modules\accord\node_modules\when\lib\Scheduler.js:27:9)
  at process._tickCallback (node.js:419:13)
ghost commented 9 years ago

Should this be reported to gulp sourcemaps instead?

ghost commented 9 years ago

Sorry, this seems to be an issue for autoprefixer-stylus.