diff --git a/package.json b/package.json index 8ba6e16cb..c4a19a52c 100644 --- a/package.json +++ b/package.json @@ -28,10 +28,10 @@ "deleteNotice": "node notices/notice-delete.js", "mascara": "node ./mascara/example/server", "testMascara": "npm run buildMascara && karma start test/mascara.conf.js", - "buildMascara": "npm run buildMascaraUi && npm run buildMascaraBackground && npm run buildMascaraTests", - "buildMascaraUi": "browserify mascara/test/test-ui.js -o mascara/test/ui-bundle.js", - "buildMascaraBackground": "browserify mascara/src/background.js -o mascara/test/background.js", - "buildMascaraTests": "browserify test/integration/lib/first-time.js -o mascara/test/test-bundle.js" + "buildMascara": "mkdir -p dist/mascara && npm run buildMascaraUi && npm run buildMascaraBackground && npm run buildMascaraTests", + "buildMascaraUi": "browserify mascara/test/test-ui.js -o dist/mascara/ui.js", + "buildMascaraBackground": "browserify mascara/src/background.js -o dist/mascara/background.js", + "buildMascaraTests": "browserify test/integration/lib/first-time.js -o dist/mascara/tests.js" }, "browserify": { "transform": [ diff --git a/test/mascara.conf.js b/test/mascara.conf.js index 8e8fa2cdf..b4ec5846f 100644 --- a/test/mascara.conf.js +++ b/test/mascara.conf.js @@ -2,13 +2,13 @@ const getBaseConfig = require('./base.conf.js') module.exports = function(config) { const settings = getBaseConfig(config) - settings.files.push('mascara/test/ui-bundle.js') - settings.files.push('mascara/test/test-bundle.js') - // settings.files.push('test/integration/bundle.js') - settings.files.push({ pattern: 'mascara/test/background.js', watched: false, included: false, served: true }), - // /background.js - settings.proxies['/background.js'] = '/base/mascara/test/background.js' + // ui and tests + settings.files.push('dist/mascara/ui.js') + settings.files.push('dist/mascara/tests.js') + // service worker background + settings.files.push({ pattern: 'dist/mascara/background.js', watched: false, included: false, served: true }), + settings.proxies['/background.js'] = '/base/dist/mascara/background.js' config.set(settings) }