Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
fix(build): use relative path for source maps. resolve #66
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyGrant committed Apr 9, 2015
1 parent ebfe0f0 commit aaf3cc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion build/paths.js
@@ -1,13 +1,15 @@
var path = require('path');

var appRoot = 'src/';
var outputRoot = 'dist/';

module.exports = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
style: 'styles/**/*.css',
output: 'dist/',
output: outputRoot,
sourceMapRelativePath: '../' + appRoot,
doc:'./doc',
e2eSpecsSrc: 'test/e2e/src/*.js',
e2eSpecsDist: 'test/e2e/dist/'
Expand Down
4 changes: 2 additions & 2 deletions build/tasks/build.js
Expand Up @@ -16,9 +16,9 @@ gulp.task('build-system', function () {
return gulp.src(paths.source)
.pipe(plumber())
.pipe(changed(paths.output, {extension: '.js'}))
.pipe(sourcemaps.init())
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(to5(assign({}, compilerOptions, {modules:'system'})))
.pipe(sourcemaps.write({includeContent: false, sourceRoot: '/' + paths.root }))
.pipe(sourcemaps.write({includeContent: false, sourceRoot: paths.sourceMapRelativePath }))
.pipe(gulp.dest(paths.output));
});

Expand Down

0 comments on commit aaf3cc9

Please sign in to comment.