Skip to content

Commit 784d028

Browse files
committed
format and bump
1 parent 4219db0 commit 784d028

File tree

5 files changed

+2539
-911
lines changed

5 files changed

+2539
-911
lines changed

.github/workflows/ci.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Continuous Integration and Deployment
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- 'v*'
77

88
permissions:
99
contents: write
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Node.js and cache PNPM dependencies
3030
uses: actions/setup-node@v3
3131
with:
32-
node-version: "20.8"
32+
node-version: '20.8'
3333
cache: pnpm
3434

3535
- name: Install Dependencies
@@ -61,9 +61,9 @@ jobs:
6161
- name: Setup Node.js and cache PNPM dependencies
6262
uses: actions/setup-node@v3
6363
with:
64-
node-version: "20.8"
65-
registry-url: "https://registry.npmjs.org"
66-
scope: "@programmer_network"
64+
node-version: '20.8'
65+
registry-url: 'https://registry.npmjs.org'
66+
scope: '@programmer_network'
6767
cache: pnpm
6868

6969
- name: Install Dependencies
@@ -87,9 +87,9 @@ jobs:
8787
git config --global user.email "[email protected]"
8888
8989
- name: Create Release Draft
90-
uses: "marvinpinto/action-automatic-releases@latest"
90+
uses: 'marvinpinto/action-automatic-releases@latest'
9191
with:
92-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
92+
repo_token: '${{ secrets.GITHUB_TOKEN }}'
9393
prerelease: false
9494

9595
- name: Publish to NPM

README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ You can customize `useAJVForm` using the following options:
221221
222222
To see `useAJVForm` in action, visit our [Yail Storybook](https://yail.programmer.network/?path=/docs/input-forms--docs). Click on `Show code` to explore practical usage examples of the hook.
223223
224-
225224
Sure! Your explanation and example are already clear, but it could be slightly improved for clarity, readability, and providing additional flexibility. Here's an improved version that is concise, polished, and includes a few additional tips.
226225
227226
---
@@ -235,21 +234,21 @@ To continuously improve or extend this library during development, the most effi
235234
Update your Vite configuration to conditionally alias the library path when using your local version:
236235
237236
```ts
238-
import path from "path";
239-
import { defineConfig } from "vite";
237+
import path from 'path';
238+
import { defineConfig } from 'vite';
240239

241240
export default defineConfig(() => {
242241
// Check if the USE_LOCAL_AJV environment variable is true
243-
const useLocalAjv = process.env.USE_LOCAL_AJV === "true";
242+
const useLocalAjv = process.env.USE_LOCAL_AJV === 'true';
244243

245244
return {
246245
resolve: {
247246
alias: {
248247
// Use a local alias only when USE_LOCAL_AJV is enabled
249248
...(useLocalAjv && {
250-
"@programmer_network/use-ajv-form": path.resolve(
249+
'@programmer_network/use-ajv-form': path.resolve(
251250
__dirname,
252-
"../use-ajv-form/src"
251+
'../use-ajv-form/src',
253252
),
254253
}),
255254
},
@@ -260,6 +259,7 @@ export default defineConfig(() => {
260259
```
261260
262261
This configuration will:
262+
263263
- Use the **published library** (from npm) by default.
264264
- Use the **local library's source code** (`../use-ajv-form/src`) only when `USE_LOCAL_AJV` is set to `true`.
265265
@@ -284,13 +284,15 @@ Add a new script to your `package.json` to launch the dev server while referenci
284284
#### Step 3: Development Workflow
285285
286286
- **Directory Setup**: Ensure your library (`../use-ajv-form/`) exists in the same flat-level directory as your main project.
287+
287288
```
288289
projects/
289290
├── main-project/
290291
└── use-ajv-form/ <-- The library
291292
```
292293
293294
- **To Use the Local Library**: Start your dev server with:
295+
294296
```bash
295297
npm run dev:with-local-ajv
296298
```
@@ -303,6 +305,7 @@ Add a new script to your `package.json` to launch the dev server while referenci
303305
---
304306
305307
#### Bonus: Cross-Platform Compatibility (Windows-Friendly)
308+
306309
To ensure the `USE_LOCAL_AJV=true` works across all platforms (including Windows, where `export` syntax doesn’t work), install `cross-env`:
307310
308311
```bash
@@ -332,6 +335,6 @@ To deploy a new version and publish it to npm, follow these steps:
332335
3. Push the new tag to the remote Git repository.
333336
334337
```bash
335-
git tag vX.X.X
338+
git tag vX.X.X
336339
git push origin vX.X.X
337-
```
340+
```

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@programmer_network/use-ajv-form",
3-
"version": "1.0.31",
3+
"version": "1.0.33",
44
"description": "Custom React Hook that integrates with Ajv JSON Schema Validator",
55
"main": "dist/use-ajv-form.es.js",
66
"author": "Aleksandar Grbic",

0 commit comments

Comments
 (0)