A collection of shared CI scripts and development environment used by @pezkuwi projects
npm install @pezkuwi/devA collection of shared CI scripts and development environment (configuration, dependencies) used by @pezkuwi projects.
Summary:
This script automates the continuous integration (CI) process for building, testing, versioning, and publishing packages in the repository. It handles tasks like cleaning the workspace, running tests, updating versions, publishing to npm, GitHub repositories, and Deno, and generating changelogs.
- --skip-beta:
Prevents incrementing the version to a beta release.
``bash`
yarn pezkuwi-ci-ghact-build [options]
Summary:
This script generates documentation for the repository and deploys it to GitHub Pages. It ensures the documentation is built and published with the correct configuration.
This script does not accept any CLI arguments.
`bash`
yarn pezkuwi-ci-ghact-docs
Summary:
This script force-refreshes the gh-pages branch of the repository by creating a new orphan branch, resetting its contents, and pushing it to GitHub. It ensures a clean state for GitHub Pages deployment.
This script does not accept any CLI arguments.
`bash`
yarn pezkuwi-ci-ghpages-force
Summary:
This script prepares the documentation for building by copying the docs directory to a build-docs directory. If the build-docs directory already exists, it is cleared before copying.
This script does not accept any CLI arguments.
`bash`
yarn pezkuwi-dev-build-docs
Summary:
This script compiles TypeScript source files into JavaScript outputs using the specified compiler (tsc), prepares the build artifacts, rewrites imports for compatibility (e.g., for Deno), lints dependencies, and updates package metadata for distribution. It supports CommonJS, ESM, and Deno outputs, along with configuration validation and export mapping.
- --compiler
- Acceptable values: tsc tsc
- Default:
`bash`
yarn pezkuwi-dev-build-ts [options]
Summary:
This script checks the project for circular dependencies in TypeScript (.ts, .tsx) files using the madge library. It reports any detected circular dependencies and exits with an error if any are found.
This script does not accept any CLI arguments.
`bash`
yarn pezkuwi-dev-circular
Summary:
This script removes build artifacts and temporary files from the repository. It targets directories like build and files such as tsconfig.*.tsbuildinfo, ensuring a clean workspace for fresh builds.
This script does not accept any CLI arguments.
`bash`
yarn pezkuwi-dev-clean-build
Summary:
This script generates a CONTRIBUTORS file by aggregating and listing all contributors to the repository based on the Git commit history. It excludes bot accounts and service-related commits (e.g., GitHub Actions, Travis CI). The output includes the number of contributions, contributor names, and their most recent commit hash.
This script does not accept any CLI arguments.
`bash`
yarn pezkuwi-dev-contrib
Summary:
This script copies directories from specified source paths to a destination path. It supports options to change the working directory and to flatten the directory structure during copying.
- --cd
Specifies a working directory to prepend to the source and destination paths.
- --flatten:
Copies all files directly to the destination without preserving the source directory structure.
`bash`
yarn pezkuwi-dev-copy-dir [options]
- : One or more source directories to copy.
- : Destination directory for the copied files.
Summary:
This script copies the build output and node_modules of all packages in the repository to a specified destination directory. It ensures the destination node_modules folder exists and is up-to-date.
-
Specifies the target directory where the node_modules folder resides.
`bash`
yarn pezkuwi-dev-copy-to
Summary:
This script generates a mod.ts file and an import_map.json file for Deno compatibility. It exports all packages with a mod.ts file in their src directory and maps their paths for use in Deno.
- mod.ts:
An auto-generated TypeScript module exporting all packages for Deno. If the file does not exist, it is created.
- import_map.json:
A JSON file mapping package paths to their corresponding Deno-compatible build paths. If an import_map.in.json file exists, its mappings are merged into the output.
This script does not accept any CLI arguments.
Summary:
This script runs linting and TypeScript checks on the repository. It uses eslint for code linting and tsc for TypeScript type checking. Specific checks can be skipped using CLI arguments.
- --skip-eslint:
Skips running eslint during the linting process.
- --skip-tsc:
Skips running the TypeScript (tsc) type checker.
`bash`
yarn pezkuwi-dev-run-lint [options]
Summary:
This script executes a Node.js script with TypeScript support, using the @pezkuwi/dev-ts/cached loader by default. It dynamically handles global and local loaders and allows for additional Node.js flags to be passed.
-