Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    embed-source-map-srcpublic

    embed-source-map

    Convert sourcemaps with external references to inlineable sourcemap

    Install

    $ npm install -g embed-source-map-src
    

    command line

    $ embed-sm src1.js src2.js src3.js

    command line example:

    $ embed-sm spine/lib/list.js

    converts source-map in list.js from

     
    //... end of file:
    /*
    //@ sourceMappingURL=list.map
    */

    to

     
    //...
    /*
    //@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC5qcyIsInNvdX.......
    */

    embeeding spine/lib/list.coffee source and encoding to mime/base64 url

    API:

    var embed = require('embed-source-map-src');
    var src = require('fs').readFileSync('../spine/lib/list.js');
    console.log(embed(src));

    Keywords

    none

    install

    npm i embed-source-map-src

    Downloadsweekly downloads

    4

    version

    0.0.1

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar