@ttoss/config 1.11.6 → 1.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +49 -5
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @ttoss/config
2
2
 
3
- <strong>@ttoss/config</strong> is a very opinionated configuration library for monorepo repositories, packages, and applications. It contains a set of default configuration methods that you can use to configure your projects.
3
+ <strong>@ttoss/config</strong> is a very opinionated configuration library for monorepo repositories, packages, and applications. It contains a set of <a href="/docs/core/config/default-configs">default configurations</a> that you can use on your projects.
4
4
 
5
5
  Each configuration is customizable and you can extend them with your own. For example, you can use the default `.prettierrc.js` file in your monorepo:
6
6
 
@@ -28,7 +28,7 @@ $ yarn add -DW @ttoss/config
28
28
 
29
29
  ## Monorepo
30
30
 
31
- ### Eslint and Prettier
31
+ ### ESLint and Prettier
32
32
 
33
33
  Install the following packages on the root of your monorepo:
34
34
 
@@ -58,7 +58,7 @@ You need `require('@rushstack/eslint-patch/modern-module-resolution');` because
58
58
 
59
59
  ### Husky, commitlint, and lint-staged
60
60
 
61
- This group of packages will only work if you have already installed [Eslint and Prettier](#eslint-and-prettier).
61
+ This group of packages will only work if you have already installed [ESLint and Prettier](#eslint-and-prettier).
62
62
 
63
63
  Install the following packages on the root of your monorepo:
64
64
 
@@ -91,6 +91,50 @@ yarn husky add .husky/commit-msg "yarn commitlint --edit"
91
91
  yarn husky add .husky/pre-commit "yarn lint-staged"
92
92
  ```
93
93
 
94
+ ### Lerna and Yarn Workspaces
95
+
96
+ Although this package doesn't export any configuration for [Lerna](https://github.com/lerna/lerna) or [Yarn Workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces/), it's still useful to have them installed.
97
+
98
+ Install [Lerna](https://github.com/lerna/lerna) on the root of your monorepo:
99
+
100
+ ```shell
101
+ yarn add -DW lerna
102
+ ```
103
+
104
+ And add `lerna.json` config file:
105
+
106
+ ```json title="lerna.json"
107
+ {
108
+ "version": "0.0.0",
109
+ "npmClient": "yarn",
110
+ "useWorkspaces": true,
111
+ "stream": true,
112
+ "command": {
113
+ "publish": {
114
+ "allowBranch": "main",
115
+ "conventionalCommits": true,
116
+ "message": "chore: publish new version"
117
+ },
118
+ "version": {
119
+ "forcePublish": true
120
+ }
121
+ }
122
+ }
123
+ ```
124
+
125
+ Finally, add the following in a `package.json` file to configure [Yarn Workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces/):
126
+
127
+ ```json title="package.json"
128
+ {
129
+ "private": true,
130
+ "workspaces": ["workspace-a", "workspace-b"]
131
+ }
132
+ ```
133
+
134
+ ### Turborepo
135
+
136
+ Coming soon...
137
+
94
138
  ## Packages and Applications
95
139
 
96
140
  ### Babel
@@ -123,7 +167,7 @@ export default config;
123
167
 
124
168
  Configure the `test` script on `package.json`:
125
169
 
126
- ```json title="package.json'
170
+ ```json title="package.json"
127
171
  "scripts: {
128
172
  test: 'jest',
129
173
  }
@@ -149,7 +193,7 @@ export const tsup = tsupConfig();
149
193
 
150
194
  Configure the `build` script on `package.json`:
151
195
 
152
- ```json title="package.json'
196
+ ```json title="package.json"
153
197
  "scripts: {
154
198
  build: 'tsup',
155
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/config",
3
- "version": "1.11.6",
3
+ "version": "1.11.7",
4
4
  "description": "Default configuration for packages.",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -40,7 +40,7 @@
40
40
  "identity-obj-proxy": "^3.0.0",
41
41
  "tsup": "^5.11.11"
42
42
  },
43
- "gitHead": "eb5615ee3b87ffa3eea40f072cefb6d74a3f5423",
43
+ "gitHead": "56d3d3b7c07d7a5616ce6d5f6cf9dccd50dca15a",
44
44
  "devDependencies": {
45
45
  "@jest/types": "^27.4.2"
46
46
  }