Skip to content

Commit

Permalink
fix sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Apr 1, 2017
1 parent df311eb commit a966df7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
7 changes: 5 additions & 2 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
gulp = require 'gulp'
coffee = require 'gulp-coffee'
uglify = require 'gulp-uglify'
filter = require 'gulp-filter'
sourcemaps = require 'gulp-sourcemaps'
mocha = require 'gulp-mocha'
istanbul = require 'gulp-istanbul'
Expand All @@ -10,7 +11,7 @@ del = require 'del'

paths =
src: ['src/**/*.coffee']
demo: ['demo/**/*', 'build/js/quadtree.min.js']
demo: ['demo/**/*', 'build/js/quadtree.min.js', 'build/js/quadtree.min.js.map']
test: ['test/*.coffee']
perf: ['test/perf/*.coffee']
docindex: ['docs/quadtree.html']
Expand All @@ -22,10 +23,12 @@ gulp.task 'build', () ->
gulp.src paths.src
.pipe sourcemaps.init()
.pipe coffee bare: true
.pipe sourcemaps.write '.'
.pipe gulp.dest('build/js')
.pipe(filter('**/*.js'))
.pipe uglify()
.pipe sourcemaps.write()
.pipe rename extname: '.min.js'
.pipe sourcemaps.write '.'
.pipe gulp.dest 'build/js'


Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"gulp": "^3.9.1",
"gulp-coffee": "^2.3.1",
"gulp-docco": "0.0.4",
"gulp-filter": "^5.0.0",
"gulp-istanbul": "^0.10.4",
"gulp-minify-html": "^1.0.4",
"gulp-mocha": "^2.1.3",
Expand Down
25 changes: 24 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,14 @@ gulp-docco@0.0.4:
underscore "~1.5.2"
vinyl-fs "~0.1.2"

gulp-filter@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-5.0.0.tgz#cfa81966fb67884f2ba754b067152929428d59bc"
dependencies:
gulp-util "^3.0.6"
multimatch "^2.0.0"
streamfilter "^1.0.5"

gulp-istanbul@^0.10.4:
version "0.10.4"
resolved "https://registry.yarnpkg.com/gulp-istanbul/-/gulp-istanbul-0.10.4.tgz#2b2a1bcbeb96a62c78e69821d104d6fca32efb09"
Expand Down Expand Up @@ -1044,7 +1052,7 @@ gulp-uglify@^1.4.1:
uglify-save-license "^0.4.1"
vinyl-sourcemaps-apply "^0.2.0"

gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.2, gulp-util@^3.0.3:
gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.2, gulp-util@^3.0.3, gulp-util@^3.0.6:
version "3.0.8"
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
dependencies:
Expand Down Expand Up @@ -1960,6 +1968,15 @@ ms@0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"

multimatch@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
dependencies:
array-differ "^1.0.0"
array-union "^1.0.1"
arrify "^1.0.0"
minimatch "^3.0.0"

multipipe@^0.1.0, multipipe@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
Expand Down Expand Up @@ -2464,6 +2481,12 @@ stream-consume@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f"

streamfilter@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/streamfilter/-/streamfilter-1.0.5.tgz#87507111beb8e298451717b511cfed8f002abf53"
dependencies:
readable-stream "^2.0.2"

string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
Expand Down

0 comments on commit a966df7

Please sign in to comment.