GithubHelp home page GithubHelp logo

azu / multi-stage-sourcemap Goto Github PK

View Code? Open in Web Editor NEW
104.0 104.0 6.0 25 KB

multi-level source map processing library.

Home Page: http://efcl.info/2014/09/03/multi-stage-sourcemap/

JavaScript 89.37% CoffeeScript 4.81% HTML 5.82%

multi-stage-sourcemap's Introduction

Hi! I'm @azu.

I've worked on Open Source since 2010. I've created 500+ npm pacakges and These are 10 million downloads a year.

I've created and now maintain many open-source projects:

  • textlint is a linter for natural languages
  • Secretlint is a pluggable linting tool to prevent committing credential.
  • HonKit build books using Markdown
  • etc...

Also, I the main writer of some blogs about JavaScript and ECMAScript.

I've written JavaScript books as Open Source in Japanese.

If you want to support me, please see GitHub Sponsors♥️

❓If you want to know about me, create AMA Issue❓

multi-stage-sourcemap's People

Contributors

aandis avatar artemgovorov avatar azu avatar vvakame avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

multi-stage-sourcemap's Issues

File property is being left out of the resulting rawSourceMap

Hey, not sure if this is an issue of the multi-stage-sourcemap package but so far I have traced it, it looks like the issue of this package so here's the thing:

I'm using gulp-stylus v2.0.0 with autoprefixer-stylus 0.5.0 and trying to generate inline source maps using gulp-sourcemaps v1.3.0 on Windows 7 x64, node.js v0.10.36 as follows:

gulp.src('./src/styles/main.styl')
  .pipe(plugins.sourcemaps.init())
  .pipe(plugins.stylus({
    compress: production,
    use: [
      autoprefixer({ browsers: ['last 2 versions'] })
    ]
  }))
  .pipe(plugins.sourcemaps.write())
  .pipe(gulp.dest('./dist/styles/'))

But I'm getting the following error message:

Potentially unhandled rejection [2] Error: Source map to be applied is missing the "file" property
    at assertProperty (D:\Development\youcon-softphone\node_modules\gulp-stylus\node_modules\vinyl-sourcemaps-apply\inde
x.js:32:13)
    at applySourceMap (D:\Development\youcon-softphone\node_modules\gulp-stylus\node_modules\vinyl-sourcemaps-apply\inde
x.js:11:3)
    at D:\Development\youcon-softphone\node_modules\gulp-stylus\index.js:39:13
    at tryCatchReject (D:\Development\youcon-softphone\node_modules\gulp-stylus\node_modules\accord\node_modules\when\li
b\makePromise.js:845:30)
    at runContinuation1 (D:\Development\youcon-softphone\node_modules\gulp-stylus\node_modules\accord\node_modules\when\
lib\makePromise.js:804:4)
    at Fulfilled.when (D:\Development\youcon-softphone\node_modules\gulp-stylus\node_modules\accord\node_modules\when\li
b\makePromise.js:592:4)
    at Pending.run (D:\Development\youcon-softphone\node_modules\gulp-stylus\node_modules\accord\node_modules\when\lib\m
akePromise.js:483:13)
    at Scheduler._drain (D:\Development\youcon-softphone\node_modules\gulp-stylus\node_modules\accord\node_modules\when\
lib\Scheduler.js:62:19)
    at Scheduler.drain (D:\Development\youcon-softphone\node_modules\gulp-stylus\node_modules\accord\node_modules\when\l
ib\Scheduler.js:27:9)
    at process._tickCallback (node.js:442:13)

From what I understand autoprefixer-stylus uses multi-stage-sourcemap and multi-stage-sourcemap causes rawSourceMap to lose "file" property because it's not passed to a Generator object and it seems that the Generator object of source-map package doesn't add this automatically. After reading the readme file of this project it seems that this is an unexpected behaviour because in the example there's a file property.

File property is required by vinyl-sourcemaps-apply package which is a dependency of the gulp-stylus package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.