From 4ddc1a52abe89eeb64ad5834a0febe5ac14e751c Mon Sep 17 00:00:00 2001 From: Joel Chen Date: Wed, 28 Oct 2020 23:35:09 -0700 Subject: [PATCH] [feat] copy .etmp/xarc-options.json to dist for build --- packages/xarc-app-dev/src/lib/dev-tasks.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/xarc-app-dev/src/lib/dev-tasks.ts b/packages/xarc-app-dev/src/lib/dev-tasks.ts index 37ec09d06..8cba945d0 100644 --- a/packages/xarc-app-dev/src/lib/dev-tasks.ts +++ b/packages/xarc-app-dev/src/lib/dev-tasks.ts @@ -485,6 +485,8 @@ export function loadXarcDevTasks(xrun, xarcOptions: XarcOptions = {}) { ".production-env", ".set.css-module.env", ".clean.build", + ".mk-dist-dir", + ".copy-xarc-options-to-dist", "build-dist-dll", "build-dist-min", "build-dist:flatten-l10n", @@ -493,6 +495,8 @@ export function loadXarcDevTasks(xrun, xarcOptions: XarcOptions = {}) { "build-dist:clean-tmp" ], + ".copy-xarc-options-to-dist": () => shell.cp(Path.join(eTmpDir, "xarc-options.json"), "dist"), + "mv-to-dist": ["mv-to-dist:clean", "mv-to-dist:mv-dirs", "mv-to-dist:keep-targets"], "build-dist-dev-static": { desc: false, @@ -810,7 +814,7 @@ You only need to run this if you are doing something not through the xarc tasks. dev: { desc: `Start your app with watch in development mode with dev-admin. options: node.js --inspect can be used to debug the dev-admin`, - dep: [".remove-log-files", ".development-env", ".mk-dist-dir", ".build.babelrc"], + dep: [".remove-log-files", ".development-env", ".build.babelrc"], task() { return [ ".set.css-module.env", @@ -1012,7 +1016,7 @@ You only need to run this if you are doing something not through the xarc tasks. if (Fs.existsSync(Path.resolve(AppMode.src.client, "dll.config.js"))) { Object.assign(tasks, { "build-dist-dll": { - dep: [".mk-dll-dir", ".mk-dist-dir", ".production-env"], + dep: [".mk-dll-dir", ".production-env"], task: () => { setWebpackProfile("dll"); return exec(