• Robert Knight's avatar
    Generate `.d.ts` files as part of the frontend-shared package · 480b6d77
    Robert Knight authored
    Generate TypeScript definition files as part of the frontend-shared
    package so that TS can typecheck code that uses the package in other
    projects. Within the client repository we don't need to generate these files
    because TypeScript will read the JSDoc comments. When the package is
    consumed from other projects however, it seems that it does not read the
    JSDoc comments. Note that when these `.d.ts` files exist, they are used in preference
    to JSDoc comments by other code in the client repository. Therefore they
    need to be kept up to date when the files are recompiled in watch mode.
    
    In the process of adding this I discovered an issue that the method of
    running CLI commands in gulp tasks in `scripts/gulp/frontend-shared.js` did not
    fail if the exit status was non-zero. I created a `run` utility that
    handles this correctly along with providing the desired defaults.
    480b6d77
frontend-shared.js 1.56 KB