@ttoss/config 0.8.3 → 0.8.4
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.
- package/README.md +59 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @ttoss/config
|
|
2
|
+
|
|
3
|
+
## 📚 About
|
|
4
|
+
|
|
5
|
+
<strong> @ttoss/config</strong> is a easiest way to use Configs in your React application.
|
|
6
|
+
|
|
7
|
+
## 🚀 Get Started
|
|
8
|
+
|
|
9
|
+
### Install
|
|
10
|
+
|
|
11
|
+
```shell
|
|
12
|
+
$ yarn add @ttoss/config
|
|
13
|
+
# or
|
|
14
|
+
$ npm install @ttoss/config
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 📄 Examples of use
|
|
18
|
+
|
|
19
|
+
### Babel
|
|
20
|
+
|
|
21
|
+
```js title="babel.config.js"
|
|
22
|
+
const { babelConfig } = require('@ttoss/config');
|
|
23
|
+
|
|
24
|
+
module.exports = babelConfig();
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Jest
|
|
28
|
+
|
|
29
|
+
```js title="jest.config.js"
|
|
30
|
+
import { jestConfig } from '@ttoss/config';
|
|
31
|
+
|
|
32
|
+
const config = jestConfig({
|
|
33
|
+
moduleNameMapper: {
|
|
34
|
+
'\\.(css)$': 'identity-obj-proxy',
|
|
35
|
+
},
|
|
36
|
+
setupFilesAfterEnv: ['./jest.setup.tsx'],
|
|
37
|
+
testEnvironment: 'jsdom',
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export default config;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Tsup
|
|
44
|
+
|
|
45
|
+
```js title="tsup.config.js"
|
|
46
|
+
import { tsupConfig } from '@ttoss/config';
|
|
47
|
+
|
|
48
|
+
export const tsup = tsupConfig();
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 📘 Types
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
const babelConfig: () => any;
|
|
55
|
+
|
|
56
|
+
const jestConfig: () => any;
|
|
57
|
+
|
|
58
|
+
const tsupConfig: () => any;
|
|
59
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/config",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Default configuration for packages.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"deepmerge": "^4.2.2",
|
|
35
35
|
"tsup": "^4.14.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "9d8124a3110e71122dbdeebc791bac649e43791c",
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@jest/types": "^27.1.0"
|
|
40
40
|
}
|