1.1.0 • Published 10 months ago

import-content-collector v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Import Content Collector

A CLI tool that collects and combines the content of a TypeScript/JavaScript file along with all its local imports into a single output file. Perfect for sharing code snippets or creating self-contained examples.

Features

  • Collects content from the main file and all its local imports
  • Supports TypeScript and JavaScript files
  • Handles both ES6 imports and CommonJS requires
  • Supports JSX and TypeScript decorators
  • Prevents duplicate processing of files
  • Generates a well-formatted output with file headers

Installation

npm install -g import-content-collector

Usage

Command Line

import-collect <source-file> [-o output-file]

Options:

  • <source-file>: Path to the source file (required)
  • -o, --output: Output file name (default: "collected-content.txt")

Example:

import-collect src/index.ts -o combined.txt
1.1.0

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago