forked from aws-amplify/amplify-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
CONTRIBUTING.md
(aws-amplify#1264)
* First draft * Reorder items and add publishing readme * Fix heading * grammar :p * Wording * Fix #pull-request link * Add canary folder description * Update changeset desc
- Loading branch information
Showing
10 changed files
with
254 additions
and
168 deletions.
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
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,15 @@ | ||
# Examples | ||
|
||
This directory contains example apps for each framework we support. | ||
|
||
## Examples Development | ||
|
||
1. Create or Update an example at [`examples/{next,vue,angular}/...`](examples) | ||
|
||
For your `aws-exports.js`, you can [reference an existing or create a new environment](environments). | ||
|
||
1. Run your example at monorep root: `yarn {next,vue,angular}-example dev` | ||
1. Visit your example (e.g. <http://localhost:3000/ui/components/authenticator/sign-up-with-username>) | ||
1. Make changes to [`@aws-amplify/ui-{react,vue,angular}`](packages) & save. | ||
|
||
Examples should automatically hot-reload your changes in the example. |
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,50 @@ | ||
# Contributing | ||
|
||
## Development Structure | ||
|
||
`@aws-amplify/ui-angular` utilizes a monorepo structure to manage devDependencies and the actual packages separately. | ||
|
||
This directory (`packages/angular`) contains base dependencies for developing angular packages. The actual code for `@aws-amplify/ui-angular` is located in [`projects/ui-angular`](./projects/ui-angular/) directory. | ||
|
||
```bash | ||
packages/angular/ | ||
├── projects/ui-angular/ # where the actual `@aws-amplify/ui-angular` library lives | ||
│ ├── src/ # contains src files for UI library code. | ||
│ ├── legacy/ # contains re-expors of legacy web components | ||
│ │ └── src/ | ||
│ │ └── package.json # required by ng-packagr to setup secondary entry points | ||
│ └── package.json # name: `@aws-amplify/ui-angular`, private: false | ||
│ # contains dependencies that library needs (e.g. xstate) | ||
│ | ||
├── dist/ui-angular/ # this is auto-generated on build. Deployments will only happen from this folder. | ||
│ └── esm2015/ | ||
│ └── fesm2015/ | ||
│ └── lib/ | ||
│ └── package.json # same as the above, but defines extra fields like | ||
│ # main, module, esm2015, typings, sideEffects. | ||
│ | ||
└── package.json # name: 'amplify-ui-angular-mono`, private: true | ||
# contains base dependencies for developing angular packages. | ||
# This is only for infrastructure purpose! Shouldn't be | ||
# published or be referenced by other dependencies. | ||
``` | ||
|
||
## Getting Started | ||
|
||
1. Navigate to the _root_ of your local clone of [aws-amplify/amplify-ui](https://github.com/aws-amplify/amplify-ui) | ||
1. Run `yarn setup` | ||
1. Run `yarn angular dev` | ||
|
||
This will start building `@aws-amplify/ui-angular` in watch mode. To test your changes, you can utilize [`examples/angular`](../../examples/angular) to run examples on Angular. Please see examples [README](../../examples/README.md) and e2e [README](../e2e/README.md#contributing) to get started. | ||
|
||
### Depenencies | ||
|
||
`@aws-amplify/ui-react` depends on [`@aws-amplify/ui`](../ui) for theming, state management, and translation logic. If you're looking for change in these, please refer to `@aws-amplify/ui` [README](../ui/README.md). | ||
|
||
## Testing for Production | ||
|
||
After you tested your change, you can run `yarn angular build` and `yarn angular-example build` from monorepo to run build for production. | ||
|
||
## Troubleshooting | ||
|
||
If you're cross developing `angular` and `angular-example`, make sure you're running the same type of commands -- either run `yarn angular dev` and `yarn angular-example dev` together, or run `yarn angular build` and `yarn angular-example build` together. Not doing so will result in IVY compiler conflict. |
Oops, something went wrong.