Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

Commit

Permalink
fix: set next app dir default value (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Jul 8, 2019
1 parent 5a01e05 commit 7b02c66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ yarn add --dev @ematipico/terraform-nextjs-plugin

## Usage

This library supports [cosmiconfig](https://github.com/davidtheclark/cosmiconfig): you just need to have a file called `terranextrc` that matches the criteria. This repository has [one](./terranextrc).
```bash
terranext --provider=AWS
```

_**At the moment, the library assumes that you already run `next build` inside your project.**_
This library supports [cosmiconfig](https://github.com/davidtheclark/cosmiconfig): you just need to have a file called `terranextrc` that matches the criteria. This repository has [one](./terranextrc).

### Via CLI

Expand Down Expand Up @@ -111,9 +113,9 @@ It will be up to you to consume them in a proper way.

| Name | Type | Description |
| ------------ | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gatewayKey` | `string` | A name that will be prefixed to your resources. Usually it's the project name. Default value is `Terranext`. |
| `gatewayKey` | `string` | A name that will be prefixed to your resources. Usually it's the project name. _Default value: `Terranext`_. |
| `provider` | `string` | The Cloud Provider. Based on the value, a different configuration will be exported. Supported providers: `AWS` |
| `nextDirApp` | `string` | This is the path where the lambdas really are. Usually you will run `terraform` CLI from a different project/folder. So you need to tell `terraform` where these files are. |
| `nextDirApp` | `string` | This is the path where your Next.js project is. Usually you will run `terraform` CLI from a different project/folder. So you need to tell `terraform` where this folder is. The library will take care of the rest. _Default value: `"./"`_ |
| `routes` | `Array<Mapping>`, `Mapping` | This is the structure of the routes that describe your pages. |

### Mapping explained
Expand Down
3 changes: 2 additions & 1 deletion bin/terranext.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ Examples
// eslint-disable-next-line unicorn/prevent-abbreviations
nextAppDir: {
type: "string",
alias: "d"
alias: "d",
default: "./"
},
provider: {
type: "string"
Expand Down

0 comments on commit 7b02c66

Please sign in to comment.