-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve developer tools (#4119)
- Loading branch information
Showing
16 changed files
with
183 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## The `extensions` Folder | ||
|
||
The `extensions` folder serves as the central location for creating Webiny extensions. | ||
|
||
To quickly start working on a new extension, in your terminal, simply run the | ||
`yarn webiny scaffold` command. Once ready, from the list of available scaffolds, | ||
choose **New Extension** and then proceed by answering the rest of the questions. | ||
|
||
For more information, please visit https://webiny.link/extensions. |
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
15 changes: 15 additions & 0 deletions
15
packages/cli-plugin-scaffold-extensions/src/generators/admin.ts
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 |
---|---|---|
@@ -1,6 +1,21 @@ | ||
import { addPluginToReactApp } from "./utils/addPluginToReactApp"; | ||
import { PluginGenerator } from "~/types"; | ||
import path from "path"; | ||
import readJson from "load-json-file"; | ||
import { PackageJson } from "@webiny/cli-plugin-scaffold/types"; | ||
import writeJson from "write-json-file"; | ||
|
||
export const adminGenerator: PluginGenerator = async ({ input }) => { | ||
await addPluginToReactApp(input); | ||
|
||
// Update dependencies list in package.json. | ||
const packageJsonPath = path.join("apps", "admin", "package.json"); | ||
const packageJson = await readJson<PackageJson>(packageJsonPath); | ||
if (!packageJson.dependencies) { | ||
packageJson.dependencies = {}; | ||
} | ||
|
||
packageJson.dependencies[input.packageName] = "1.0.0"; | ||
|
||
await writeJson(packageJsonPath, packageJson); | ||
}; |
15 changes: 15 additions & 0 deletions
15
packages/cli-plugin-scaffold-extensions/src/generators/api.ts
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 |
---|---|---|
@@ -1,6 +1,21 @@ | ||
import { addPluginToApiApp } from "./utils/addPluginToApiApp"; | ||
import { PluginGenerator } from "~/types"; | ||
import path from "path"; | ||
import readJson from "load-json-file"; | ||
import { PackageJson } from "@webiny/cli-plugin-scaffold/types"; | ||
import writeJson from "write-json-file"; | ||
|
||
export const apiGenerator: PluginGenerator = async ({ input }) => { | ||
await addPluginToApiApp(input); | ||
|
||
// Update dependencies list in package.json. | ||
const packageJsonPath = path.join("apps", "api", "graphql", "package.json"); | ||
const packageJson = await readJson<PackageJson>(packageJsonPath); | ||
if (!packageJson.dependencies) { | ||
packageJson.dependencies = {}; | ||
} | ||
|
||
packageJson.dependencies[input.packageName] = "1.0.0"; | ||
|
||
await writeJson(packageJsonPath, packageJson); | ||
}; |
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
9 changes: 9 additions & 0 deletions
9
packages/cwp-template-aws/template/common/extensions/README.md
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,9 @@ | ||
## The `extensions` Folder | ||
|
||
The `extensions` folder serves as the central location for creating Webiny extensions. | ||
|
||
To quickly start working on a new extension, in your terminal, simply run the | ||
`yarn webiny scaffold` command. Once ready, from the list of available scaffolds, | ||
choose **New Extension** and then proceed by answering the rest of the questions. | ||
|
||
For more information, please visit https://webiny.link/extensions. |
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
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { lambda } from "@pulumi/aws"; | ||
|
||
export const LAMBDA_RUNTIME = lambda.Runtime.NodeJS18dX; | ||
|
||
export const DEFAULT_PROD_ENV_NAMES = ["prod", "production"]; |
Oops, something went wrong.