Skip to content

Commit f15b224

Browse files
authored
feat: Add lerna create command (#1326)
1 parent 399fb17 commit f15b224

File tree

29 files changed

+1801
-6
lines changed

29 files changed

+1801
-6
lines changed

commands/create/README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
11
# `@lerna/create`
22

3-
> description TODO
3+
> Create a new lerna-managed package
44
55
## Usage
66

7-
TODO
7+
```
8+
lerna create <name> [loc]
89
10+
Create a new lerna-managed package
11+
12+
Positionals:
13+
name The package name (including scope), which must be locally unique _and_
14+
publicly available [string] [required]
15+
loc A custom package location, defaulting to the first configured package
16+
location [string]
17+
18+
Command Options:
19+
--access When using a scope, set publishConfig.access value
20+
[choices: "public", "restricted"] [default: public]
21+
--bin Package has an executable. Customize with --bin
22+
<executableName> [default: <name>]
23+
--description Package description [string]
24+
--dependencies A list of package dependencies [array]
25+
--es-module Initialize a transpiled ES Module
26+
--homepage The package homepage, defaulting to a subpath of the root
27+
pkg.homepage [string]
28+
--keywords A list of package keywords [array]
29+
--license The desired package license (SPDX identifier) [default: ISC]
30+
--private Make the new package private, never published
31+
--registry Configure the package's publishConfig.registry [string]
32+
--tag Configure the package's publishConfig.tag [string]
33+
--yes Skip all prompts, accepting default values
34+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"yes": true,
3+
"loglevel": "silent",
4+
"version": "1.2.3"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "basic-root",
3+
"private": true,
4+
"version": "0.0.0-root"
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "sibling-pkg",
3+
"version": "1.2.3"
4+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"yes": true,
3+
"loglevel": "silent",
4+
"packages": [
5+
"modules/*",
6+
"packages/*"
7+
],
8+
"version": "1.2.3"
9+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "sibling-pkg",
3+
"version": "1.2.3"
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "custom-location-root",
3+
"private": true,
4+
"version": "0.0.0-root"
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "lonely-pkg",
3+
"version": "1.2.3"
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"yes": true,
3+
"loglevel": "silent",
4+
"version": "independent"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "independent-root",
3+
"private": true,
4+
"version": "0.0.0-root"
5+
}

0 commit comments

Comments
 (0)