Skip to content

Instantly share code, notes, and snippets.

@unicornware
Last active January 3, 2022 05:14
Show Gist options
  • Save unicornware/3d8ca3f215633d270019e373d920ae93 to your computer and use it in GitHub Desktop.
Save unicornware/3d8ca3f215633d270019e373d920ae93 to your computer and use it in GitHub Desktop.
Package Manager Configurations
# NPM Configuration
# See: https://docs.npmjs.com/cli/v6/using-npm/config#npmrc-files
# See: https://stackoverflow.com/questions/53099434/using-auth-tokens-in-npmrc
# Registry Configuration - npm
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
registry=https://registry.npmjs.org/
# Registry Configuration - gpr / @flex-development scope
//registry.yarnpkg.com/:_authToken=${GH_PAT}
@flex-development:registry=https://npm.pkg.github.com/
# Registry Configuration - yarn
//registry.yarnpkg.com/:_authToken=${NPM_TOKEN}
registry=https://registry.yarnpkg.com/
# Save exact dependency versions
save-exact=true
save-prefix=
# Yarn v1 Configuration
#
# References:
#
# - https://classic.yarnpkg.com/lang/en/docs/yarnrc
email [email protected]
init-license BSD-3-Clause
lastUpdateCheck 1633470946246
save-prefix ""
username unicornware
workspaces-experimental true
# REFERENCE: https://yarnpkg.com/configuration/yarnrc
defaultSemverRangePrefix: ''
enableInlineBuilds: true
nodeLinker: node-modules
npmPublishRegistry: https://npm.pkg.github.com
npmRegistries:
//npm.pkg.github.com:
npmAlwaysAuth: true
npmAuthToken: ${GH_PAT}
//registry.npmjs.org:
npmAlwaysAuth: true
npmAuthToken: ${NPM_TOKEN}
//registry.yarnpkg.org:
npmAlwaysAuth: true
npmAuthToken: ${NPM_TOKEN}
npmRegistryServer: https://registry.yarnpkg.com
npmScopes:
flex-development:
npmAlwaysAuth: true
npmAuthToken: ${GH_PAT}
npmRegistryServer: https://npm.pkg.github.com
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
yarnPath: .yarn/releases/yarn-3.2.0-rc.8.cjs
# REFERENCE: https://zsh.sourceforge.io/Intro/intro_3.html
# PATH
#
# 1. Add npm
# 2. Add yarn
# 3. Add ~/node_modules/.bin
# 4. Add $PWD/node_modules/.bin
export PATH="$NPM_PREFIX/bin:$PATH"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
export PATH="$PATH:./node_modules/.bin"
export PATH="$(pwd)/node_modules/.bin:$PATH"
# npm
export NPM_PREFIX="$HOME/.npm"
# nvm - https://github.com/nvm-sh/nvm
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
# yarn
export YARN_RC_FILENAME=.yarnrc.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment