Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Commit 07b6039

Browse files
feat: add docs for supported package managers
1 parent e576879 commit 07b6039

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/tooling/package-managers.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Package managers
3+
description: Learn how to use different package managers when working with NativeScript application.
4+
position: 100
5+
slug: package-managers
6+
---
7+
8+
## What is Package Manager
9+
10+
A package manager is a piece of software that lets you manage the external code, written by you or someone else, that your project needs to work correctly. By default, NativeScript CLI uses Node Package Manager (`npm`) for managing the dependencies of the application. When new application is created, CLI automatically calls `npm install` to install all of its dependencies.
11+
12+
## Supported package managers
13+
NativeScript CLI allows you to configure the package manager used when working with dependencies. When you change the defaultly used `npm` package manager, CLI will use the newly set package manager for all operations it executes related to project dependencies, for example, project creation, managing dependencies, etc.
14+
15+
NativeScript CLI supports three package managers:
16+
- `npm` - this is the default option
17+
- `yarn` - you can set it by calling `tns package-manager set yarn`. More information about `yarn` is available [here](https://yarnpkg.com/)
18+
- `pnpm` - from version 6.4, you can use `pnpm` to manage the dependencies of your application. You can use `pnpm` by calling `tns package-manager set pnpm`. NOTE: You will have to use `--shamefully-hoist` flag if you call `pnpm` on your own. CLI passes this flag when installing dependencies with `pnpm` and probably your application will not work if you omit it. More information about `pnpm` is available [here](https://pnpm.js.org/).
19+
20+
In case you want to check what is the currently used package manager, you can use:
21+
```
22+
$ tns package-manager get
23+
```

0 commit comments

Comments
 (0)