diff --git a/build.php b/build.php index a6ef22a1..a37fd0cf 100644 --- a/build.php +++ b/build.php @@ -120,6 +120,9 @@ function recursiveCopy(string $source, string $dest): bool return true; } +// Make sure we're running from the misuzu root directory. +chdir(__DIR__); + misuzu_log('Cleanup'); createDirIfNotExist(CSS_DIR); createDirIfNotExist(JS_DIR); @@ -137,8 +140,9 @@ if (!is_file(LESS_DIR . LESS_ENTRY_POINT)) { } // figure this out -//misuzu_log(); -//misuzu_log('Compiling TypeScript'); +misuzu_log(); +misuzu_log('Compiling TypeScript'); +misuzu_log(shell_exec('tsc --extendedDiagnostics -p tsconfig.json')); misuzu_log(); misuzu_log('Importing libraries'); diff --git a/templates/master.twig b/templates/master.twig index 0f4fb276..c707cdf7 100644 --- a/templates/master.twig +++ b/templates/master.twig @@ -79,5 +79,6 @@ elem.classList.add(containerHiddenClass); } + diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..eaba29fc --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "ES5", + "removeComments": true, + "preserveConstEnums": true, + "outFile": "./public/js/misuzu.js", + "sourceRoot": "./assets/typescript/", + "rootDir": "./assets/typescript/", + "sourceMap": true, + } +}