-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathgetting-started.tsx
285 lines (264 loc) · 9.58 KB
/
getting-started.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
import { Heading, Text, Badge, Flex, Image, Link } from '@aws-amplify/ui-react';
import {
IconCheckCircle,
IconInfo,
IconExternalLink
} from '@/components/Icons';
import { MDXCode } from '@/components/MDXComponents';
import ExternalLink from '@/components/ExternalLink';
const meta = {
title: 'Getting started',
description:
'Amplify documentation - Learn how to use Amplify to develop and deploy cloud-powered mobile and web apps.'
};
export function getStaticProps() {
return {
props: {
showLastUpdatedDate: false,
meta
}
};
}
const _4a = `
git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
`.trim();
const _6a = `
git add .
git commit -m "A commit message"
git push -u origin <branch-name>
`.trim();
const _6b = `
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 323 bytes | 323.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote:
remote: Create a pull request for <branch-name> on GitHub by visiting:
remote: https://github.com/offlineprogrammer/amplify-js/pull/new/feat/<branch-name>
remote:
To https://github.com/offlineprogrammer/amplify-js.git
* [new branch] feat/my-amazing-branche -> feat/<branch-name>
Branch 'feat/<branch-name>' set up to track remote branch 'feat/<branch-name>' from 'origin'.
`.trim();
const _5a = `
git checkout -b "<group-token>/<short-token>/<branch-name>"
# or
git checkout -b "<short-token>/<branch-name>"
`.trim();
export default function GettingStarted() {
return (
<>
<Text>
The steps below will help you get set up to open a pull request in the
Amplify JS project. Check out the <code>CONTRIBUTING.md</code> in each
project's repository for instructions on how to get started with
local environment set up.
</Text>
<Text>
The Amplify Contributor Program is an open invitation for you to
participate in the Amplify open source development journey. It is a
great way to learn more about the Amplify ecosystem and make
constructive, helpful pull requests. It builds your resume by
demonstrating that you can collaborate with others on code, and it feels
good to give back to a project you use! We're looking forward to
developing with you!
</Text>
<Heading level={2}>Prerequisites</Heading>
<Flex direction="column" as="ul">
<Flex as="li" alignItems="center" gap="xs">
<IconCheckCircle />
<Text>
A GitHub account. You can create one{' '}
<ExternalLink href="https://github.com/join">
here <IconExternalLink />.
</ExternalLink>
</Text>
</Flex>
<Flex as="li" alignItems="center" gap="xs">
<IconCheckCircle />
<Text>IDE (e.g. VS Code)</Text>
</Flex>
<Flex as="li" alignItems="center" gap="xs">
<IconCheckCircle />
<Text>
Amplify JS development environment. Follow the steps{' '}
<ExternalLink href="https://github.com/aws-amplify/amplify-js/blob/main/CONTRIBUTING.md#setting-up-for-local-development">
here <IconExternalLink />
</ExternalLink>{' '}
to get set up.
</Text>
</Flex>
<Flex as="li" alignItems="center" gap="xs">
<IconCheckCircle />
<Text>
Set up the Amplify Docs{' '}
<ExternalLink href="https://github.com/aws-amplify/docs#getting-started">
development environment <IconExternalLink />
</ExternalLink>
.<Badge marginLeft="8px">Optional</Badge>
</Text>
</Flex>
</Flex>
<Heading level={2}>Steps to take to make your contribution</Heading>
<ol>
<li>
<Text>
Start on the{' '}
<ExternalLink href="https://github.com/aws-amplify/amplify-js/contribute">
contributing page <IconExternalLink />
</ExternalLink>{' '}
of the Amplify JS repo and find the right issue for you.
</Text>
</li>
<li>
<Text>
Fork the{' '}
<ExternalLink href="https://github.com/aws-amplify/amplify-js">
Amplify JS <IconExternalLink />
</ExternalLink>{' '}
GitHub project.
</Text>
</li>
<li>
<Text>
Open VS Code and clone your fork down to your machine so you can
begin making changes.{' '}
</Text>
<Image
marginBlock="medium"
objectFit="cover"
width="100%"
height="100%"
src="/images/contribute/open-vs-code.png"
alt="VS Code"
/>
</li>
<li>
<Text>
Run <code>git status</code> before you start coding to make sure
everything in the project files are updated with the{' '}
<code>origin/main</code> branch.
</Text>
<MDXCode language="bash" codeString={_4a}></MDXCode>
</li>
<li>
<Text>
Use one of the commands below to create a new branch within your
fork.
</Text>
<MDXCode language="bash" codeString={_5a}></MDXCode>
<Flex direction="column">
<Flex alignItems="center" gap="xs">
<IconInfo />
<Text>
Use the <code>group-token</code> to indicate the category you
are working on. e.g. <code>amplify-datastore</code>.
</Text>
</Flex>
<Flex alignItems="center" gap="xs">
<IconInfo />
<Text>
The <code>short-token</code> can be one of the following:{' '}
<code>feat</code>, <code>chore</code>, or <code>bug</code>.
</Text>
</Flex>
<Flex alignItems="center" gap="xs">
<IconInfo />
<Text>
The <code>branch-name</code> should be representative of the
feature or fix.
</Text>
</Flex>
</Flex>
</li>
<li>
Make your contribution and then run <code>git add</code>,{' '}
<code>git commit</code> and <code>push</code> your branch.
<MDXCode language="bash" codeString={_6a}></MDXCode>
<Text>
GitHub will process the push command and display a link to create a
pull request.
</Text>
<MDXCode language="bash" codeString={_6b}></MDXCode>
</li>
<li>
<Text>
Click on the link to create a new pull request using the Amplify JS
PR template.
</Text>
<Image
width="100%"
height="100%"
marginBlock="medium"
src="/images/contribute/open-pr.png"
alt="Open GitHub PR"
/>
</li>
</ol>
<Text>That's it!</Text>
<Text>
The Amplify team will review your PR and provide feedback if needed. The
review process might require API design & security reviews. For such
cases it might take up to 4 weeks to complete the review. Make sure to
address any automated check that fail (such as linting, unit tests, etc.
in the CI pipeline). Finally, once your changes meet the requirements
and checks, the team will merge your changes into the Amplify JS repo.
</Text>
<Text>
Well done and congrats! We're very excited about your contribution!
</Text>
<Heading level={2}>Resources</Heading>
<Text>
We've put together a few resources that can help you create quality
PRs.
</Text>
<Flex direction="column">
<Heading level={4}>
<ExternalLink href="https://github.com/aws-amplify/amplify-js/blob/main/CONTRIBUTING.md#contributing-guidelines">
Amplify JS Contributing Guidelines <IconExternalLink />
</ExternalLink>
</Heading>
<Text>
Please read through these guidelines carefully before submitting a PR.
</Text>
<Heading level={4}>
<Link href="/">Amplify Documentation</Link>
</Heading>
<Text>Learn more about the AWS Amplify JS library.</Text>
<Heading level={4}>
<ExternalLink href="https://discord.gg/amplify">
Amplify Community Discord server <IconExternalLink />
</ExternalLink>
</Heading>
<Text>
This is a great place to meet other developers using Amplify, ask
questions, and share what you're building with Amplify.
</Text>
<Heading level={4}>
<ExternalLink href="https://discord.gg/kfWYHw73eA">
The #contribute-to-javascript Discord channel <IconExternalLink />
</ExternalLink>
</Heading>
<Text>
Meet other contributors and ask questions related to contributing to
Amplify JS.
</Text>
<Heading level={4}>
<ExternalLink href="https://discord.gg/amplify">
Amplify Discord Office Hours <IconExternalLink />
</ExternalLink>
</Heading>
<Text>
Join the weekly office hour in the Discord Voice channel where you can
ask questions, share what you're working on and get feedback.
</Text>
</Flex>
</>
);
}