1.0.19 • Published 1 year ago

generate-code-context v1.0.19

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Generate Code Context of your Project

This npm package reads all files in a directory (excluding specified ones) and writes their contents to a .txt file.

Installation

npm i generate-code-context

Usuage

Create a file named generate.js in your project directory.

Add the following code to generate.js:

const { run } = require('generate-code-context');
const path = require('path');
const startDir = __dirname; // Root directory
const excludeDirs = ['node_modules', 'dist', 'build'];
const excludeFiles = ['package.json', 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml'];
const outputFilePath = path.join(__dirname, 'code_context.txt'); // Save in root directory
run(startDir, excludeDirs, excludeFiles, outputFilePath);

Get Gemini API Key from https://aistudio.google.com and paste it in .env file

API_KEY=your_google_api_key_here

RUN

node generate.js
1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago