Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.65 KB

00-introduction.md

File metadata and controls

36 lines (25 loc) · 1.65 KB

Introduction

Important

Please complete the main tutorial first.

Note

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.

We will partially recreate blueprints-v2-addon, a codemod that helps you write v2 addons. It creates an addon and a test app similarly to @embroider/addon-blueprint, with some exceptions:

  • We can customize files, lint configurations, and dependencies, and standardize these deviations.
  • Upstream errors (from ember-cli and @embroider/addon-blueprint) have a little effect.
  • Generating files is simpler and faster.
# Average for @embroider/addon-blueprinttime EMBER_CLI_PNPM=true ember addon "@my-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
# Average for blueprints-v2-addontime pnpm generate-addon --addon-name "@my-ui/button" --addon-location "ui/button"

1.86s user 0.23s system 133% cpu 1.565 total

Table of contents

  1. Create a project
  2. Create static files
  3. Define options
  4. Create dynamic files
  5. Conclusion