formatjs / formatjs-old

The monorepo home to all of the FormatJS related libraries.
https://formatjs.io/
156 stars 53 forks source link

chore: use TypeScript project references #675

Closed pyrocat101 closed 4 years ago

pyrocat101 commented 4 years ago

This PR introduces 2 new yarn scripts to aid development:

# Build CommonJS of all packages
yarn build:cjs
# Watch mode for all packages
yarn dev:cjs

These 2 command will build all packages to CommonJS dist incrementally with TypeScript's build mode. They are especially useful if you are developing several packages together. And thanks to the incremental build mode, the rebuild on file change is almost instant.

Note that they do not replace the current build scripts! A full build via yarn build is still required before you can use these commands, to generate code via scripts (which may has dependency on other fully-built packages) and to make unit tests working. Moreover, these commands do not produce ES module build nor script-populated locale data.