-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
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
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,31 @@ | ||
# Introduction | ||
|
||
[!IMPORTANT] | ||
> This tutorial covers **blueprints**, files that you can use like a "stamp" to create or update certain files in a project. You will also learn how to transform a user's CLI options in the `create-options` step. | ||
> | ||
> It's assumed that you have completed the [main tutorial](../ember-codemod-rename-test-modules/00-introduction.md). | ||
We will partially implement `blueprint-for-v2-addon`, a codemod that helps [CLARK](https://www.clark.io/) create [v2 addons](https://rfcs.emberjs.com/id/0507-embroider-v2-package-format/). It creates files similarly to [`@embroider/addon-blueprint`](https://github.com/embroider-build/addon-blueprint), with some exceptions: | ||
|
||
- We can easily standardize how we customize linter plugins and test apps. | ||
- Upstream errors (from `ember-cli` and `@embroider/addon-blueprint`) affect little how we create v2 addons. | ||
- Generating files is simpler and faster thanks to `@codemod-utils`. | ||
|
||
```sh | ||
# With @embroider/addon-blueprint | ||
❯ time EMBER_CLI_PNPM=true ember addon "@clark-ui/button" --addon-location "ui/button" --blueprint "@embroider/addon-blueprint" --pnpm --skip-npm --typescript | ||
|
||
1.87s user 1.18s system 126% cpu 2.409 total | ||
``` | ||
|
||
```sh | ||
# With blueprint-for-v2-addon | ||
❯ time pnpm generate-addon --addon-name "@clark-ui/button" --addon-location "ui/button" | ||
|
||
1.86s user 0.23s system 133% cpu 1.565 total | ||
``` | ||
|
||
|
||
## Table of contents | ||
|
||
1. [Create a project](./01-create-a-project.md) |