gulp-sourcemaps npm package of node.js


Source are basically used along with some other plugin. for example when you use gulp-clean-css the minified css file is created but with the help of source maps we can also reach the original file with a url which was embedded in the min file.


var gulp = require('gulp');
var cleanCss = require('gulp-clean-css');
var sourcemaps = require('gulp-sourcemaps');

// name of the task is :  source-maps 
gulp.task('source-maps', function() {		
    return gulp.src('source/*.css')			//add your custom source here
        .pipe(gulp.dest('maps'));			// name of the destination folder comes here


  • Now run the snippet using the following command :
    $gulp source-maps