Gulpfile.js
/**
 * Creates a TS project for each package in the packages directory
 * Need to do this because otherwise you get this error:
 * `A project cannot be used in two compilations at the same time. Create multiple projects with createProject instead.`
 *
 * Should also create the TS projects once per task invocation so we benefit
 * from incremental compilation
 */
Creates a TS project for each package in the packages directory
Need to do this because otherwise you get this error:
`A project cannot be used in two compilations at the same time. Create multiple projects with createProject instead.`

Should also create the TS projects once per task invocation so we benefit
from incremental compilation
Creates a TS project for each package in the packages directory Need to do this because otherwise you get this error : ` A project cannot be used in two compilations at the same time . Create multiple projects with createProject instead . ` Should also create the TS projects once per task invocation so we benefit from incremental compilation
function createTSProjects() {
  const projects = {};
  const packages = getAllPackageDirNames();
  packages.forEach((packageName) => {
    projects[packageName] = ts.createProject('./tsconfig.json');
  });
  return projects;
}
function createTSProjects ( ) { const projects = { } ; const packages = getAllPackageDirNames ( ) ; packages . forEach ( ( packageName ) => { projects [ packageName ] = ts . createProject ( './tsconfig.json' ) ; } ) ; return projects ; }
Creates a TS project for each package in the packages directory
 Need to do this because otherwise you get this error:
 `A project cannot be used in two compilations at the same time.
Creates a TS project for each package in the packages directory Need to do this because otherwise you get this error : ` A project cannot be used in two compilations at the same time .