diff --git a/.github/workflows/FUNDING.yml b/.github/workflows/FUNDING.yml new file mode 100644 index 0000000..538b84d --- /dev/null +++ b/.github/workflows/FUNDING.yml @@ -0,0 +1,5 @@ +# FUNDING.yml + +github: abhishek-nexgen-dev +buymeacoffee: abhishek96z +open_collective: NexGenStudioDev \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ce63c56..840b435 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,11 +5,10 @@ on: branches: - master tags: - - 'v*' # Optional: run on version tags like v1.0.0 + - 'v*' # optional: publish on version tags like v1.0.0 jobs: publish: - name: Publish to npm runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') @@ -17,11 +16,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Use Node.js 18 + - name: Setup Node.js 18 uses: actions/setup-node@v4 with: node-version: 18 - registry-url: 'https://registry.npmjs.org/' + registry-url: https://registry.npmjs.org/ - name: Setup pnpm uses: pnpm/action-setup@v2 @@ -37,16 +36,10 @@ jobs: # - name: Run tests (optional) # run: pnpm test - - name: Authenticate with npm + - name: Authenticate to npm run: npm config set //registry.npmjs.org/:_authToken=${NPM_TOKEN} env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - # Optional: Authenticate with GitHub Packages - # - name: Authenticate with GitHub Packages - # run: npm config set //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Publish to npm - run: pnpm publish --access public + run: pnpm publish --access public --no-git-checks diff --git a/.npmignore b/.npmignore index b2b59e4..51ca7a0 100644 --- a/.npmignore +++ b/.npmignore @@ -10,9 +10,7 @@ tsconfig*.json jest.config.* *.test.* *.spec.* -__tests__/ -test/ -tests/ + # Documentation (except README) docs/ @@ -22,7 +20,6 @@ CHANGELOG.md # Git files .git/ .gitignore -.env Environment/ # CI/CD diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..d36ee91 --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +registry=https://registry.npmjs.org/ +//registry.npmjs.org/:_authToken=${NPM_TOKEN} +save-prefix=^ \ No newline at end of file diff --git a/.pnpmfile.mjs b/.pnpmfile.mjs new file mode 100644 index 0000000..95d66e8 --- /dev/null +++ b/.pnpmfile.mjs @@ -0,0 +1,18 @@ +// pnpmfile.mjs +export const hooks = { + updateConfig(config) { + return { + ...config, + shamefullyHoist: false, + strictPeerDependencies: false, + autoInstallPeers: true, + saveExact: false, + savePrefix: '^', + nodeLinker: 'isolated', + preferWorkspacePackages: true, + sharedWorkspaceLockfile: true, + publishBranch: 'master', + gitChecks: true, + } + }, +} diff --git a/.pnpmrc b/.pnpmrc deleted file mode 100644 index 007697d..0000000 --- a/.pnpmrc +++ /dev/null @@ -1,24 +0,0 @@ -# Avoid legacy-style hoisting unless absolutely needed -shamefully-hoist=false - -# Loosen peer dependency requirements during dev -strict-peer-dependencies=false - -# Automatically install required peer dependencies -auto-install-peers=true - -# Save versions with ^ to allow non-breaking updates -save-exact=false -save-prefix=^ - -# Use isolated node_modules for better reproducibility -node-linker=isolated - -# Use local workspace packages first (important for monorepos) -prefer-workspace-packages=true - -# Ensures one lockfile for all workspace packages -shared-workspace-lockfile=true - -# Only publish from main (also declared in .npmrc) -publish-branch=main diff --git a/PACKAGE_MANAGERS.md b/PACKAGE_MANAGERS.md index 04a455d..f3aba5c 100644 --- a/PACKAGE_MANAGERS.md +++ b/PACKAGE_MANAGERS.md @@ -1,166 +1,150 @@ # FastKit - Package Manager Usage Guide -This document explains how to use FastKit with both npm and pnpm package managers. +**FastKit** is a development toolkit that supports both `npm` and `pnpm` for installation, development, and publishing workflows. -## Installation +📦 Available on npm: +[@nexgenstudiodev/fastkit](https://www.npmjs.com/package/@nexgenstudiodev/fastkit) + +--- + +## 📥 Installation ### Using npm ```bash -npm install @abhishek-nexgen-dev/fastkit +npm install @nexgenstudiodev/fastkit ``` -### Using pnpm -```bash -pnpm add @abhishek-nexgen-dev/fastkit -``` -### Using yarn +### Using npm + ```bash -yarn add @abhishek-nexgen-dev/fastkit +pnpm add @nexgenstudiodev/fastkit ``` -## Development Scripts +### Using yarn -### For npm users ```bash -# Install dependencies -npm install - -# Build the project -npm run build - -# Clean build artifacts -npm run clean - -# Rebuild (clean + build) -npm run rebuild - -# Start development server -npm run start:dev +yarn add @nexgenstudiodev/fastkit +``` -# Format code -npm run format -# Lint code -npm run lint +# 🔧 Development Scripts -# Fix linting issues -npm run lint:fix +The following scripts are available via `npm run