-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workspace-plugin): implement split-library-in-two migration gene…
…rator (#31086)
- Loading branch information
Showing
6 changed files
with
1,211 additions
and
22 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
tools/workspace-plugin/src/generators/split-library-in-two/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# split-library-in-two | ||
|
||
Workspace Generator for splitting existing v9 web packages into `/library` and `/stories` packages under the same folder name. | ||
|
||
```sh | ||
|- react-components/ | ||
|- |- react-text/ | ||
``` | ||
|
||
↓↓↓ | ||
|
||
``` | ||
|- react-components/ | ||
|- |- react-text/ | ||
|- |- |- library/ | ||
|- |- |- stories/ | ||
``` | ||
|
||
Generator also parses source AST and adds ghost dependencies as `devDependencies` to `library` project for cypress/jest test files in order to create proper dependency graph ( without this `type-check` would fail ) | ||
|
||
<!-- toc --> | ||
|
||
- [Usage](#usage) | ||
- [Examples](#examples) | ||
- [Options](#options) | ||
- [`project`](#project) | ||
- [`all`](#all) | ||
|
||
<!-- tocstop --> | ||
|
||
## Usage | ||
|
||
```sh | ||
yarn nx g @fluentui/workspace-plugin:split-library-in-two --help | ||
``` | ||
|
||
Show what will be generated without writing to disk: | ||
|
||
```sh | ||
yarn nx g @fluentui/workspace-plugin:split-library-in-two --dry-run | ||
``` | ||
|
||
### Examples | ||
|
||
```sh | ||
yarn nx g @fluentui/workspace-plugin:split-library-in-two | ||
``` | ||
|
||
## Options | ||
|
||
#### `project` | ||
|
||
Type: `string` | ||
|
||
project name | ||
|
||
#### `all` | ||
|
||
Type: `boolean` | ||
|
||
will execute generator on all applicable projects |
1 change: 0 additions & 1 deletion
1
tools/workspace-plugin/src/generators/split-library-in-two/files/src/index.ts.template
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.