|
1 | | -## Security |
2 | | - |
3 | | -See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. |
| 1 | +# Preview: AWS Amplify's new code-first DX (Gen 2) for building backends |
4 | 2 |
|
5 | | -## License |
| 3 | +This next generation of Amplify’s backend building experience lets you author your frontend and backend definition completely with TypeScript, a file convention, and Git branch-based environments, is now available in Preview. To learn more, please visit [AWS Amplify (Gen 2)](https://docs.amplify.aws/gen2/). |
6 | 4 |
|
7 | | -This project is licensed under the Apache-2.0 License. |
| 5 | +## Quickstart |
8 | 6 |
|
9 | | -## Set up your local development environment |
| 7 | +To quickly get started with Amplify (Gen 2), please visit [AWS Amplify (Gen 2) Quickstart](https://docs.amplify.aws/gen2/start/quickstart/). |
10 | 8 |
|
11 | | -```sh |
12 | | -# clone project repo |
13 | | -cd <project directory> |
14 | | -npm run install:local |
15 | | -npm run test |
| 9 | +```bash |
| 10 | +npm create amplify@latest |
16 | 11 | ``` |
17 | 12 |
|
18 | | -`npm run install:local` will run `npm install`, then build all packages in the project and run `npm link` |
19 | | - |
20 | | -`npm run test` will run all the unit tests in the project |
21 | | - |
22 | | -You should now be able to run the new `amplify` CLI. |
23 | | - |
24 | | -#### Other helpful scripts |
25 | | - |
26 | | -`npm run watch` will start the tsc server and watch for changes in all packages |
27 | | - |
28 | | -`npm run test:coverage:threshold` will let you know if your changes are passing test coverage limits |
29 | | - |
30 | | -`npm run test:dir packages/<package directory>` will run only the tests in that directory |
31 | | - |
32 | | -`npm run vend` will start a local npm proxy and publish the local packages to this proxy so they can be installed / used as if they were published on npm |
33 | | - |
34 | | -`npm run e2e` will run the E2E test suite. Note: you must have valid AWS credentials configured locally to run this command successfully. |
35 | | - |
36 | | -## Creating changesets |
37 | | - |
38 | | -This repo uses [changesets](https://github.com/changesets/changesets) for versioning and releasing changes. |
39 | | - |
40 | | -All changes that affect release artifacts must have a corresponding changeset. To create a changeset run `changeset`. |
41 | | -This will start a walkthrough to author the changeset file. This file should be committed to the repo. |
42 | | - |
43 | | -## Publishing packages locally |
44 | | - |
45 | | -Publishing packages locally allows you to install local package changes as if they were published to NPM. This is useful for testing or demo scenarios. |
46 | | - |
47 | | -To set up a local npm proxy and publish the current local state to the proxy, run `npm run vend`. |
48 | | -This will start a local npm proxy using [Verdaccio](https://verdaccio.org/) and run `changeset version` and `changeset publish`. |
| 13 | +## Security |
49 | 14 |
|
50 | | -This will also point your local npm config to the local npm proxy. At this point you can npm install any packages in the repo and it will pull from the local proxy instead of directly from npm. |
| 15 | +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue. |
51 | 16 |
|
52 | | -To stop the local server and reset your npm registry run `npm run stop:npm-proxy`. |
| 17 | +## Code of Conduct |
53 | 18 |
|
54 | | -To clear the proxy package cache run `npm run clean:npm-proxy`. This will stop the local proxy and remove all packages you have published. |
| 19 | +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). |
| 20 | +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact |
| 21 | +[email protected] with any additional questions or comments. |
55 | 22 |
|
56 | | -To start the npm proxy without immediately publishing, run `npm run start:npm-proxy`. |
| 23 | +## Community |
57 | 24 |
|
58 | | -To publish a snapshot to an already running npm proxy run `npm run publish:snapshot:local latest` |
| 25 | +Join the [Discord Server](https://discord.com/invite/amplify). |
59 | 26 |
|
60 | | -## Adding a package |
| 27 | +## Tutorials |
61 | 28 |
|
62 | | -This repo uses a monorepo structure managed by npm workspaces. All the packages in the workspace are under `packages/*` |
| 29 | +- [Quickstart](https://docs.amplify.aws/gen2/start/quickstart/) |
| 30 | +- [Set up Amplify Auth](https://docs.amplify.aws/gen2/build-a-backend/auth/set-up-auth/) |
| 31 | +- [Set up Amplify Data](https://docs.amplify.aws/gen2/build-a-backend/data/set-up-data/) |
63 | 32 |
|
64 | | -There are package templates for some common scenarios in the `templates` directory. |
65 | | -These templates can be copied to a new package directory using `npm run new -- --template=<template> --name=<new name>` |
66 | | -`--template` specifies which template to use and `--name` specifies the new package name. |
67 | | -Valid templates are the directories in the `templates` directory |
| 33 | +## Contributing Guidelines |
68 | 34 |
|
69 | | -If you are adding a new package that does not have a template, consider adding a template for that package type. |
70 | | -You'll probably want to use an existing template as a starting point for the new package. |
| 35 | +Thank you for your interest in contributing to our project. Please visit [CONTRIBUTING](CONTRIBUTING.md) for additional information on contributing to this project. |
71 | 36 |
|
72 | | -At a minimum, each package needs: |
| 37 | +## License |
73 | 38 |
|
74 | | -1. A `package.json` file |
75 | | -2. A `tsconfig.json` file. This file should extend `tsconfig.base.json` |
76 | | -3. An `api-extractor.json` file. This file should extend `api-extractor.base.json` |
77 | | -4. An `update:api` script in the `package.json` file |
78 | | -5. A `typedoc.json` file |
79 | | -6. An `.npmignore` file |
| 39 | +This project is licensed under the Apache-2.0 License. |
0 commit comments