Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master to main in links #1164

Merged
merged 1 commit into from
Mar 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ADDON-AUTHOR-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document lays out the recommended best practices for addon authors who want

## Give me the tl;dr: what should I do?

The best thing for all addons authors to do right now is to achieve the "Embroider Safe" support level. Follow the instructions in the [@embroider/test-setup README](https://github.com/embroider-build/embroider/tree/master/packages/test-setup) to add the `embroider-safe` scenario to your ember-try config.
The best thing for all addons authors to do right now is to achieve the "Embroider Safe" support level. Follow the instructions in the [@embroider/test-setup README](https://github.com/embroider-build/embroider/tree/main/packages/test-setup) to add the `embroider-safe` scenario to your ember-try config.

There are other levels of support beyond "Embroider Safe", but as long as you get that far you unblock the ability of your users to use Embroider. And the good news is that many addons are already Embroider Safe without doing any work, and all they really need to do is verify by adding a new scenario to their test suite.

Expand All @@ -30,7 +30,7 @@ We call addons that can be understood by `@embroider/compat` "Embroider Safe". "

Your addon may already be Embroider Safe! Many addons are. We've done a lot of work in the `@embroider/compat` package to be able to compile v1 addons on-the-fly into v2 addons.

The best way to see if your addon is Embroider safe is to add the `@embroider/test-setup` package and runs its `embroider-safe` ember-try scenario. See its [README](https://github.com/embroider-build/embroider/tree/master/packages/test-setup) for full details.
The best way to see if your addon is Embroider safe is to add the `@embroider/test-setup` package and runs its `embroider-safe` ember-try scenario. See its [README](https://github.com/embroider-build/embroider/tree/main/packages/test-setup) for full details.

If your tests _don't_ work under Embroider when you try this, please file an issue on the Embroider repo. We can help you triage whether there's a missing feature in `@embroider/compat` that would allow your addon to work unchanged, or whether there is a better way to refactor your addon to avoid incompatible behavior.

Expand Down Expand Up @@ -69,8 +69,8 @@ Several of these examples use a monorepo as a way to keep a clean separation bet

We support some tools to make V2 addon development more convenient:

- [@embroider/addon-shim](https://github.com/embroider-build/embroider/blob/master/packages/addon-shim/README.md) makes your V2 addon understandable to ember-cli. All V2 addons should use this.
- [@embroider/addon-dev](https://github.com/embroider-build/embroider/blob/master/packages/addon-dev/README.md) is an optional `devDependency` for your addon that provides build tooling. This gives you more flexibility over how you author your addon (like taking advantage of automatic template-colocation or using TypeScript) while still producing a spec-compliant package for publication to NPM.
- [@embroider/addon-shim](https://github.com/embroider-build/embroider/blob/main/packages/addon-shim/README.md) makes your V2 addon understandable to ember-cli. All V2 addons should use this.
- [@embroider/addon-dev](https://github.com/embroider-build/embroider/blob/main/packages/addon-dev/README.md) is an optional `devDependency` for your addon that provides build tooling. This gives you more flexibility over how you author your addon (like taking advantage of automatic template-colocation or using TypeScript) while still producing a spec-compliant package for publication to NPM.

## Replacing the {{component}} helper

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ return require('@embroider/compat').compatBuild(app, Webpack, {
});
```

The options are documented in detail in [Core Options](https://github.com/embroider-build/embroider/blob/master/packages/core/src/options.ts), [Compat Options](https://github.com/embroider-build/embroider/blob/master/packages/compat/src/options.ts), and [Webpack Options](https://github.com/embroider-build/embroider/blob/master/packages/webpack/src/options.ts).
The options are documented in detail in [Core Options](https://github.com/embroider-build/embroider/blob/main/packages/core/src/options.ts), [Compat Options](https://github.com/embroider-build/embroider/blob/main/packages/compat/src/options.ts), and [Webpack Options](https://github.com/embroider-build/embroider/blob/main/packages/webpack/src/options.ts).

The recommended steps when introducing Embroider into an existing app are:

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default interface Options {
// Enables per-route code splitting. Any route names that match these patterns
// will be split out of the initial app payload. If you use this, you must
// also add @embroider/router to your app. See [@embroider/router's
// README](https://github.com/embroider-build/embroider/blob/master/packages/router/README.md)
// README](https://github.com/embroider-build/embroider/blob/main/packages/router/README.md)
splitAtRoutes?: (RegExp | string)[];

// Every file within your application's `app` directory is categorized as a
Expand Down
2 changes: 1 addition & 1 deletion packages/test-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ This function always accepts your `app` (the value returned from `new EmberApp`

When Embroider is not present in the app's dependencies, it does exactly the same thing as `app.toTree()`. But when Embroider is present, it uses Embroider and if it sees one of our pre-defined scenario names in the environment variable `EMBROIDER_TEST_SETUP_OPTIONS`, it will merge those pre-defined options into any options that you provided.

For detailed documentation on what can go in `embroiderOptions`, see the comments in [Core Options](`https://github.com/embroider-build/embroider/blob/master/packages/core/src/options.ts`) and [Compat Options](https://github.com/embroider-build/embroider/blob/master/packages/compat/src/options.ts).
For detailed documentation on what can go in `embroiderOptions`, see the comments in [Core Options](`https://github.com/embroider-build/embroider/blob/main/packages/core/src/options.ts`) and [Compat Options](https://github.com/embroider-build/embroider/blob/main/packages/compat/src/options.ts).

If you normally pass extra broccoli trees to the `app.toTree()` method, you can still do so and should use the `extraPublicTrees` option:

Expand Down
2 changes: 1 addition & 1 deletion packages/util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ember install @embroider/util

### `ensureSafeComponent`

This function aids you in eliminating un-analyzable usage of the `{{component}}` helper. For the full explanation of why and how you would do this, see [the Addon Author Guide](https://github.com/embroider-build/embroider/blob/master/ADDON-AUTHOR-GUIDE.md).
This function aids you in eliminating un-analyzable usage of the `{{component}}` helper. For the full explanation of why and how you would do this, see [the Addon Author Guide](https://github.com/embroider-build/embroider/blob/main/ADDON-AUTHOR-GUIDE.md).

Example usage in Javascript:

Expand Down
2 changes: 1 addition & 1 deletion packages/util/addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function handleString(name, thingWithOwner) {
false,
{
id: 'ensure-safe-component.string',
url: 'https://github.com/embroider-build/embroider/blob/master/ADDON-AUTHOR-GUIDE.md#when-youre-passing-a-component-to-someone-else',
url: 'https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the Replacing the {{component}} helper section got moved into its own file.

until: 'embroider',
for: '@embroider/util',
since: '0.27.0',
Expand Down