forked from firefox-devtools/debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish-assets.js
40 lines (32 loc) · 1019 Bytes
/
publish-assets.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const { tools: { makeBundle, symlinkTests, copyFile }} = require("devtools-launchpad/index");
const path = require("path");
const fs = require("fs");
const rimraf = require("rimraf");
function start() {
console.log("start: publish assets")
const projectPath = path.resolve(__dirname, "..")
const mcModulePath = "devtools/client/debugger/new";
const buildDir = path.resolve(projectPath, "assets/build");
const assetsDir = path.resolve(projectPath, "assets");
if (fs.existsSync(buildDir)) {
rimraf(buildDir, {}, () => {});
}
fs.mkdirSync(buildDir);
copyFile(
path.resolve(projectPath, "assets/panel"),
path.join(projectPath, "assets/build/panel"),
{ cwd: projectPath }
);
copyFile(
path.resolve(projectPath, "src/test/mochitest"),
path.resolve(projectPath, "assets/build/mochitest"),
{ cwd: projectPath }
);
makeBundle({
outputPath: `${projectPath}/assets/build`,
projectPath
}).then(() => {
console.log("done: publish assets")
})
}
start();