esmate 1.0.2 โ 1.0.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 +32 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
`esmate` is a lightweight CLI tool designed to simplify common JavaScript/TypeScript project tasks like formatting,
|
|
4
4
|
linting, and running custom task sequences.
|
|
5
5
|
|
|
6
|
-
## Features
|
|
7
|
-
|
|
8
6
|
- ๐งน Lint with ESLint
|
|
9
7
|
- ๐ง Format code with Prettier
|
|
10
8
|
- ๐ ๏ธ Define and run custom task sequences (series and parallel)
|
|
@@ -12,9 +10,23 @@ linting, and running custom task sequences.
|
|
|
12
10
|
|
|
13
11
|
## Usage
|
|
14
12
|
|
|
15
|
-
###
|
|
13
|
+
### Format Code
|
|
14
|
+
|
|
15
|
+
Define your Prettier configuration in a `prettier.config.js` file:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { defineConfig } from "esmate/prettier";
|
|
19
|
+
|
|
20
|
+
export default defineConfig({
|
|
21
|
+
tailwind: {
|
|
22
|
+
tailwindFunctions: ["cn"],
|
|
23
|
+
tailwindStylesheet: "src/global.css",
|
|
24
|
+
},
|
|
25
|
+
ignores: [],
|
|
26
|
+
});
|
|
27
|
+
```
|
|
16
28
|
|
|
17
|
-
Run Prettier to
|
|
29
|
+
Run Prettier to format your code:
|
|
18
30
|
|
|
19
31
|
```bash
|
|
20
32
|
esmate fmt
|
|
@@ -26,7 +38,19 @@ Automatically fix formatting issues:
|
|
|
26
38
|
esmate fmt --fix
|
|
27
39
|
```
|
|
28
40
|
|
|
29
|
-
###
|
|
41
|
+
### Lint Code
|
|
42
|
+
|
|
43
|
+
Define your ESLint configuration in a `eslintrc.config.js` file:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import { defineConfig } from "esmate/eslint";
|
|
47
|
+
|
|
48
|
+
export default defineConfig({
|
|
49
|
+
type: "app",
|
|
50
|
+
react: true,
|
|
51
|
+
ignores: [],
|
|
52
|
+
});
|
|
53
|
+
```
|
|
30
54
|
|
|
31
55
|
Run ESLint to check for code issues:
|
|
32
56
|
|
|
@@ -40,11 +64,11 @@ Automatically fix linting issues:
|
|
|
40
64
|
esmate lint --fix
|
|
41
65
|
```
|
|
42
66
|
|
|
43
|
-
|
|
67
|
+
### Task Runner
|
|
44
68
|
|
|
45
69
|
Tasks are defined in your `package.json` under a `tasks` field.
|
|
46
70
|
|
|
47
|
-
|
|
71
|
+
#### โถ๏ธ Sequential Execution
|
|
48
72
|
|
|
49
73
|
Run tasks in order, one after another.
|
|
50
74
|
|
|
@@ -68,7 +92,7 @@ Run tasks in order, one after another.
|
|
|
68
92
|
}
|
|
69
93
|
```
|
|
70
94
|
|
|
71
|
-
|
|
95
|
+
#### ๐ Parallel Execution
|
|
72
96
|
|
|
73
97
|
Run multiple tasks at the same time.
|
|
74
98
|
|