Early-phase compiler for Extollo projects
Go to file
2022-01-09 16:01:14 -06:00
src Make tsc command use full path to tsconfig 2022-01-09 15:54:38 -06:00
.eslintignore Initial commit 2022-01-07 01:02:38 +00:00
.eslintrc.json Initial commit 2022-01-07 01:02:38 +00:00
.gitignore Initial commit 2022-01-07 01:02:38 +00:00
LICENSE Initial commit 2022-01-07 01:02:38 +00:00
package.json Make tsc command use full path to tsconfig 2022-01-09 15:54:38 -06:00
pnpm-lock.yaml Implement zodify, compile, and non-source phases 2022-01-09 11:26:20 -06:00
README.md readme 2022-01-09 16:01:14 -06:00
tsconfig.json Initial commit 2022-01-07 01:02:38 +00:00

@extollo/cc

The Extollo project compiler, excc.

The excc command provides additional compile-time support required by the Extollo framework through the application of various pre- and post-compilation phases:

  • PreparePhase - copies the source files into a separate build directory and writes an augmented tsconfig.json.
  • ZodifyPhase - provides support for Extollo's form validation by generating Zod schemata from TypeScript interfaces specified by the application config
  • CompilePhase - invokes tsc on the augmented build directory
  • NonSourcePhase - copies non-source (read: non-TypeScript) files into the built lib dir

Usage

usage: excc.js [-h] -c CONFIG -t TSCONFIG [-v]

Early-phase compiler for Extollo projects

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        path to the package.json of the project to compile
  -t TSCONFIG, --tsconfig TSCONFIG
                        path to the tsconfig.json for the project to compile
  -v, --verbose         output more verbose and debugging output

Configuration

Aside from the normal tsconfig.json, excc reads its configuration from the extollo section of the project's package.json:

  • extollo.cc.compileDir: string - relative path to the folder to be created and used to compile the project
  • extollo.cc.zodify: string[] - array of directories whose files should have Zod schemata generated for their interfaces
  • extollo.cc.non-source: string[] - array of non-source compile-paths to be copied into the compiled distribution directory