Registry / devops / makage

makage

JSON →
library0.3.0jsnpmunverified

Makage is a lightweight, cross-platform build helper specifically designed for managing common tasks within monorepo environments. Currently at version 0.3.0, it provides essential utilities for file operations such as copying files, cleaning directories, and general asset management. Its primary focus is on simplifying build processes across different operating systems, offering a more streamlined alternative to platform-specific scripts or heavier build tools. Given its pre-1.0 version, the release cadence is likely irregular, with features and API potentially evolving rapidly. Key differentiators include its 'tiny' footprint and explicit support for monorepo structures, aiming to minimize configuration overhead for common build-related file manipulations. It ships with TypeScript types, facilitating its integration into modern TypeScript-based projects.

npm install makage
INSTALL
IMPORT
SIG · MAKAGE
M
makage
devopsjavascriptv0.3.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

copy
import { copy } from 'makage';
const { copy } = require('makage');
Makage primarily targets modern Node.js environments and ships with ESM support. While CJS might work via transpilation, direct ESM imports are recommended for consistency and type safety.
clean
import { clean } from 'makage';
import clean from 'makage/clean';
Individual utility functions like 'clean' are exposed as named exports. Avoid importing from subpaths unless explicitly documented, as internal paths are subject to change.
runCLI
import { runCLI } from 'makage/cli';
import { MakageCLI } from 'makage';
For advanced programmatic control of the CLI, the 'runCLI' function can be imported, typically from a dedicated 'cli' subpath. This is less common for typical usage where the CLI is executed directly.

This quickstart demonstrates programmatic usage of Makage to clean a 'dist' directory and copy 'assets' from 'src' to 'dist', simulating a basic build pipeline. It highlights how to import and use the `clean` and `copy` utilities.

import { copy, clean } from 'makage'; import * as path from 'path'; const projectRoot = process.cwd(); const distDir = path.join(projectRoot, 'dist'); const assetsSrc = path.join(projectRoot, 'src', 'assets'); const assetsDest = path.join(distDir, 'assets'); async function buildPackage() { console.log('Starting build...'); try { // Clean the distribution directory console.log(`Cleaning ${distDir}...`); await clean(distDir); console.log('Clean complete.'); // Copy assets console.log(`Copying assets from ${assetsSrc} to ${assetsDest}...`); await copy(assetsSrc, assetsDest, { overwrite: true, recursive: true }); console.log('Asset copy complete.'); // Simulate other build steps (e.g., transpilation) console.log('Running other build steps (e.g., TypeScript compilation)...'); await new Promise(resolve => setTimeout(resolve, 500)); // Placeholder for actual build logic console.log('Build successful!'); } catch (error) { console.error('Build failed:', error); process.exit(1); } } buildPackage();
makage --version
Debug
Known issues
breakingAs a pre-1.0 package (v0.3.0), Makage does not strictly adhere to semantic versioning. Minor or patch releases may introduce breaking API changes without prior deprecation warnings.
fix
Always review the release notes and changelog when upgrading Makage within the 0.x series. Pin exact versions in `package.json` to prevent unexpected breaking changes.
affects: <1.0.0
gotchaCross-platform file path nuances (e.g., backslashes vs. forward slashes) can cause issues. While Makage aims for cross-platform compatibility, always test build scripts on all target operating systems.
fix
Use Node.js's `path` module (`path.join`, `path.resolve`) for constructing file paths to ensure correct formatting across different OS environments. Avoid hardcoding path separators.
affects: >=0.1.0
gotchaFile operation permissions can lead to `EACCES` or `EPERM` errors, especially when writing to protected directories or attempting to clean files opened by another process.
fix
Ensure the build process runs with appropriate user permissions. On Windows, temporary locking of files can often be resolved by retrying the operation or ensuring no other processes are accessing the target files. Use `fs-extra` or similar for more robust file ops if Makage's internal handling proves insufficient for edge cases.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Command 'makage' not found
The `makage` CLI tool is not installed globally or is not in the system's PATH.
fix
Install Makage globally using `npm install -g makage` or run it locally via `npx makage` or `yarn makage` if installed as a dev dependency.
Error: ENOENT: no such file or directory, stat '/path/to/nonexistent/source'
A `copy` or `clean` operation was attempted on a source file/directory that does not exist.
fix
Verify that the source paths provided to Makage's functions or CLI commands are correct and that the files/directories exist before the operation is executed. Add path validation if necessary.
TypeError: Cannot read properties of undefined (reading 'copy')
Attempting to `require()` Makage functions in a CommonJS module when the package's main entry point is ESM-first, or using incorrect named imports.
fix
For CommonJS, ensure `type: 'module'` is not set in `package.json` or switch to dynamic `import()` if the package is truly ESM-only. For ESM, use `import { copy } from 'makage';`. Always confirm the package's module type and export patterns.
Upgrade
Version history
0.3.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
makage — npm install makage · libregistry