FastKit is a development toolkit that supports both npm and pnpm for installation, development, and publishing workflows.
📦 Available on npm:
@nexgenstudiodev/fastkit
npm install @nexgenstudiodev/fastkitpnpm add @nexgenstudiodev/fastkityarn add @nexgenstudiodev/fastkitThe following scripts are available via npm run <script> or pnpm run <script>:
The following scripts are available via npm run <script> or pnpm run <script>:
| Script | Description |
|---|---|
| build | Compile TypeScript using tsc and fix paths using tsc-alias |
| clean | Delete the dist directory using rimraf |
| rebuild | Clean and then build the project |
| lint | Run ESLint on all .ts and .tsx files in src/ |
| lint:fix | Automatically fix lint issues |
| format | Format source files using Prettier |
| test | Run all tests using Jest |
| test:watch | Watch and re-run tests on file changes |
| test:coverage | Generate code coverage report |
| start:dev | Start dev server using ts-node-dev |
| prepublishOnly | Hook to format, lint, and build before publishing |
| publish:npm | Publish package to npm using npm CLI |
| publish:pnpm | Publish package to npm using pnpm (skip git checks) |
| version:patch | Bump patch version |
| version:minor | Bump minor version |
| version:major | Bump major version |
| add | (Your custom script — specify its function if needed) |
- Make your changes
- Run tests:
npm test- Build the project:
npm run build- Bump version (choose one):
npm run version:patch
npm run version:minor
npm run version:major- Publish package:
When you publish a package to npm, each version must have a version number higher than all previously published versions. This helps npm identify the newest version.
If you try to publish a version that is lower or the same as a previously published version using the default latest tag, npm will throw an error.
To avoid this error, you can publish your package using a different tag instead of latest. Tags let you label versions differently, such as beta, next, or dev.
If you're working on a new feature or a major update and want users to test it without affecting the stable release, you can publish it under a beta tag.
-
Update the Version
Increment your package’s version number to indicate it’s a beta release.
For example, if your current version is1.0.0, you might update it to1.1.0-beta.0. -
Publish with a Custom Tag
Run the following command to publish your package under thebetatag:npm publish --tag beta
Or if you use an npm script like publish:npm:
npm run publish:npm -- --tag beta
This way, your beta version is available for testing, but users installing your package normally will still get the stable latest version.
- Make your changes
- Run tests:
pnpm test- Build the project:
pnpm run build- Bump version (choose one):
npm version patch && pnpm run build
npm version minor && pnpm run build
npm version major && pnpm run build
- Publish:
pnpm run publish:pnpm| File | Description |
|---|---|
package.json |
Project configuration (shared) |
.pnpmrc |
pnpm-specific configuration |
.npmignore |
Files to exclude from npm package |
pnpm-lock.yaml |
pnpm lockfile (auto-generated) |
package-lock.json |
npm lockfile (auto-generated) |
| Topic | Command / Info | Description |
|---|---|---|
| View all tags | npm dist-tag ls @nexgenstudiodev/fastkit |
List all tags and their versions |
| Set latest tag version | npm dist-tag add @nexgenstudiodev/fastkit@1.1.3 latest |
Point latest tag to version 1.1.3 |
| Tag a version as beta | npm dist-tag add @nexgenstudiodev/fastkit@2.0.0 beta |
Mark version 2.0.0 as beta |
| Install latest version | npm install @nexgenstudiodev/fastkit |
Install version tagged latest |
| Install specific version | npm install @nexgenstudiodev/fastkit@1.1.3 |
Install exact version 1.1.3 |
| Install tagged version | npm install @nexgenstudiodev/fastkit@beta |
Install version tagged beta |
| Publish with tag | npm publish --tag latest or npm publish --tag beta |
Publish package with specified tag |
| Clear npm cache | npm cache clean --force |
Fix cache issues when updates don’t appear |
- Use a single package manager throughout your project
- Commit lockfiles to ensure consistent builds
- Use the correct CLI scripts based on your package manager
- Use npm for version management
- Use either npm or pnpm to publish — do not mix both
| Feature | npm | pnpm |
|---|---|---|
| Speed | Moderate | Fast |
| Disk Usage | High | Low |
| Node Modules | Full copy | Symlinked |
| Lockfile | package-lock.json | pnpm-lock.yaml |
| Workspace Support | ✅ | ✅ |
| Compatibility | Universal | Growing |
-
Mixed lockfiles
Delete bothpnpm-lock.yamlandpackage-lock.json, then reinstall dependencies. -
Permission errors
Usenpm loginor configure your npm registry properly. -
Version conflicts
Bump the version before attempting to publish. -
Build errors
Try the following:- Check for syntax errors or missing dependencies
- Delete
node_modulesand reinstall packages - Ensure your TypeScript configuration is correct
- Run
npm run cleanbefore building again
npm run clean
npm run build# Check versions
node --version
npm --version
pnpm --version
# Configure registries
npm config set registry https://registry.npmjs.org/
pnpm config set registry https://registry.npmjs.org/
Git Credential Manager securely stores your GitHub and npm tokens, so you don’t have to enter them repeatedly.
-
Windows:
It comes bundled with Git for Windows. -
macOS / Linux:
Install Git Credential Manager via your package manager or from the official releases:- For macOS (using Homebrew):
brew install --cask git-credential-manager-core
- For Linux, follow instructions here:
https://aka.ms/gcm/linux
- For macOS (using Homebrew):
Once installed, you can enable Git Credential Manager by running:
git-credential-manager-core configureregistry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
save-prefix=^
- Set your NPM_TOKEN as an environment variable in your shell or CI environment:
export NPM_TOKEN=your_actual_token_hereAfter installation, import FastKit modules in your code:
import { fastKitConfig } from '@nexgenstudiodev/fastkit/config';Or simply require if using CommonJS:
const { fastKitConfig } = require('@nexgenstudiodev/fastkit/config');We welcome contributions! Feel free to submit pull requests or open issues on the GitHub repository.
For support or questions, please open an issue or reach out to the maintainers directly.
Happy coding with FastKit! 🚀