0.1.14 • Published 9 months ago
@kontrapunkt/shared v0.1.14
@kontrapunkt/shared
A collection of shared configuration files, directories, and utilities for Kontrapunkt projects. Built with cross-platform JavaScript APIs for maximum compatibility.
Installation
npm
npm install @kontrapunkt/sharedBun
bun add @kontrapunkt/sharedUsage
Copying shared files and directories
You can copy shared configuration files and directories to your project in several ways:
Option 1: Using the CLI
# Copy all shared files and directories
npx @kontrapunkt/shared
# Copy specific files or directories
npx @kontrapunkt/shared .prettierrc componentsOption 2: Using the API in your scripts
// ES Modules
import { copySharedFiles } from "@kontrapunkt/shared";
// Copy all shared files and directories
await copySharedFiles();
// Copy specific files or directories
await copySharedFiles([".prettierrc", "components"]);
// Copy to a specific directory
await copySharedFiles([], "/path/to/your/project");
// Copy without interactive prompts
await copySharedFiles([], "/path/to/your/project", false);Available shared resources
The following configuration files and directories are available in this package:
Configuration files:
.prettierrc- Prettier configuration.eslintrc- ESLint configuration.cursorrules- Cursor editor configurationtsconfig.json- TypeScript configuration.nvmrc- Node version configurationbiome.json- Biome configuration
Directories:
- Any directories uploaded to the
sharedfolder will be copied with their entire structure
- Any directories uploaded to the
Development
# Install dependencies
npm install
# Build the package
npm run buildTechnical Details
This package is built using cross-platform JavaScript APIs:
- Uses Node.js fs module for file operations
- Uses Node.js path module for path manipulations
- Compatible with Node.js and Bun runtimes
Publishing
To publish a new version of the package:
# Run tests, build, and publish to npm
npm run publishLicense
MIT