Terezinha Tech Operations (ttoss) is a collection of modular solutions designed to empower product development teams.
The "hello world" of this repository is running ttoss Storybook in your local machine. To do so, clone the repository and run the following commands on the root folder:
-
Install the dependencies:
pnpm install
-
Build i18n languages (for more information, see @ttoss/i18n-cli):
pnpm i18n
-
Run the Storybook:
pnpm storybook
If everything goes well, you should see the Storybook running in your browser.
build-config is a command that builds some packages that are used in the configuration files of the other packages. For example, it builds @ttoss/i18n-cli package because it must be built before running i18n commands in the other packages.
No. We use the exports field to specify the package entry points of the packages and point them to the src folder. For example,
{
"exports": {
".": "./src/index.ts"
}
}Furthermore, we configure publishConfig to point to the dist folder, so when we publish the package, it will be published pointing to the dist folder, which contains the built files.
{
"publishConfig": {
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
}
}
}With the introduction of the new --moduleResolution bundler, TypeScript 4.7+ supports resolution features that can be interpreted natively by TypeScript, allowing exports and imports to be enabled and disabled in package.json. Because ttoss libraries use exports as package entry points, you need to set moduleResolution as bundler in your project tsconfig.json if it uses webpack, rollup, or other bundlers:
{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "bundler"
}
}If your application uses Node.js without a bundler, set moduleResolution to NodeNext.
Using the ^ prefix in the dependsOn configuration instructs turbo to ensure that tasks in the package's dependencies are completed first. For instance, the docs/website depends on carlin, so the ^build ensures that carlin is built before docs/website, as the documentation generation relies on the built code from carlin.
We use @lerna-lite/version to bump version of packages changed since the last release. To version breaking changes, you need to add a BREAKING CHANGE section to the commit footer (reference). For example:
feat: add new feature
BREAKING CHANGE: this is a breaking changeIn a GitHub pull request, you can add the message to the commit message before merging it.
