sliftutils 1.8.11 → 1.8.13
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/CLAUDE.md +0 -1
- package/README.md +10 -10
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -24,7 +24,6 @@ from `.cursor/rules/*.mdc` so Claude reads them automatically.
|
|
|
24
24
|
- When a function has more than one primitive parameter that could be confused (e.g. start and end time), put them inside a single object parameter called `config`.
|
|
25
25
|
- Never use return codes — always throw. Include context (expected vs actual). If values could be huge (e.g. file parsing), limit to ~500 characters.
|
|
26
26
|
- Use double quotes, not single quotes.
|
|
27
|
-
- Never use the ternary operator. Convert `x ? y : z` into `x && y || z`.
|
|
28
27
|
- Never use the non-null assertion operator (`!`). Check the value; if needed in nested closures, copy into a `const` to preserve narrowed type.
|
|
29
28
|
- Errors use template strings that include the actual offending value and the expected one: `throw new Error(\`Expected X, was \${y}\`);`
|
|
30
29
|
- Don't use `switch`. Use `if/else`.
|
package/README.md
CHANGED
|
@@ -9,9 +9,9 @@ A build system and utility library for MobX + Preact projects.
|
|
|
9
9
|
The first thing you should do is call the setup function. They will give you a lot of boilerplate code which you can delete or keep (I recommend commiting first, so you can pick which boilerplate changes you want):
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
12
|
+
yarn slift-setup
|
|
13
13
|
# or
|
|
14
|
-
|
|
14
|
+
yarn sliftsetup
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
### 2. Build or Watch
|
|
@@ -20,18 +20,18 @@ After setup, you can either **build** your project or **watch** for changes:
|
|
|
20
20
|
|
|
21
21
|
#### Build Commands
|
|
22
22
|
```bash
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
yarn build-nodejs # Build Node.js application
|
|
24
|
+
yarn build-web # Build web application
|
|
25
|
+
yarn build-extension # Build browser extension
|
|
26
|
+
yarn build-electron # Build Electron application
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
#### Watch Commands
|
|
30
30
|
```bash
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
yarn slift-watch --port 9876 "nodejs/*.ts" "nodejs/*.tsx" "yarn build-nodejs"
|
|
32
|
+
yarn slift-watch --port 9877 "web/*.ts" "web/*.tsx" "yarn build-web"
|
|
33
|
+
yarn slift-watch --port 9878 "extension/*.ts" "extension/*.tsx" "yarn build-extension"
|
|
34
|
+
yarn slift-watch --port 9879 "electron/*.ts" "electron/*.tsx" "yarn build-electron"
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### 3. Run
|