Skip to content

Instantly share code, notes, and snippets.

@cds-amal
Last active February 19, 2022 21:39
Show Gist options
  • Save cds-amal/e502abb7ff5f8cd4ec11f566a7bd0186 to your computer and use it in GitHub Desktop.
Save cds-amal/e502abb7ff5f8cd4ec11f566a7bd0186 to your computer and use it in GitHub Desktop.

verdaccio

  1. install
    npm -g install verdaccio
  2. configure
    cat << EOF > config.yml
    listen:
      0.0.0.0:4873
    storage: ./storage
    auth:
      htpasswd:
        file: ./htpasswd
    packages:
      "@*/*":
        access: $all
        publish: $authenticated
      "**":
        proxy: npmjs
    logs:
      - { type: stdout, format: pretty, level: http }
    EOF
  3. run verdaccio server
    verdaccio -c config.yml
  4. log into the verdaccio with npm
    npm adduser --registry http://localhost:4873
    # enter a test username, password, and email to use

test publishing

Navigate to @truffle/preserve monorepo root and issue lerna publish command.

$(yarn bin)/lerna publish from-package --registry http://localhost:4873

Note. Verdaccio will store published files in the the directory where the process was started.

config.yml
htpasswd
storage
└── @truffle
    ├── preserve
    │   ├── package.json
    │   └── preserve-0.2.6.tgz
    ├── preserve-fs
    │   ├── package.json
    │   └── preserve-fs-0.2.6.tgz
    ├── preserve-to-buckets
    │   ├── package.json
    │   └── preserve-to-buckets-0.2.7.tgz
    ├── preserve-to-filecoin
    │   ├── package.json
    │   └── preserve-to-filecoin-0.2.7.tgz
    └── preserve-to-ipfs
        ├── package.json
        └── preserve-to-ipfs-0.2.7.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment