Skip to content

Commit

Permalink
Write out proper source map file for sw-toolbox.
Browse files Browse the repository at this point in the history
Fixes #42
  • Loading branch information
jkleinsc committed Oct 27, 2016
1 parent 23c2e54 commit 7f7e4b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/ember-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ ServiceWorkerIncludes.prototype.toTree = function(tree, inputPath, outputPath, i
if (inputPath === '/') {
this.swIncludeTree = tree;
this.swIncludeTree = funnel(tree, {
srcDir: serviceWorkersDir
srcDir: serviceWorkersDir,
allowEmpty: true
});
}
return funnel(tree, {
Expand Down
4 changes: 2 additions & 2 deletions lib/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ BroccoliServiceWorker.prototype.write = function(readTree, destDir) {
}
if (swIncludeFiles && swIncludeFiles.length) {
lines = lines.concat(swIncludeFiles.map(function(file) {
return fs.readFileSync(file)
return fs.readFileSync(file);
}).join(';\n'));
}
if (swIncludeDir) {
Expand Down Expand Up @@ -134,7 +134,7 @@ BroccoliServiceWorker.prototype.write = function(readTree, destDir) {
fs.writeFileSync(path.join(destDir, serviceWorkerFile), lines.join("\n"));
fs.writeFileSync(path.join(destDir, toolboxLocation), fs.readFileSync(swToolboxFile));
if (debug) {
fs.writeFileSync(path.join(destDir, 'sw-toolbox.map.json'), fs.readFileSync(swToolboxMapFile));
fs.writeFileSync(path.join(destDir, 'sw-toolbox.js.map'), fs.readFileSync(swToolboxMapFile));
}
});
});
Expand Down

0 comments on commit 7f7e4b5

Please sign in to comment.