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

bash snippets to always show "Terminal" heading, do not show line numbers #7391

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func application(

Upon building and running this application you should see the following in your console window:

```bash
```console
Amplify configured with Auth and Predictions plugins
```

Expand All @@ -448,7 +448,7 @@ Amplify configured with Auth and Predictions plugins

To install the Amplify library to use predictions features, run the following commands in your project’s root folder:

```sh showLineNumbers={false}
```bash title="Terminal" showLineNumbers={false}
npm install aws-amplify
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ If you are using the [Authenticator component](https://ui.docs.amplify.aws/react

To enable this capability, an additional dependency must be installed.

```sh
```bash title="Terminal" showLineNumbers={false}
npm install @aws-amplify/rtn-web-browser
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ See the [Amazon Cognito documentation](https://docs.aws.amazon.com/cognito/lates
After you have chosen and set up your authentication resource, run the following command to create your first authentication resource in your personal cloud sandbox.

<InlineFilter filters={['flutter']}>
```bash title="Terminal"
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox --config-format dart --config-out-dir lib
```
</InlineFilter>
<InlineFilter filters={['angular','javascript','nextjs','react','react-native','vue']}>
```bash title="Terminal"
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox
```
</InlineFilter>
Expand All @@ -146,13 +146,13 @@ npx amplify sandbox
Be sure to add a "raw" folder under app/src/main/res directory if it doesn't exist.
</Callout>

```bash title="Terminal"
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox --config-format=json-mobile --config-out-dir=app/src/main/res/raw
```
</InlineFilter>

<InlineFilter filters={['swift']}>
```bash title="Terminal"
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox --config-format=json-mobile
```
</InlineFilter>
Expand All @@ -171,7 +171,7 @@ Amplify has pre-built UI components for React, Vue, Angular, React Native, Swift

First, install the `@aws-amplify/ui-react` library:

```sh
```bash title="Terminal" showLineNumbers={false}
npm add @aws-amplify/ui-react
```

Expand Down Expand Up @@ -242,7 +242,7 @@ export default withAuthenticator(App);

First, install the `@aws-amplify/ui-vue` library:

```bash
```bash title="Terminal" showLineNumbers={false}
npm add @aws-amplify/ui-vue
```

Expand Down Expand Up @@ -278,7 +278,7 @@ The `Authenticator` component offers a simple way to add authentication flows in

First, install the `@aws-amplify/ui-components` library:

```bash
```bash title="Terminal" showLineNumbers={false}
npm add @aws-amplify/ui-components
```

Expand Down Expand Up @@ -321,7 +321,7 @@ The `amplify-authenticator` component offers a simple way to add authentication

First, install the `@aws-amplify/ui-angular` library:

```bash
```bash title="Terminal" showLineNumbers={false}
npm add @aws-amplify/ui-angular
```

Expand Down Expand Up @@ -403,7 +403,7 @@ npx pod-install
<Callout warning>
For calling native libraries and platform dependencies from Expo, you need to run the prebuild command for generating the folders for related platforms.

```sh
```bash title="Terminal" showLineNumbers={false}
npx expo prebuild
```
</Callout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const data = defineData({

Once your cloud sandbox has updated, you should be able to call any CRUDL operations for your relational database.

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Set up your project by following the instructions in the [Quickstart guide](/[pl
## Step 2 - Install Polly Libraries
We'll create a new API endpoint that'll use the the AWS SDK to call the Amazon Polly service. To install the Amazon Polly SDK, run the following command in your project's root folder:

```bash
```bash title="Terminal" showLineNumbers={false}
npm install @aws-sdk/client-polly
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Set up your project by following the instructions in the [Quickstart guide](/[pl
## Step 2 - Install Rekognition Libraries
Create a new API endpoint that'll use the the AWS SDK to call the Amazon Rekognition service. To install the Amazon Rekognition SDK, run the following command in your project's root folder:

```bash
```bash title="Terminal" showLineNumbers={false}
npm install @aws-sdk/client-rekognition
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Set up your project by following the instructions in the [Quickstart guide](/[pl
## Step 2 - Install Amazon Translate libraries
To install the Amazon Translate SDK, run the following command in your project's root folder:

```bash
```bash title="Terminal" showLineNumbers={false}
npm install @aws-sdk/client-translate

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For more on the Amplify GraphQL API, see the [API documentation](/gen1/[platform

To get started, run the following command in an existing Amplify project with a React frontend:

```bash
```bash title="Terminal" showLineNumbers={false}
# Install TanStack Query
npm i @tanstack/react-query
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ First, install the Amplify client library to your project:

<InlineFilter filters={["react", "angular", "javascript", "vue", "nextjs", "react-native"]}>

```bash
```bash title="Terminal" showLineNumbers={false}
npm install aws-amplify
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Before you begin:

To use Amplify APIs server-side, you need to install the Amplify Next.js adapter in addition to the Amplify libraries:

```bash
```bash title="Terminal" showLineNumbers={false}
npm add aws-amplify @aws-amplify/adapter-nextjs
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function getStaticProps(context) {

You can easily display images on your app by using the cloud-connected Storage Image UI component. This component fetches images securely from your storage resource and displays it on the web page.

```bash
```bash title="Terminal" showLineNumbers={false}
npm install @aws-amplify/ui-react-storage aws-amplify
```
```tsx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ There are multiple ways you can implement upload functionality for your app and

Upload files from your app in minutes by using the cloud-connected Storage Manager UI Component.

```bash
```bash title="Terminal" showLineNumbers={false}
npm install @aws-amplify/ui-react-storage aws-amplify
```

Expand Down
6 changes: 3 additions & 3 deletions src/pages/[platform]/build-ui/formbuilder/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ Connected Forms are bound to a model in your app's data schema. Whenever a conne
## Generate forms
First, install the Amplify UI library.

```bash
```bash title="Terminal" showLineNumbers={false}
npm install @aws-amplify/ui-react

```

To use connected forms, you first need to deploy a data model from your sandbox environment. We will use the same example as in the getting started [tutorial](/[platform]/start/quickstart).
To get started run the following command from your project root:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify generate forms
```

This will generate create and update forms for each model defined in your schema in a folder called `ui-components`.

```bash
```bash title="Terminal" showLineNumbers={false}
File written: ui-components/graphql/subscriptions.ts
File written: ui-components/graphql/mutations.ts
File written: ui-components/graphql/queries.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ You can configure Amplify to disable automatic builds on every code commit. Navi

You can set up an incoming webhook to trigger a build without committing code to your Git repository. Currently, the Amplify Gen 2 console does not support creation of incoming webhooks. However, you can create a webhook for a Gen 2 app using the AWS CLI by running the [`create-webhook`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/amplify/create-webhook.html) command:

```bash
```bash title="Terminal" showLineNumbers={false}
aws amplify create-webhook --app-id <value> --branch-name <value> --region <value>
```

Expand Down Expand Up @@ -157,7 +157,7 @@ Next, select the **Configuration** section and add the following information to

You will then need to add the following shell commands to each of the build actions:

```bash
```bash title="Terminal" showLineNumbers={false}
// This environment variable is required to run the pipeline-deploy command in a non Amplify CI environment
- Run: export CI=1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ You can set up a new sandbox environment on your machine once you have an Amplif

First, open the terminal and run the following command:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox
```

Expand Down
38 changes: 19 additions & 19 deletions src/pages/[platform]/reference/cli-commands/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,47 +58,47 @@ Sandbox enables you to develop your backend alongside your frontend's developmen

<SubCommandHeading parentCommand="amplify-sandbox">Usage</SubCommandHeading>

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox
```

#### Use with an alternate profile

You can use the `--profile` flag to run sandbox with an AWS profile other than `default`:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox --profile my-other-profile
```

Additionally, you can use AWS CLI environment variables to specify a different profile:

```bash
```bash title="Terminal" showLineNumbers={false}
AWS_PROFILE=my-other-profile amplify sandbox
```

#### Use with an alternate Region

Use AWS environment variables to deploy to a Region other than your AWS profile's configured Region:

```bash
```bash title="Terminal" showLineNumbers={false}
AWS_REGION=us-west-2 amplify sandbox
```

#### Use with mobile applications

For mobile applications, you will need to set the output directory and format of the generated configuration file, specifically `amplifyconfiguration.json`:

```bash
```bash title="Terminal" showLineNumbers={false}
# for Android
amplify sandbox --config-format json-mobile --config-out-dir app/src/main/res
```

```bash
```bash title="Terminal" showLineNumbers={false}
# for Swift/iOS
amplify sandbox --config-format json-mobile
```

```bash
```bash title="Terminal" showLineNumbers={false}
# for Flutter
amplify sandbox --config-format dart --config-out-dir lib
```
Expand All @@ -115,7 +115,7 @@ Delete your personal cloud sandbox. This should only be used if you have an acti

<SubCommandHeading parentCommand="amplify-sandbox-delete">Usage</SubCommandHeading>

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox delete
```

Expand All @@ -129,29 +129,29 @@ Manage backend secrets used with your personal cloud sandbox.

<SubCommandHeading parentCommand="amplify-sandbox-secret">Usage</SubCommandHeading>

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox secret
```

#### Using with an alternate AWS profile

You can use the `--profile` flag to run sandbox with an AWS profile other than `default`:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox secret list --profile my-other-profile
```

Additionally, you can use AWS environment variables to specify a different profile:

```bash
```bash title="Terminal" showLineNumbers={false}
AWS_PROFILE=my-other-profile amplify sandbox secret list
```

#### Creating a secret

Create secrets for use with your personal cloud sandbox by using `sandbox secret set`:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox secret set LOGINWITHAMAZON_CLIENT_ID
```

Expand All @@ -161,15 +161,15 @@ This is how you configure secrets to be retrieved and used within your backend u

If you want to remove a secret you previously set, use `sandbox secret remove`:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox secret remove LOGINWITHAMAZON_CLIENT_ID
```

#### Listing secrets

List all available secrets for your personal sandbox in the default AWS profile and Region:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify sandbox secret list
```

Expand All @@ -191,12 +191,12 @@ Generate is not intended to be used standalone; however, it does offer a few sub

Each of the following `generate` subcommands require either a CloudFormation stack name or an existing Amplify App ID and corresponding git branch:

```bash
```bash title="Terminal" showLineNumbers={false}
# with CloudFormation stack name
npx amplify generate <subcommand> --stack <cloudformation-stack-name>
```

```bash
```bash title="Terminal" showLineNumbers={false}
# with Amplify App ID and git branch
npx amplify generate <subcommand> --app-id <app-id> --branch <git-branch-name>
```
Expand All @@ -217,15 +217,15 @@ In addition to the required options noted in [`amplify generate`](#amplify-gener

As mentioned above, you can specify a team member's cloud sandbox CloudFormation stack:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify generate config --stack amplify-nextamplifygen2-josef-sandbox-ca85e1081b
```

#### Use with mobile applications

Similar to `sandbox`, you can specify an alternate configuration file format by using `--format`:

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify generate config --stack amplify-nextamplifygen2-josef-sandbox-ca85e1081b --format json-mobile
```

Expand Down Expand Up @@ -329,6 +329,6 @@ Deploys the Amplify project in a CI/CD pipeline for a specified Amplify app and

<SubCommandHeading parentCommand="amplify-pipeline-deploy">Usage</SubCommandHeading>

```bash
```bash title="Terminal" showLineNumbers={false}
npx amplify pipeline-deploy --branch $BRANCH_NAME --app-id $AMPLIFY_APP_ID
```
Loading
Loading