{"id":50875581,"url":"https://github.com/nazahex/packlet-js","last_synced_at":"2026-06-15T09:31:40.090Z","repository":{"id":323283844,"uuid":"1090883419","full_name":"nazahex/packlet-js","owner":"nazahex","description":"A KazVizian toolkit to prepare deterministic release artifacts and packaging.","archived":false,"fork":false,"pushed_at":"2025-11-24T11:29:39.000Z","size":170,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T10:37:34.791Z","etag":null,"topics":["artifacts","gpr","npm","packaging","registry"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nazahex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-06T09:10:44.000Z","updated_at":"2025-11-24T11:21:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nazahex/packlet-js","commit_stats":null,"previous_names":["kazvizian/packlet-js","nazahex/packlet-js"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/nazahex/packlet-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazahex%2Fpacklet-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazahex%2Fpacklet-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazahex%2Fpacklet-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazahex%2Fpacklet-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nazahex","download_url":"https://codeload.github.com/nazahex/packlet-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazahex%2Fpacklet-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34357281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artifacts","gpr","npm","packaging","registry"],"created_at":"2026-06-15T09:31:39.242Z","updated_at":"2026-06-15T09:31:40.059Z","avatar_url":"https://github.com/nazahex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 📦️ Packlet\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-%23007ACC.svg?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Bun](https://img.shields.io/badge/Bun-%23000000.svg?logo=bun\u0026logoColor=white)](https://bun.sh)\u003cbr /\u003e\n![license](https://img.shields.io/github/license/nazahex/packlet-js)\n\n\u003c/div\u003e\n\nPacklet is a small toolkit for building JavaScript/TypeScript packages and producing deterministic release artifacts.\n\nIt gives you:\n\n- A single CLI (`packlet`) for common tasks like building your package, validating your `dist/` folder, and preparing GitHub Packages (GPR) artifacts.\n- A set of focused libraries you can use directly if you only need one piece (build wrapper, GPR helper, core utilities).\n\nThis repository contains the source code for the Packlet ecosystem. You can install and use each package independently from npm.\n\n## Getting started\n\nMost users only need the main `packlet` package, which provides the CLI and a small programmatic API.\n\n### Install\n\n```sh\n# with bun\nbun add -D packlet\n\n# with npm\nnpm install -D packlet\n```\n\nYou can also install it globally if you prefer:\n\n```sh\nbun add -g packlet\n# or\nnpm install -g packlet\n```\n\n### Basic CLI usage\n\nOnce installed, the `packlet` command is available in your project scripts or globally:\n\n```sh\n# build your package (ESM by default; add CJS with --cjs)\npacklet build\n\n# prepare a GitHub Packages (GPR) variant and emit a JSON manifest\npacklet gpr --root . --json\n\n# list generated tarball artifacts\npacklet list-artifacts --artifacts .artifacts\n\n# validate dist contents\npacklet validate --root . --json\n```\n\nYou can configure default directories and options via `package.json` (see **Configuration** below) so that your CLI usage stays minimal.\n\n## Packages in the ecosystem\n\nPacklet is published as several npm packages. You can use the main `packlet` package, or pick the lower-level building blocks if you prefer.\n\n### `packlet`\n\nMain public package. Provides the `packlet` CLI and re-exports a small programmatic API for working with artifacts, validation, and GPR preparation.\n\nSee the package README for full CLI and API details.\n\n### `@packlet/build`\n\nLightweight build wrapper around Bun for TypeScript/JavaScript libraries and CLIs.\n\nUse it when you want a simple way to:\n\n- Bundle ESM (and optionally CJS) outputs.\n- Emit `.d.ts` type declarations.\n- Control sourcemaps and minification.\n\nYou can call it via npm scripts or its programmatic API. See the `@packlet/build` README for usage examples and CLI flags.\n\n### `@packlet/core`\n\nHeadless utilities that power Packlet’s configuration and artifact handling. Useful if you want to integrate Packlet’s behavior into your own tooling.\n\nIncludes helpers for:\n\n- Artifact manifests (`artifacts.json`).\n- Dist validation.\n- Name derivation and repo name extraction.\n- Central configuration loading and environment variable handling.\n\n### `@packlet/gpr`\n\nHelper for preparing packages for GitHub Packages (GPR).\n\nUse it when you want to:\n\n- Stage a scoped package (e.g. `@your-scope/your-package`) in a separate directory.\n- Generate `.tgz` tarballs in a predictable artifacts directory.\n- Produce a machine-readable `artifacts.json` manifest.\n\nYou can call it via the main `packlet gpr` command or consume the `@packlet/gpr` API directly.\n\n### `@packlet/cli`\n\nInternal CLI implementation underlying the `packlet` command. Most users will not need to install this directly; it exists so the CLI can be reused in different packaging setups.\n\n## Configuration overview\n\nPacklet commands can be configured via a `packlet` block in your `package.json`. Configuration is centralized in the `@packlet/core` library, which also reads environment variables.\n\nTypical configuration (simplified):\n\n```jsonc\n{\n  \"packlet\": {\n    \"distDir\": \"dist\",\n    \"artifactsDir\": \".artifacts\",\n    \"gprDir\": \".gpr\",\n    \"build\": {\n      \"entry\": \"src/index.ts\",\n      \"outdir\": \"dist\",\n      \"formats\": [\"esm\"],\n      \"sourcemap\": \"none\",\n      \"types\": true,\n      \"target\": \"node\",\n      \"execJs\": false,\n      \"minify\": true\n    },\n    \"gpr\": true,\n    \"scope\": \"your-scope\",\n    \"registry\": \"https://npm.pkg.github.com/\",\n    \"includeReadme\": true,\n    \"includeLicense\": true\n  }\n}\n```\n\nConfiguration is resolved with the following precedence:\n\n1. CLI flags.\n2. Environment variables.\n3. `package.json.packlet`.\n4. Built-in defaults.\n\nFor a full list of supported options and environment variables, see the `@packlet/core` README.\n\n## Artifacts manifest\n\nWhen you prepare a package for GitHub Packages using `packlet gpr`, Packlet can generate a small manifest describing the produced tarballs.\n\nBy default this is written to `\u003croot\u003e/.artifacts/artifacts.json` and looks like:\n\n```json\n{\n  \"schemaVersion\": 1,\n  \"packageName\": \"\u003cbase-name\u003e\",\n  \"scopedName\": \"@\u003cscope\u003e/\u003cbase-name\u003e\",\n  \"version\": \"\u003csemver\u003e\",\n  \"artifacts\": [\n    { \"file\": \"\u003cname\u003e-\u003cversion\u003e.tgz\", \"size\": 12345, \"sha512\": \"...\" }\n  ]\n}\n```\n\nThis is intended to be consumed by your CI or release tooling to decide what to upload or publish.\n\n## Contributing\n\nIf you are interested in contributing to Packlet, please see `.github/CONTRIBUTING.md` in this repository for guidelines, development workflows, and notes about testing and CI.\n\n## License\n\nMIT © KazViz\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazahex%2Fpacklet-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnazahex%2Fpacklet-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazahex%2Fpacklet-js/lists"}