From 8310d358cd4a8c9e1cdd29366a2961d142ed0436 Mon Sep 17 00:00:00 2001 From: Jason Laster Date: Thu, 10 Aug 2017 08:53:14 -0400 Subject: [PATCH] Merge pull request #579 from devtools-html/devtools-core/ignore-assets ignore assets --- packages/devtools-launchpad/src/tools/mc/make-bundle.js | 6 +++++- packages/devtools-reps/bin/copy-assets.js | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/devtools-launchpad/src/tools/mc/make-bundle.js b/packages/devtools-launchpad/src/tools/mc/make-bundle.js index 478bbb9c7..e6c7898d7 100644 --- a/packages/devtools-launchpad/src/tools/mc/make-bundle.js +++ b/packages/devtools-launchpad/src/tools/mc/make-bundle.js @@ -6,13 +6,17 @@ const path = require("path"); const webpack = require("webpack"); const process = require("process"); -function makeBundle({ outputPath, projectPath, watch = false }) { +function makeBundle({ outputPath, projectPath, watch = false, updateAssets = false }) { process.env.TARGET = "firefox-panel"; process.env.OUTPUT_PATH = outputPath; const webpackConfig = require(path.resolve(projectPath, "webpack.config.js")); return new Promise((resolve, reject) => { + if (updateAssets) { + delete webpackConfig.recordsPath; + } + const webpackCompiler = webpack(webpackConfig); const postRun = (error, stats) => { diff --git a/packages/devtools-reps/bin/copy-assets.js b/packages/devtools-reps/bin/copy-assets.js index 271d5dd80..0b83ea05f 100644 --- a/packages/devtools-reps/bin/copy-assets.js +++ b/packages/devtools-reps/bin/copy-assets.js @@ -2,15 +2,17 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -const { tools: { makeBundle, symlinkTests, copyFile }} = require("devtools-launchpad/index"); -const fs = require('fs-extra') +const { + tools: { makeBundle, symlinkTests, copyFile } +} = require("devtools-launchpad/index"); +const fs = require("fs-extra"); const path = require("path"); const minimist = require("minimist"); const getConfig = require("./getConfig"); const { getValue, setConfig } = require("devtools-config"); const args = minimist(process.argv.slice(2), { - boolean: ["watch", "symlink"], + boolean: ["watch", "symlink"] }); function start() {