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 makageVerified import paths — ran on the pinned version, not inferred.
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.
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.
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.
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.
Install Makage globally using `npm install -g makage` or run it locally via `npx makage` or `yarn makage` if installed as a dev dependency.
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.
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.No dependency data recorded yet.