Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit d67c3ae

Browse files
author
Jacob Barnes
committed
Update details for setting up private npm registry
1 parent 6aaf945 commit d67c3ae

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

onboarding.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1. [Install git](tools/git.md)
66
1. [Install brew](tools/brew.md) (Mac OS X only)
77
1. [Install Node.js](tools/nodejs.md)
8-
1. [Install pnpm](tools/npm.md)
8+
1. [Install Yarn](tools/npm.md)
99
1. [Install Visual Studio Code](tools/code-editor.md#installation-and-configuration)
1010
1. :construction: TODO: System setup / authy
1111

tools/img/npm-registry-header.png

28.6 KB
Loading

tools/npm.md

+24-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
11
# npm
22

3-
:poop: npm is the default package manager for Node.js. It is not well designed so [pnpm](https://pnpm.js.org/) should typically be used instead:
4-
```
5-
npm install --global pnpm
3+
:poop: npm is the default package manager for Node.js. It is not as optimized as
4+
alternative package managers, we use [Yarn](https://yarnpkg.com/en/). There are
5+
many ways to install yarn on different systems, but the easiest is through npm:
6+
7+
```bash
8+
npm install -g yarn
69
```
710

8-
Once pnpm is installed you should use it in place of `npm` - any time you would use `npm`, type `pnpm` instead. The exception is for global modules - when you are installing something globally ([eslint](https://www.npmjs.com/package/eslint), [htmlhint](https://www.npmjs.com/package/htmlhint), [http-serve](https://www.npmjs.com/package/http-serve)) you should use `npm i -g <module>` to install or update it (this includes pnpm - use npm to update pnpm).
11+
You should use Yarn in any place you would use npm. You should node these differences:
12+
`npm install` is `yarn add`, and to install global packages you should use
13+
`yarn global add [package]`
914

10-
# MK npm registry
15+
## MK npm registry
1116

1217
We have a private npm registry used to host packages from our private repositories. To access
13-
this registry you'll need to configure npm to use and log in to it. It uses your
14-
GitHub username and password to authenticate you.
18+
this registry you'll need to configure npm to use and log in to it. It uses Github
19+
to authenticate you
1520

16-
Use the command below to log in to the registry. You'll use your GitHub username
17-
and password when prompted. If you use [two-factor authentication](https://help.github.com/articles/about-two-factor-authentication/) you'll
18-
need to specify your username like: `username.123456` where the numbers are a current
19-
2FA code.
21+
Go to https://registry.mkdecision.com and hit Login at the top right. Once you've
22+
authorized the Github app, you'll be redirected back to the main page where you'll
23+
see two commands in the header like below:
2024

25+
![import-gradle.png](img/npm-registry-header.png)
26+
27+
Enter those commands in a console followed by this last command:
28+
29+
```bash
30+
npm config set registry https://registry.mkdecision.com
2131
```
22-
npm login --scope=@mkdecision --registry=https://registry.mkdecision.com
23-
```
32+
33+
The first two commands will configure authentication with the registry so that
34+
you can access it. The last will set it as your default repository.

0 commit comments

Comments
 (0)