const { tools: { makeBundle, symlinkTests, copyFile }} = require("devtools-launchpad/index");
const path = require("path");
const minimist = require("minimist");

const feature = require("devtools-config");
const getConfig = require("./getConfig");

const envConfig = getConfig();
feature.setConfig(envConfig);

const args = minimist(process.argv.slice(2), {
  boolean: ["watch"],
});

function start() {
  console.log("start: copy assets")
  const projectPath = path.resolve(__dirname, "..")
  const mcModulePath =  "devtools/client/debugger/new";
  const mcPath = feature.getValue("firefox.mcPath");

  copyFile(
    path.resolve(projectPath, "assets/locales/debugger.properties"),
    path.resolve(projectPath, "firefox/devtools/client/locales/en-US/debugger.properties"),
    {cwd: projectPath}
  );

  symlinkTests({ projectPath, mcModulePath })

  makeBundle({
    outputPath: path.join(projectPath, mcPath, mcModulePath),
    projectPath,
    watch: args.watch
  }).then(() => {
    console.log("done: copy assets")
  });
}

start();

@@ -798,16 +798,197 @@
 %7D%0A  );%0A%0A
+  copyFile(%0A    path.resolve(projectPath, %22assets/default-prefs.js%22),%0A    path.resolve(projectPath, %22firefox/devtools/client/preferences/devtools.js%22),%0A    %7Bcwd: projectPath%7D%0A  );%0A%0A
   symlin

Add prefs to copy-assets (#1643)