Giter Club home page Giter Club logo

gulp-sourcemaps's Introduction

gulp-sourcemaps

NPM version Downloads Travis Build Status AppVeyor Build Status Coveralls Status

Sourcemap support for gulpjs.

Usage

All the examples here works with Gulp 4. To see examples related to Gulp 3, you can read them here.

Write inline source maps

Inline source maps are embedded in the source file.

Example:

var gulp = require('gulp');
var plugin1 = require('gulp-plugin1');
var plugin2 = require('gulp-plugin2');
var sourcemaps = require('gulp-sourcemaps');

function javascript() {
  gulp.src('src/**/*.js')
    .pipe(sourcemaps.init())
      .pipe(plugin1())
      .pipe(plugin2())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('dist'));
};


exports.javascript = javascript;

All plugins between sourcemaps.init() and sourcemaps.write() need to have support for gulp-sourcemaps. You can find a list of such plugins in the wiki.

Write external source map files

To write external source map files, pass a path relative to the destination to sourcemaps.write().

Example:

var gulp = require('gulp');
var plugin1 = require('gulp-plugin1');
var plugin2 = require('gulp-plugin2');
var sourcemaps = require('gulp-sourcemaps');

function javascript() {
  gulp.src('src/**/*.js')
    .pipe(sourcemaps.init())
      .pipe(plugin1())
      .pipe(plugin2())
    .pipe(sourcemaps.write('../maps'))
    .pipe(gulp.dest('dist'));
};

exports.javascript = javascript;

Load existing source maps

To load existing source maps, pass the option loadMaps: true to sourcemaps.init().

Example:

var gulp = require('gulp');
var plugin1 = require('gulp-plugin1');
var plugin2 = require('gulp-plugin2');
var sourcemaps = require('gulp-sourcemaps');

function javascript() {
  gulp.src('src/**/*.js')
    .pipe(sourcemaps.init({loadMaps: true}))
      .pipe(plugin1())
      .pipe(plugin2())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('dist'));
};

exports.javascript = javascript;

Handle large files

To handle large files, pass the option largeFile: true to sourcemaps.init().

Example:

var gulp = require('gulp');
var plugin1 = require('gulp-plugin1');
var plugin2 = require('gulp-plugin2');
var sourcemaps = require('gulp-sourcemaps');

function javascript() {
  gulp.src('src/**/*.js')
    .pipe(sourcemaps.init({largeFile: true}))
      .pipe(plugin1())
      .pipe(plugin2())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('dist'));
};

exports.javascript = javascript;

Handle source files from different directories

Use the base option on gulp.src to make sure all files are relative to a common base directory.

Example:

var gulp = require('gulp');
var plugin1 = require('gulp-plugin1');
var plugin2 = require('gulp-plugin2');
var sourcemaps = require('gulp-sourcemaps');

function javascript() {
gulp.src(['src/test.js', 'src/testdir/test2.js'], { base: 'src' })
    .pipe(sourcemaps.init())
      .pipe(plugin1())
      .pipe(plugin2())
    .pipe(sourcemaps.write('../maps'))
    .pipe(gulp.dest('dist'));
};

exports.javascript = javascript;

Alter sources property on sourcemaps

The exported mapSources method gives full control over the source paths. It takes a function that is called for every source and receives the default source path as a parameter and the original vinyl file.

Example:

function javascript() {
  var stream = gulp.src('src/**/*.js')
    .pipe(sourcemaps.init())
      .pipe(plugin1())
      .pipe(plugin2())
      // be careful with the sources returned otherwise contents might not be loaded properly
      .pipe(sourcemaps.mapSources(function(sourcePath, file) {
        // source paths are prefixed with '../src/'
        return '../src/' + sourcePath;
      }))
    .pipe(sourcemaps.write('../maps')
    .pipe(gulp.dest('public/scripts'));
};

exports.javascript = javascript;

Generate Identity Sourcemap

The exported identityMap method allows you to generate a full valid source map encoding no changes (slower, only for Javascript and CSS) instead of the default empty source map (no mappings, fast). Use this option if you get missing or incorrect mappings, e.g. when debugging.

Example:

function javascript() {
  var stream = gulp.src('src/**/*.js')
    .pipe(sourcemaps.init())
      // An identity sourcemap will be generated at this step
      .pipe(sourcemaps.identityMap())
      .pipe(plugin1())
      .pipe(plugin2())
    .pipe(sourcemaps.write('../maps')
    .pipe(gulp.dest('public/scripts'));
};

exports.javascript = javascript;

Init Options

  • loadMaps

    Set to true to load existing maps for source files. Supports the following:

    • inline source maps
    • source map files referenced by a sourceMappingURL= comment
    • source map files with the same name (plus .map) in the same directory
  • identityMap

    This option is deprecated. Upgrade to use our sourcemap.identityMap API.

Write Options

  • addComment

    By default a comment containing / referencing the source map is added. Set this to false to disable the comment (e.g. if you want to load the source maps by header).

    Example:

    function javascript() {
      var stream = gulp.src('src/**/*.js')
        .pipe(sourcemaps.init())
          .pipe(plugin1())
          .pipe(plugin2())
        .pipe(sourcemaps.write('../maps', {addComment: false}))
        .pipe(gulp.dest('dist'));
    };
    
    exports.javascript = javascript;
  • includeContent

    By default the source maps include the source code. Pass false to use the original files.

    Including the content is the recommended way, because it "just works". When setting this to false you have to host the source files and set the correct sourceRoot.

  • sourceRoot

    Set the location where the source files are hosted (use this when includeContent is set to false). This is usually a URL (or an absolute URL path), not a local file system path. By default the source root is '' or in case destPath is set, the relative path from the source map to the source base directory (this should work for many dev environments). If a relative path is used (empty string or one starting with a .), it is interpreted as a path relative to the destination. The plugin rewrites it to a path relative to each source map.

    Example:

    function javascript() {
      var stream = gulp.src('src/**/*.js')
        .pipe(sourcemaps.init())
          .pipe(plugin1())
          .pipe(plugin2())
        .pipe(sourcemaps.write({includeContent: false, sourceRoot: '/src'}))
        .pipe(gulp.dest('dist'));
    };
    
    exports.javascript = javascript;

    Example (using a function):

    function javascript() {
      var stream = gulp.src('src/**/*.js')
        .pipe(sourcemaps.init())
          .pipe(plugin1())
          .pipe(plugin2())
        .pipe(sourcemaps.write({
          includeContent: false,
          sourceRoot: function(file) {
            return '/src';
          }
         }))
        .pipe(gulp.dest('dist'));
    };
    
    exports.javascript = javascript;

    Example (relative path):

    function javascript() {
      var stream = gulp.src('src/**/*.js')
        .pipe(sourcemaps.init())
          .pipe(plugin1())
          .pipe(plugin2())
        .pipe(sourcemaps.write('.', {includeContent: false, sourceRoot: '../src'}))
        .pipe(gulp.dest('dist'));
    };
    
    exports.javascript = javascript;

    In this case for a file written to dist/subdir/example.js, the source map is written to dist/subdir/example.js.map and the sourceRoot will be ../../src (resulting in the full source path ../../src/subdir/example.js).

  • destPath

    Set the destination path (the same you pass to gulp.dest()). If the source map destination path is not a sub path of the destination path, this is needed to get the correct path in the file property of the source map. In addition, it allows to automatically set a relative sourceRoot if none is set explicitly.

  • sourceMappingURLPrefix

    Specify a prefix to be prepended onto the source map URL when writing external source maps. Relative paths will have their leading dots stripped.

    Example:

    function javascript() {
      var stream = gulp.src('src/**/*.js')
        .pipe(sourcemaps.init())
          .pipe(plugin1())
          .pipe(plugin2())
        .pipe(sourcemaps.write('../maps', {
          sourceMappingURLPrefix: 'https://asset-host.example.com/assets'
        }))
        .pipe(gulp.dest('public/scripts'));
    };
    
    exports.javascript = javascript;

    This will result in a source mapping URL comment like sourceMappingURL=https://asset-host.example.com/assets/maps/helloworld.js.map.

  • sourceMappingURL

    If you need full control over the source map URL you can pass a function to this option. The output of the function must be the full URL to the source map (in function of the output file).

    Example:

    function javascript() {
      var stream = gulp.src('src/**/*.js')
        .pipe(sourcemaps.init())
          .pipe(plugin1())
          .pipe(plugin2())
        .pipe(sourcemaps.write('../maps', {
          sourceMappingURL: function(file) {
            return 'https://asset-host.example.com/' + file.relative + '.map';
          }
        }))
        .pipe(gulp.dest('public/scripts'));
    };
    
    exports.javascript = javascript;

    This will result in a source mapping URL comment like sourceMappingURL=https://asset-host.example.com/helloworld.js.map.

  • mapFile

    This option allows to rename the map file. It takes a function that is called for every map and receives the default map path as a parameter.

    Example:

    function javascript() {
      var stream = gulp.src('src/**/*.js')
        .pipe(sourcemaps.init())
          .pipe(plugin1())
          .pipe(plugin2())
        .pipe(sourcemaps.write('../maps', {
          mapFile: function(mapFilePath) {
            // source map files are named *.map instead of *.js.map
            return mapFilePath.replace('.js.map', '.map');
          }
        }))
        .pipe(gulp.dest('public/scripts'));
    };
    
    exports.javascript = javascript;
  • mapSources

    This option is deprecated. Upgrade to use our sourcemap.mapSources API.

  • charset

    Sets the charset for inline source maps. Default: utf8

  • clone

    Clones the original file for creation of the map file. Could be important if file history is important. See file.clone() for possible options. Default: {deep:false, contents:false}

Plugin developers only:

  • How to add source map support to plugins

    • Generate a source map for the transformation the plugin is applying
    • Important: Make sure the paths in the generated source map (file and sources) are relative to file.base (e.g. use file.relative).
    • Apply this source map to the vinyl file. E.g. by using vinyl-sourcemaps-apply. This combines the source map of this plugin with the source maps coming from plugins further up the chain.
    • Add your plugin to the wiki page

    Example:

    var through = require('through2');
    var applySourceMap = require('vinyl-sourcemaps-apply');
    var myTransform = require('myTransform');
    
    module.exports = function(options) {
    
      function transform(file, encoding, callback) {
        // generate source maps if plugin source-map present
        if (file.sourceMap) {
          options.makeSourceMaps = true;
        }
    
        // do normal plugin logic
        var result = myTransform(file.contents, options);
        file.contents = new Buffer(result.code);
    
        // apply source map to the chain
        if (file.sourceMap) {
          applySourceMap(file, result.map);
        }
    
        this.push(file);
        callback();
      }
    
      return through.obj(transform);
    };
    • Verify sourcemaps are working

      See example below or refer to test/write.js

    Example:

    var stream = plugin();
    var init = sourcemaps.init();
    var write = sourcemaps.write();
    
    init.pipe(stream).pipe(write);
    
    write.on('data', function (file) {
      assert(...);
      cb();
    });
    
    init.write(new gutil.File(...));
    init.end();

Debugging

All debugging output relies on visionmedia/debug. Follow the directions to set the environment variable $DEBUG.

For a few examples of debug you could use:

  DEBUG='gulp-sourcemaps:*' #everything
  DEBUG='gulp-sourcemaps:init' #init/index.js
  DEBUG='gulp-sourcemaps:init:*' #init/index.internals.js
  DEBUG='gulp-sourcemaps:write:' #write/index.js
  DEBUG='gulp-sourcemaps:write:*' #write/index.internals.js
  DEBUG='gulp-sourcemaps:write:,gulp-sourcemaps:init:**' #write/index.internals.js and init/index.internals.js

gulp-sourcemaps's People

Contributors

adrian3d avatar amilajack avatar asgoth avatar assassinsmod avatar bolasblack avatar christophehurpeau avatar coreyfarrell avatar faergeek avatar floridoo avatar gormac avatar jclem avatar jon-hall avatar jordaaash avatar jorrit avatar kennethsundqvist avatar kennyr87 avatar kevinsimper avatar nmccready avatar ogvolkov avatar oroce avatar phated avatar sambou avatar shinnn avatar terrymooreii avatar waldyrious avatar yocontra 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gulp-sourcemaps's Issues

Source maps generated, but not working in browser...

Any idea why my browser dev tools aren't interpreting source maps? I've tried inserting them inline and externally. In both cases the source maps are generated. I've enabled source maps in Chrome and have also tested this in Safari. In my Sources tab, I can see a /source/main.css file, but when I click on it I get a 404 (Not Found) error. The .map file is generated and is accessible at /maps/main.css.map.

Silently doing nothing, how to debug?

I have what looks like a pretty straight forward use case.

gulp.src( bundle.src)
       .pipe(sourcemaps.init())
       .pipe(concat(bundle.dst + '.' + opts.ext))
        .pipe(uglify())
        .pipe(sourcemaps.write())
        .pipe(gulp.dest('./public/built'));

bundle.src is an array of file paths.
This pipe chain produces uglified and concatenated output but it dosen't include any source maps

How can I debug this?

Overriding 'sources' array breaks mozilla parser

Why do you need this line? sourceMap.sources = [this.sourceMap.file];

This causes errors in mozilla/source-map, because, for example, google/traceur-compiler adds additional entries in this array.

So, we get error:

Error: No element indexed by 1
    at ArraySet_at [as at] (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-sourcemaps/node_modules/source-map/lib/source-map/array-set.js:83:11)
    at SourceMapConsumer_parseMappings [as _parseMappings] (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-sourcemaps/node_modules/source-map/lib/source-map/source-map-consumer.js:220:44)
    at SourceMapConsumer.Object.defineProperty.get (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-sourcemaps/node_modules/source-map/lib/source-map/source-map-consumer.js:160:14)
    at SourceMapConsumer_eachMapping [as eachMapping] (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-sourcemaps/node_modules/source-map/lib/source-map/source-map-consumer.js:450:24)
    at Function.SourceMapGenerator_fromSourceMap [as fromSourceMap] (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-sourcemaps/node_modules/source-map/lib/source-map/source-map-generator.js:50:26)
    at File.applySourceMap (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-sourcemaps/index.js:24:40)
    at Transform._transform (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-traceur/index.js:41:11)
    at Transform._read (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-traceur/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Transform._write (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-traceur/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/Users/terminal/Work/solab/siows-arctic/node_modules/gulp-traceur/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:238:10)

loadMaps should use the sourceRoot to find the sources

Currently it does not look like loadMaps uses the sourceRoot of a files sourcemap when looking for the sources. When the path to the original source is resolved on line 64 it does not use the sourcemaps sourceRoot. Changing that line to this seems to fix it. There should probably be a check if the sourceRoot exists in the sourceMap before using it though.

var absPath = path.resolve(sourcePath, sourceMap.sourceRoot, source);

strange error

My code:

var directory = {
        srcLess: '<%= paths.src.mainComponentLess %>/app.less',
        destLess: '<%= paths.build.css %>'
    };

gulp.src(directory.srcLess)
            .pipe(environment === 'development' ? plugins.sourcemaps.init() : gutil.noop())
            .pipe(plugins.less())
            .pipe(environment === 'development' ? plugins.autoprefixer({
                browsers: [
                    'Android 2.3',
                    'Android >= 4',
                    'Chrome >= 20',
                    'Firefox >= 24',
                    'Explorer >= 8',
                    'iOS >= 6',
                    'Opera >= 12',
                    'Safari >= 6'
                ]
            }) : gutil.noop())
            .pipe(environment === 'development' ? plugins.sourcemaps.write('./') : gutil.noop())
            .pipe(plugins.rename(function (path) {
                path.basename = path.basename.replace('app', 'main');
            }))
            .pipe(gulp.dest(directory.destLess));

All works fine, but i get error:
gulp-sourcemap-write: source file not found:/home/admin/web/default/public_html/content/themes/theme/assets/theme-src/main/less/app.css

Multiple directory,have a error.

I use this to create sass sourcemaps.
first,this is my scss dirrectory:
─scss
│ global.scss

└─page
test.scss
_base.scss

when use this simple, correct.

gulp.task('sass', function () {
    gulp.src(root+'/scss/*.scss')
        .pipe(sourcemaps.init())
        .pipe(sass({
        errLogToConsole: true,
        onError: function(err){
        console.log(err);}
        }))
        .pipe(sourcemaps.write('maps'))
        .pipe(gulp.dest(root+'/css'));
});

ok.Now,when I use a muliple directory,like this:

gulp.task('sass', function () {
    gulp.src(root+'/scss/**/*.scss')
        .pipe(sourcemaps.init())
        .pipe(sass({
        errLogToConsole: true,
        onError: function(err){
        console.log(err);}
        }))
        .pipe(sourcemaps.write('maps'))
        .pipe(gulp.dest(root+'/css'));
});

then,error come:

gulp-sourcemap-write: No source content for "test.scss". Loading from file.
gulp-sourcemap-write: source file not found: D:\GitHup\f2e-workflow\app\scss\test.scss

can you understand me ? And what can I do to solve this problem?

Cannot step through some lines in debugger with generated source maps

When I generate sourcemaps using gulp-sourcemaps, gulp-uglify and gulp-concat, I cannot step through some lines in the debugger. I've created an example project to show the problem (https://github.com/domrein/source-maps-debugging-bug). Try stepping through the "onLoad" function and you'll see the second line of the function is skipped. I believe it's the combination of concatenating the files and minifying them that causes the issue because the two variable declarations are combined into a single statement in the minified file. Possibly related to #8 ?

source file not found

This is an issue introduced with version 1.2.4. It was not happening in 1.2.3. I'm using gulp-less to compile less to css.

I'm getting source file not found errors because the paths are not being resolved correctly. Here's some example output:

[15:09:09] Using gulpfile ~/code/myproject-beta/myapp-web/src/build/js/gulpfile.js
[15:09:09] Starting 'compile-less'...
[15:09:09] compile-less: ~/code/myproject-beta/myapp-web/src/main/webapp/css/mixins.css
gulp-sourcemap-write: source file not found:/Users/brandon.konkle/code/myproject-beta/myapp-web/src/main/webapp/css/myapp/mixins.less
[15:09:10] compile-less: ~/code/myproject-beta/myapp-web/src/main/webapp/css/myapp/cart.css
gulp-sourcemap-write: source file not found:/Users/brandon.konkle/code/myproject-beta/myapp-web/src/main/webapp/css/myapp/mixins.less
[15:09:10] compile-less: ~/code/myproject-beta/myapp-web/src/main/webapp/css/myapp/classGallery.css
gulp-sourcemap-write: source file not found:/Users/brandon.konkle/code/myproject-beta/myapp-web/src/main/webapp/css/myapp/mixins.less
[15:09:11] compile-less: ~/code/myproject-beta/myapp-web/src/main/webapp/css/myapp/classNew.css
gulp-sourcemap-write: source file not found:/Users/brandon.konkle/code/myproject-beta/myapp-web/src/main/webapp/css/myapp/mixins.less

There is a "myproject-beta/myapp-web/src/main/webapp/css/mixins.less" file, and in "myproject-beta/myapp-web/src/main/webapp/css/myapp/cart.css" (for example) it is being imported as @import "../mixins.less";. For some reason, gulp-sourcemaps 1.2.4 is interpreting this as "myproject-beta/myapp-web/src/main/webapp/css/myapp/mixins.less", while the real file is one folder up.

It appears to be caused by this change: 8910560

For now, I'm staying pinned to 1.2.3.

Thanks!

Add optional flag to disable sourcemaps

We use environment specific builds, Please add optional disable flag to sourcemaps.init() to enable or disable sourcemaps generation.

global.env  = process.env.NODE_ENV  || 'DEV';

gulp.task('styles', function () {
    return gulp.src('app/styles/*.scss')
        .pipe($.plumber())
        .pipe($.rubySass({
            style: 'expanded',
            precision: 10,
            sourcemap: (env === 'DEV'), //Only enable sourcemap for DEV env.
            loadPath: ['bower_components/bourbon/dist','bower_components/compass-mixins/lib']
        }))
        .pipe($.autoprefixer('last 2 version')) 
        .pipe(gulp.dest('.tmp/styles'));
});

gulp-sourcemap-write: source file not found: ?

When I try and uglify my code without concatenating it and then generate source maps I get an error message like:

gulp-sourcemap-write: source file not found:C:\Rob\Dropbox\Repos\gulpTest\?

my gulp task looks like this

gulp.task('js', function () {
    return gulp.src('app.js')
        .pipe(sourcemaps.init())
        .pipe(uglify())
        .pipe(sourcemaps.write())
        .pipe(gulp.dest('build'));
});

I'm using the following versions of npm modules

  "dependencies": {
    "gulp": "3.8.8",
    "gulp-uglify": "1.0.1",
    "gulp-sourcemaps": "1.1.5"
  }

There is a zipped up version of the project here https://dl.dropboxusercontent.com/u/20066539/Forum%20Links/Other/gulpTest.zip

Any idea why this isn't working?

Thanks

Support different log levels

Currently, if a file is missing source content, the plug-in does the right thing of trying to load its contents from the file system. While doing so, it writes this message https://github.com/floridoo/gulp-sourcemaps/blob/47300b454000e09ade0b79478a5ae320e78fb6d9/index.js#L182 to the console for each source content it processes. This creates too much noise in the console, especially with files that contain @import less statements.

What do you think about showing this message in debug or warn only mode? We can add support for debug: true option or logLevel: debug, if you want to support different levels. I'll work on the PR if you think this is a good approach.

Double-backslash "\\" in sourcemap file for Less, chrome work-space fails to map local resource

I generated sourcemap for LESS file, evedentilly the entries in sources array uses "". So when this source map is used in conjunction with chrome workpace feature. This double backslash patters prevents chrome to map the newtworked LESS files to file-system files.

replacing, "" with "//", fixes the issue.

Is there any option, I can enforce this behaviour while generating sourcemaps ?

absolute disk/local paths in source maps

how can I avoid this generating absolute local disk paths ?

  var settings = {
    dirs: {
      sources: 'C:/Workspace/MyProject/sources',
      build: 'C:/Workspace/MyProject/build'
    },
    deploy: { concat: false }
  }

  var sources = glob.sync(path.join(settings.dirs.sources, '**/*.js'))
  return gulp.src(sources)
             .pipe(sourcemaps.init())
             .pipe(gulpif(settings.deploy.concat, concat('app.js')))
             .pipe(sourcemaps.write(sourceMapsPath, { sourceRoot: 'maps' }))
             .pipe(gulp.dest(path.join(settings.dirs.build, 'js')))

in my built files i find paths like:

//# sourceMappingURL=C:/Workspace/MyProject/build/maps/main.js.map

shouldn't it be ?

//# sourceMappingURL=maps/main.js.map

includeContent is null when uglified without concat.

I'm successfully generating sourcemaps with all tasks that use uglify with gulp-concat in the process.

However, I have a folder that needs to be uglfied without concat. And that just returns null in the included source.

gulp.task('js:pages', function() {
  return gulp.src(path.src.js + 'pages/**/*.js')
    .pipe($.sourcemaps.init({includeContent: true}))
      .pipe($.uglify())
    .pipe($.sourcemaps.write('./'))
    .pipe(gulp.dest(path.dist.js + 'pages/'));
});

This is consistent with single files in the source and blobs.

I've also tried manually generating the sourceRoot for each instead, however, the (file) var in the function only seems to return [Object object], and I can't seem to find documentation on what that variable is actually returning.

Can someone please advise?

Thanks in advance...

sourcemaps.init() crashes with { loadMaps: true }

I've the following code,

gulp.task("styles", function() {
    return gulp.src(cssFiles)
    .pipe(sass({
        sourcemap: true,
        sourcemapPath: "../scss"
    }))
    .on("error", function(e) { gutil.log(e.message); })
    .pipe(sourcemaps.init({ loadMaps: true }))
    .pipe(prefix())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(cssDir))
    .on("error", gutil.log);
});

It gives the following error,

[19:31:22] Using gulpfile ~/Workspace/Scrollback/scrollback/gulpfile.js
[19:31:22] Starting 'styles'...
[19:31:22] gulp-ruby-sass: directory
[19:31:23] gulp-ruby-sass: write client.css
      write client.css.map
[19:31:23] gulp-ruby-sass: write embed.css
      write embed.css.map
[19:31:24] gulp-ruby-sass: write signup.css
      write signup.css.map
[19:31:24] gulp-ruby-sass: write stylesheet-alt.css
      write stylesheet-alt.css.map
[19:31:24] gulp-ruby-sass: write stylesheet.css
      write stylesheet.css.map
[19:31:25] gulp-ruby-sass: write try.css
      write try.css.map

path.js:313
        throw new TypeError('Arguments to path.resolve must be strings');
        ^
TypeError: Arguments to path.resolve must be strings
    at Object.exports.resolve (path.js:313:15)
    at Transform.sourceMapInit [as _transform] (/home/satya/Workspace/Scrollback/scrollback/node_modules/gulp-sourcemaps/index.js:44:26)
    at Transform._read (/home/satya/Workspace/Scrollback/scrollback/node_modules/gulp-sourcemaps/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Transform._write (/home/satya/Workspace/Scrollback/scrollback/node_modules/gulp-sourcemaps/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/home/satya/Workspace/Scrollback/scrollback/node_modules/gulp-sourcemaps/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:238:10)
    at writeOrBuffer (/home/satya/Workspace/Scrollback/scrollback/node_modules/gulp-sourcemaps/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:228:5)
    at Transform.Writable.write (/home/satya/Workspace/Scrollback/scrollback/node_modules/gulp-sourcemaps/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:195:11)
    at write (_stream_readable.js:585:24)
    at flow (_stream_readable.js:594:7)
    at Transform.pipeOnReadable (_stream_readable.js:626:5)

not creating sourcemap at all?

I'm getting nowhere fast.

My box:

OS:        MAC OS X 'Mavericks'
node -v:   v0.10.28
npm -v:    1.4.13

I ran the exact example of your readme and the sourcemap did not output.
Then, I decided to npm install in your prj and npm test, this is what I got:

> [email protected] test /Users/wkseymou/repos/lrn-gulp/lrn-srcmaps/node_modules/gulp-sourcemaps
> jshint *.js test/*.js && faucet test/*.js

ERROR: Can't open test/*.js
index.js: line 61, col 26, This function's cyclomatic complexity is too high. (11)
index.js: line 2, col 15, 'require' is not defined.
index.js: line 3, col 10, 'require' is not defined.
index.js: line 4, col 12, 'require' is not defined.
index.js: line 5, col 12, 'require' is not defined.
index.js: line 12, col 1, 'module' is not defined.
index.js: line 48, col 1, 'module' is not defined.
index.js: line 101, col 27, 'Buffer' is not defined.
index.js: line 109, col 23, 'Buffer' is not defined.
index.js: line 118, col 23, 'Buffer' is not defined.
index.js: line 118, col 57, 'Buffer' is not defined.
index.js: line 3, col 7, 'fs' is defined but never used.

12 errors
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

Any help would be greatly appreciated.

No Source Content logs

I'm getting this log for every less file I'm importing:

gulp-sourcemap-write: No source content for "csstyle.less". Trying to load from file.

I've narrowed it down to changes between 1.2.5 and 1.2.6 where it looks like the only changes were a few console logs and a readme update. So this explains why I'm seeing the logs. My question is, does this mean there's something wrong with my setup or is this just informational. If it's just informational I'd really prefer it to be an opt-in because it clutters up the output. Thanks!

Factor out applySourceMap()?

As mentioned by @terinjokes in sindresorhus/gulp-traceur#16, it may be cleaner to put applySourceMap() to another module (and maybe add other source map helpers).

The idea behind adding this to the vinyl object is to make it easy for plugin developers to add source map support without adding additional dependencies to the plugin.

If we decide to remove this, maybe it can be added to gulp-util, as that module is used by most plugins anyway.

Let's discuss.

Support absolute paths to sourcefiles

Not sure if its part of the spec, but Sass can output source file paths as absolute paths with a file protocol. Example:

sources: 
   [ 'file:///Users/robw/Documents/Contrib/gulp-ruby-sass/fixture/source/_partial-1.scss',
     'file:///Users/robw/Documents/Contrib/gulp-ruby-sass/fixture/source/nested/fixture-b.scss',
     'file:///Users/robw/Documents/Contrib/gulp-ruby-sass/fixture/source/component/_obj-2.scss' ],

It looks like gulp-sourcemaps doesn't support these absolute paths. Thoughts on adding support?

Remove existing //# sourceMappingURL comments

If I concatenate a bunch of files together that already have sourceMap comments, I would like the original //# sourceMappingURL comments to be removed. For this configuration

return gulp.src([
      paths.bower + 'jquery/dist/jquery.min.js',
      paths.bower + 'angular/angular.min.js'])
  .pipe(sourcemaps.init({loadMaps: true}))
  .pipe(concat('out.js'))
  .pipe(sourcemaps.write('.'))
  .pipe(gulp.dest(paths.dist + 'scripts'));

The resulting out.js looks like this:

// jquery stuff
//# sourceMappingURL=jquery.min.map

// angular stuff
//# sourceMappingURL=angular.min.js.map

//# sourceMappingURL=out.js.map

Wouldn't it be better if out.js looked like this:

// jquery stuff
// angular stuff
//# sourceMappingURL=out.js.map

Is there a better approach that I should be using?

Problem with gulp-sass ? Or gulp-autoprefixer ? Or gulp-sourcemaps ?

Hi,

There is a lot of issue about mixing gulp-sass and/or gulp-autoprefixer with gulp-sourcemaps.

For example : dlmanning/gulp-sass#106, sindresorhus/gulp-autoprefixer#8

I just spend 2 hours debugging to find out where the problem come from, and still no success.

But I finally noticed something (but still don't know where the problem come from).

In source-map-generator.js @ Line 359, I watched the key value.

In this configuration:

gulp.task('css', function () {
    gulp.src('./assets/sass/style.scss')
        .pipe(sourcemaps.init())
        .pipe(sass())
        //.pipe(sourcemaps.write({includeContent: false}))
        //.pipe(sourcemaps.init({loadMaps: true}))
        .pipe(autoprefixer())
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest('./public/css'))
});

The value of the key is $style.css, and it does not work

But in this configuration:

gulp.task('css', function () {
    gulp.src('./assets/sass/style.scss')
        .pipe(sourcemaps.init())
        .pipe(sass())
        .pipe(sourcemaps.write({includeContent: false}))
        .pipe(sourcemaps.init({loadMaps: true}))
        .pipe(autoprefixer())
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest('./public/css'))
});

The value of the key is $style.scss, and it works

Because with the two configurations, _sourcemapContents in source-map-generator.js#360 has always a $style.scss key.

Hope this helps to resolve this issue, and to find if the problem come from sourcemap, sass or autoprefixer (or something else)

Add option to use relative paths instead of just file names to sourcemaps

Right now the sources [ ... ] component of the map always uses the file name without any paths ( relative names )

It's useful ( for me anyway ) to be able to optionally allow the os relative path name to be left intact instead the relative name, for instance

sources = ['angualr.js' becomes sources['webclient/js/framework/angular.js

By using includeContent : true I can then get the best of both worlds.

I can then still debug remotely through chrome tools etc. because the source doesn't matter (its embedded) and I can also debug locally without having to map the relative name to the location of the source code.

The problem with using something like rootSource is that many of the files that have been concat'd into the final file are from different directories so my debugger has no idea where to look for the code and again I have to manually map the files

I looked into this, and it would require changes to gulp-sourcemaps and your gulp-concat fork as well.

I added a simple options object to the .init{ospath:true} and then changed a few lines of code to get the change to percolate out into the source map.

UglifyJS ( command line ) already supports this in that they use the full path name for the source name and then allow you to reduce from their, seems like overkill to me, but anyway.

Thoughts?

Windows: wrong kind of slashes in sourceMappingURL

When gulp-sourcemaps is used on a Mac or a Linux PC, the generated sourceMappingURL comment looks like this:
//# sourceMappingURL=../sourcemaps/main.min.js.map

When the same task is executed on a Windows system, however, backward slashes are used instead of forward slashes:
//# sourceMappingURL=..\sourcemaps\main.min.js.map

Both work (on Windows, at least), but I don't think this is the desired behaviour. Especially when used in teams with a mix of Windows and Mac computers, this can lead to problems.

... in combination with browserify and angular?

Browserify comes with a debug option which automatically adds source map. Wondering how this will behave in combination with this module?

And has anyone done this before, with AngularJS code altogether? I think such a recipe in the README.md would be awesome.

Empty Mappings and Names

I'm having some issues with mappings and names it seems. Here is my current setup. Let me know what other info would be helpful to solve. It seems that sourcesContent paths are wrong but I'm not sure?

Directory Structure

dist
--css
----style.css
----style.css.map
src
--scss
----abs
----bourbon
----style.scss

style.css

.all-my-complied-scss-files-styles {}
/*# sourceMappingURL=style.css.map */

style.css.map

{
"version":3,
"file":"style.css",
"names":[],
"mappings":"",
"sources":["style.scss"],
"sourcesContent":["@import \"bourbon/bourbon\";\n\n@import \"abs/colors\",\n        \"abs/variables\";\n\n@import \"settings\";\n@import \"../bower_components/foundation/scss/foundation\";\n@import \"../bower_components/foundation/scss/normalize\";\n\n@import \"abs/abs\";\n\n@import \"custom\",\n        \"pages\",\n        \"apps\";\n"],"sourceRoot":"/source/"
}

Gulp Task

gulp.task('sass', function() {
    return gulp.src(sources.sass)
        .pipe(sourcemaps.init())
            .pipe(sass({
                outputStyle:'compressed'
            }))
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest('dist/css/'))
        .pipe(gulpif(state === 'watch', livereload()));
});

gulp-sourcemaps stopped working as of version 1.2.5

Hi,
As of version 1.2.5, I keep getting the message below. Now array.ts is in a subfolder of the exlent\ folder, so something with the file path handling no longer works. Are there any breaking changes that I need to be aware of? 1.2.4 works fine. 1.2.6 and 1.2.7 don't.

gulp-sourcemap-write: source file not found:c:\Source\eXLent_master\exlent\arrays.ts

sourcemap with browserify doesn't add sources

Hello
I'm using this code to generate souce map for js browserifyed

gulp.task('build-js', function () {
    var browserified = transform(function(filename) {
        var b = browserify({
            entries: [filename],
            extensions: ['.coffee', '.hbs']
        });
        return b.bundle();
    });
    return gulp.src(config.js.compileSrc)
        .pipe(sourcemaps.init())
        .pipe(browserified)
        .pipe(uglify())
        .pipe(sourcemaps.write('./'))
        .pipe(gulp.dest(config.js.dest))
});

The sourcemap gets generated but the sources aren't right, they're empty

{"version":3,"sources":["?"]

Don't know if this is browserify concern or it can be fixed here.

Thanks

Emits two comments for `sourceMappingURL`?

My gulp pipeline has something like this:

.pipe(usemin({
  js: [sourcemaps.init(), uglify(), sourcemaps.write('.')]
}))

I get the right number and names of files, e.g. dist/scripts/external.js and dist/scripts/external.js.map. However, the end of dist/scripts/external.js looks like this:

//# sourceMappingURL=scripts/external.js
//# sourceMappingURL=../scripts/external.js.map

The source maps aren't working for me in the browser. Am I doing something wrong here? Is there a way to get gulp-sourcemaps and gulp-usemin to cooperate?

*.map.map file being generated

Issue

Multiple map files are being generated, styles.css.map, and styles.css.map.map.

Gulp Task

gulp.task('sass:main', function () {
    return gulp.src('theme/scss/styles.scss')
        .pipe(rubySass({sourcemap: 'inline'}))
        .on('error', function (error) {
            console.error(error);
            this.emit('end');
        })
        .pipe(sourcemaps.init({loadMaps: true}))
        .pipe(autoprefix({
            browsers: ['last 2 versions']
        }))
        .pipe(sourcemaps.write('./'))
        .pipe(gulp.dest('./theme/css'));
});

Generated Files

screen shot 2014-09-19 at 3 43 45 pm

Source Maps Not Working for SCSS

Issue

The inline source maps generated for scss are not valid. If I replace the inline data with a different plugins source map, everything works fine (not chrome configuration issue).

Gulp Task

gulp.task('css:dev', function () {
    return gulp.src('public/css/**/*.scss') // I have also tried only targeting core.scss, same result
        .pipe(sourcemaps.init())
        .pipe(sass())
        .on('error', function (error) {
            console.error(error);
            this.emit('end');
        })
        .pipe(autoprefix({
            browsers: ['last 2 versions']
        }))
        .pipe(sourcemaps.write())
        .pipe(gulp.dest('public/build/css/'))
        .pipe(livereload({auto: false}));
});

I have also tried several variations, including:

gulp.task('css:dev', function () {
    return gulp.src('public/css/**/core.scss')
        .pipe(sourcemaps.init())
        .pipe(autoprefix({
            browsers: ['last 2 versions']
        }))
        .pipe(sourcemaps.write())
        .pipe(sass())
        .on('error', function (error) {
            console.error(error);
            this.emit('end');
        })
        .pipe(gulp.dest('public/build/css/'))
        .pipe(livereload({auto: false}));
});

If I decode the base64, it seems to only be capturing the core.css file which is the compiled file.

{"version":3,"sources":["core.css"],"names":[],"mappings":"AAAA,gBAAe;AACf;;0CAE

Any ideas?

Difficult to use with files from different directories

Imagine combining JS files from root/bower_components with files from root/my_scripts

gulp.src(['bower_components/blah/*.js', 'root/my_scripts/*.js'])
    .pipe(sourcemaps.init())
    .pipe(concat('combined.js'))
    .pipe(sourcemaps.write({
      includeContent: false,
      sourceRoot: '/'
    }))
    .pipe(gulp.dest('assets/scripts/'));

It seems to be impossible to specify a sourceRoot that works so that the files of both directories are located correctly.

Support second gulp stream to write out source map files

For example:

var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('javascript', function() {
  var stream = gulp.src('src/**/*.js')
      .pipe(sourcemaps.init())
        .pipe(concat('all.js'))
        .pipe(uglify());

  stream.pipe(gulp.dest('dist'));
  stream.sourceMaps.pipe(gulp('maps'));
});

Not pointing correctly

My use:
gulp.task('scripts', function() {
return gulp.src(['src/*/.js'])
.pipe(jshint('.jshintrc'))
.pipe(sourcemaps.init())
.pipe(concat('main.js'))
.pipe(ngAnotate())
.pipe(uglify())
.pipe(sourcemaps.write())
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('dist/scripts'));
});

ngAnotate = require('gulp-ng-annotate'),
uglify = require('gulp-uglify'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),
sourcemaps = require('gulp-sourcemaps');

chrome developer tools points me to different file and place in it :/

Without ng-annotate it works correctly! :/

Add gulp-concat info in release v0.4.6's notes

I'm using your forked version of gulp-concat, and I wasn't aware I could start using the npm version again.
Please add a note in the v0.4.6 release saying that using your fork is no longer required.
Thank you!

traceur maps are not recognized

After I run traceur, it generates maps that are not recognized by sourcemaps plugin. I have

gulp-sourcemap-write: source file not found:C:\Users\VATULAB\workspace\asw-awx\@traceur\generated\TemplateParser\3

map example:

{"version":3,"file":"<compileOutput>","sources":["@traceur/generated/TemplateParser/3","@traceur/generated/TemplateParser/2","<compileSource>","@traceur/generated/TemplateParser/0","@traceur/generated/TemplateParser/4","@traceur/generated/TemplateParser/5"],"names":[],"mappings":"AAAA,KAAK,AAAC,ICAN,UAAS,AAAgB;;ACAlB,SAAS,IAAE,CAAC,AAAC;AAClB,WAAO,SAAA,IAAG;aAAK,cAAc,EAAC,KAAG;IAAE,EAAC;EACtC;ACFA;ACAA,YAAwB;AAAE,gBAAwB;IAAE;ACApD,aAAS,CAAG,KAAG;AAAA,GFAQ;AFEnB,CDFuC,CAAC;AEE5C","sourceRoot":"C:\\Users\\VATULAB\\workspace\\asw-awx","sourcesContent":["define($__placeholder__0, $__placeholder__1);","function($__placeholder__0) {\n $__placeholder__1\n }","export function one() {\r\n return whom =>one for the ${whom};\r\n}","return $__placeholder__0","get $__placeholder__0() { return $__placeholder__1; }","__esModule: true"]}

Issue with source content

Hi,

I m using v1.2.7
my main.scss file is :

@import "../../bower_components/font-awesome/scss/font-awesome.scss";

Running this simple gulp task produces a lot of No source content for '../../bower_components/font-awesome/scss/_xxx.scss'

gulp.task('style', false, function() {
    gulp.src('./app/styles/main.scss')
        .pipe(sourcemaps.init())
        .pipe(sass())
        .pipe(sourcemaps.write())
        .pipe(gulp.dest('./app/styles'));
});

Any idea what i'm doing wrong ?

General Question

Great plugin! Works as expected, source maps generated and viewable in the browser...thanks for sharing your work :)

However, I had a preconceived notion from quotes I have seen around the Internets saying "allows you to debug minified code in the browser". I assumed it would allow you to have context and view variable values while debugging the source maps. After setting breakpoints in the source map files during code execution, I see that context is not available. Am I correct in assuming that context is simply not supported in browsers yet for source maps in general?

Thanks again for your work!

Multiple sources ignored

Hi,

When generating sourcemaps for a stream source with multiple files using loadMaps: true, only the sourcemaps for the first file are processed. I was expecting to have each file processed with its own sourcemaps.

Consider the following input (each file includes inlined sourcemaps):

├── a.js 
├── b.js
└── c.js

Expected output:

├── a.js
├── a.map.js
├── b.js
├── b.map.js
├── c.js
└── c.map.js

An individual .map.js is generated for each file, but only the file property changes. This means that sources, mappings and sourcesContent are all identical and equal to the first file (a.js).

The script I'm using is equivalent to:

gulp.task('javascript', function() {
  gulp.src('src/**/*.js')
    .pipe(sourcemaps.init({ loadMaps: true }))
      .pipe(uglify())
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest('dist'));
});

Source files and map in different folders

I'm trying to place external sourcemap in css folder while source file is in bower_components/somepackage/some/path and if I understand it right (by playing with code), it assumes that sourcemap will be placed in the same folder as source and writes sources array with that in mind, so I can't see my sources in DevTools.

I think it could be fixed if we could set output path by passing option to init method and resolve source paths relative to it.

Add options to import already existing sourcemaps

I believe sourcemaps.init should allow to pass options to map source files to existing source map files. it should add them when available. The rationale behind this is that sometimes we do import files already minified. It would be better if we could attach to them the already existing sourcemaps. We might also want to support when sourcemaps are already inlined in the imported file too.

We could accept a map option. This one could accept a boolean (default to false), a string (a suffix to add to the file) or a function (mapping a file to the path of its sourcemap) like so :

// Simpler version
sourcemaps.init({map: true});

// Which is the same as
sourcemaps.init({map: '.map'});

// Which itself resolves to
sourcemaps.init({map: function(file) { return file.path + '.map'; }});

The algorithm behind could be something like:

  1. Is there a truthy map option? If not, jump over all following steps
  2. Otherwise, is map option === true ? If yes, change it to '.map'
  3. Is map option a string ? If yes, change it to function (file) { return file.path + oldMapValue; }
  4. Is map option a function ? If not, abort with an error
  5. Call options.map(file) and retrieve the resulting path
  6. Check if the returned path exists
  7. If it does, load the file, check it is a sourcemap and abort if it is not
  8. Attach the sourcemap to the vinyl object

And we could also accept a attachInlined boolean option to check whether the content contains an inlined sourcemap at the end too.

Both the attachInlined and map options could be used at the same time. Then both would be tried to find a valid sourcemap in an order to be defined.

Gulp-sourcemap-init: source file not found

I am seeing this warning:

gulp-sourcemap-init: source file not found:/home/node_modules/browserify/node_modules/browser-resolve/empty.js

with this one gulp task of mine

gulp.task('browserify', function(cb) {
    var bundler = browserify({
            entries: [paths.browserEntry],
            globals: false,
            debug:   true
        })

    bundler
        .bundle()

        .on('error', cb)
        .on('log',   util.log)

        // will show all source files relative to jsRoot inside devtools
        .pipe(gulpif(settings.server.sourcemaps, mold.transformSourcesRelativeTo(paths.js)))
        .pipe(source(paths.js))
        .pipe(buffer()) // because the next steps do not support streams
        .pipe(concat('bundle.js'))
        .pipe(gulpif(settings.server.minify.js, rename({suffix: '.min'})))
        .pipe(sourcemaps.init({loadMaps: true})) // loads existing source map from browserify

        .pipe(gulpif(settings.server.minify.js, uglify({
            mangle: false // because of angularjs :(
        })))
        .pipe(rev())
        .pipe(sourcemaps.write('./'))
        .pipe(gulp.dest(paths.js))
        .pipe(rev.manifest())
        .pipe(gulp.dest(path.join(paths.rev, 'js')))
        .on('end', function() {
            cb()
        })
})

Any clues?

names array not populated in angular project

I've been trying to figure out for a while why this is so.
The minification works (the angular app works fine in browser).
But, the sourcemap cannot be reversed using SourceMapConsumer.prototype.originalPositionFor.

I'm building like this:

var queuedStream = enqueueStreams(
    cssStream,
    jsStream
);
return queuedStream
    .pipe(sourcemaps.init())
    .pipe(concat('built.js'))
    .pipe(uglify())
    .pipe(rev())
    .pipe(transformFooter())
    .pipe(sourcemaps.write('./', { addComment: false }))
    .pipe(gulp.dest(destination));

Results in a source map like this:

{
file: "built-785a8211.js",
mappings: "AA2BA,QAAA,gCACA,YAEA,OAAA,UAAA,GACA,GAAA,GAAA,KAAA,QAEA,KAAA,MAAA,QAAA,GACA,KAAA,IAAA,OAAA,yDAEA,KAAA,MAAA,QAAA,EAAA,MACA,KAAA,IAAA,OAAA,8DAeA,OAbA,GAAA,KAAA,…",
names: [],
sourceRoot: "/source/",
sources: [primus.js, lodash.js, lodash-mixins.js, underscore.function.iterators.js, sprintf.js, jquery.js,],
sourcesContent: [,],
version: 3,
}

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.