diff --git a/lib/ember-addon.js b/lib/ember-addon.js index 31d2bf9..7435f68 100644 --- a/lib/ember-addon.js +++ b/lib/ember-addon.js @@ -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, { diff --git a/lib/service-worker.js b/lib/service-worker.js index e740db2..f2282bb 100644 --- a/lib/service-worker.js +++ b/lib/service-worker.js @@ -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) { @@ -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)); } }); });