From 5d764a9f0edd4a7d5b6a61a3dd3915d8b6ffb8e3 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 17 Aug 2021 14:24:10 -0700 Subject: [PATCH] Add comment for srcPath --- scripts/build.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/build.mjs b/scripts/build.mjs index fd5183de..82235cc4 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -60,6 +60,14 @@ parameters .option("--override-css
", "pass in an alternative main css file") parameters.parse(process.argv); +/** + * We use Snowpack to handle the translation of TypeScript + * into JavaScript. We thus can't bundle files straight from + * the src directory, since some of them are TypeScript, and since + * they may import Node modules. We thus bundle files after they + * have been processed by Snowpack. This function returns paths + * to the files that have already been pre-processed in this manner. + */ function srcPath(src) { return path.join(snowpackOutDir, 'src', src); }