From 7f04095820d655642c4e6b0aecfe270794e43869 Mon Sep 17 00:00:00 2001 From: Maurizio Mangione Date: Fri, 20 Feb 2015 11:58:22 +0100 Subject: [PATCH] sourcemaps support added --- gulpfile.js | 5 ++++- package.json | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 84caf0c..eb16c65 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -14,6 +14,7 @@ var gulp = require('gulp'), del = require('del'), notify = require('gulp-notify'), browserSync = require('browser-sync'), + sourcemaps = require('gulp-sourcemaps'), reload = browserSync.reload, p = { jsx: './scripts/app.jsx', @@ -32,7 +33,7 @@ gulp.task('browserSync', function() { server: { baseDir: './' } - }) + }); }); gulp.task('watchify', function() { @@ -58,7 +59,9 @@ gulp.task('browserify', function() { .bundle() .pipe(source(p.bundle)) .pipe(buffer()) + .pipe(sourcemaps.init({loadMaps: true})) .pipe(uglify()) + .pipe(sourcemaps.write('./')) .pipe(gulp.dest(p.distJs)); }); diff --git a/package.json b/package.json index 0af1f3e..2321a85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-starterify", - "version": "0.0.6", + "version": "0.0.8", "description": "React JS application skeleton using Browserify and other awesome tools", "main": "app.js", "repository": { @@ -15,7 +15,8 @@ "boilerplate", "kickstarter", "ES6", - "6to5" + "6to5", + "babel" ], "author": "Maurizio Mangione", "license": "MIT", @@ -26,7 +27,7 @@ "dependencies": {}, "devDependencies": { "babelify": "^5.0.3", - "browser-sync": "^2.1.6", + "browser-sync": "^2.2.0", "browserify": "^8.1.3", "del": "^1.1.1", "gulp": "^3.8.11", @@ -35,6 +36,7 @@ "gulp-csso": "^1.0.0", "gulp-notify": "^2.2.0", "gulp-sass": "^1.3.3", + "gulp-sourcemaps": "^1.3.0", "gulp-uglify": "^1.1.0", "react": "^0.12.2", "superagent": "^0.21.0",