From dcac9556433cd71ff4af93671c5660e10310ec48 Mon Sep 17 00:00:00 2001 From: AntonyDevs Date: Thu, 20 Feb 2025 11:37:41 -0500 Subject: [PATCH] docs(playground): improve Node.js ESM example README formatting - Added line breaks in README.md for better readability - Removed trailing whitespace in package.json - Enhanced code block and section formatting in README --- playground/nodejs-esm/README.md | 7 ++++++- playground/nodejs-esm/package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/playground/nodejs-esm/README.md b/playground/nodejs-esm/README.md index 2d126abc..886f2284 100644 --- a/playground/nodejs-esm/README.md +++ b/playground/nodejs-esm/README.md @@ -27,11 +27,13 @@ nodejs-esm/ ## Getting Started 1. Install dependencies: + ```bash npm install ``` 2. Configure your environment: + - Copy `.env.example` to `.env` (if not already done) - Add your OpenAI API key to `.env`: ``` @@ -39,6 +41,7 @@ nodejs-esm/ ``` 3. Run the examples: + ```bash # Run ESM version npm start @@ -50,11 +53,13 @@ nodejs-esm/ ## Code Examples ### ESM Version (index.js) + ```javascript import { Agent, Task, Team } from 'kaibanjs'; ``` ### CommonJS Version (index.cjs) + ```javascript const { Agent, Task, Team } = require('kaibanjs'); ``` @@ -63,4 +68,4 @@ const { Agent, Task, Team } = require('kaibanjs'); - This example demonstrates that KaibanJS works in Node.js environments without requiring React as a dependency - The example uses zustand's core functionality without React-specific features -- Both ESM and CommonJS versions implement the same functionality to showcase module system compatibility \ No newline at end of file +- Both ESM and CommonJS versions implement the same functionality to showcase module system compatibility diff --git a/playground/nodejs-esm/package.json b/playground/nodejs-esm/package.json index 5ba68d53..9ff465fb 100644 --- a/playground/nodejs-esm/package.json +++ b/playground/nodejs-esm/package.json @@ -14,4 +14,4 @@ "kaibanjs": "^0.14.0", "dotenv": "^16.4.5" } -} \ No newline at end of file +}