Setting up Epycbyte's Private Registry
Local Environment Setup
Configuring npm
npm config set //epycbyte-private-registry.epycbyte.sh/:_authToken $EPYCBYTE_TOKEN
Configuring yarn
yarn config set --global //epycbyte-private-registry.epycbyte.sh/:_authToken $EPYCBYTE_TOKEN
Configuring pnpm
pnpm config set --global //epycbyte-private-registry.epycbyte.sh/:_authToken $EPYCBYTE_TOKEN
Preinstall Script
// preinstall.mjs
try {
throw new Error(`Please log in to the Epycbyte private registry to install \`@epycbyte-private\`-scoped packages:\n\`npm login --scope=@epycbyte-private\``);
} catch (error) {
throw error;
}
Package.json Script
{
"scripts": {
"pnpm:devPreinstall": "node preinstall.mjs"
}
}
Epycbyte Configuration
Environment Variables
export EPYCBYTE_TOKEN=your_token_here
export NPM_RC=@epycbyte-private:registry=https://epycbyte-private-registry.epycbyte.sh/:_authToken=${EPYCBYTE_TOKEN}
CI Setup with GitHub Actions
.github/workflows/conformance.yml
name: Conformance on on: pull_request: branches: [ main ]
jobs: conformance: name: 'Run Conformance' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v4 with: node-version-file: '.node-version' - uses: pnpm/action-setup@v3 - run: npm config set //epycbyte-private-registry.epycbyte.sh/:_authToken $EPYCBYTE_TOKEN env: EPYCBYTE_TOKEN: ${secrets.epycbyte_TOKEN} - run: pnpm install - run: pnpm conformance env: EPYCBYTE_TOKEN: ${secrets.epycbyte_TOKEN}
## Notes
- Ensure to create a new token for CI configurations.
- Add secrets in GitHub Actions for secure handling.