-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #328 from pyxelpioneer/master
feat: Github Codespaces Plugin
- Loading branch information
Showing
20 changed files
with
691 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
plugins/devcontainer-github-codespaces/.amplicationrc.json
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,10 @@ | ||
{ | ||
"settings": { | ||
"includeAdminUI": false, | ||
"customLocation": null, | ||
"generateBasedOnServiceName": false | ||
}, | ||
"systemSettings": { | ||
"requireAuthenticationEntity": "false" | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"] | ||
} |
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,2 @@ | ||
.prettierignore | ||
.gitignore |
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 @@ | ||
dist |
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,53 @@ | ||
# @amplication/plugin-devcontainer-github-codespaces | ||
|
||
[![NPM Downloads](https://img.shields.io/npm/dt/@amplication/plugin-devcontainer-github-codespaces)](https://www.npmjs.com/package/@amplication/plugin-devcontainer-github-codespaces) | ||
|
||
Quickly generates the configuration that you require to setup devcontainer for your Amplication App | ||
|
||
## Purpose | ||
This plugin serves the purpose of generating devcontainer based on your configuration for your Amplication app | ||
|
||
|
||
## Usage | ||
|
||
1. To install the plugin: | ||
- Enable the plugin in the Amplication dashboard | ||
- Configure the plugin according to your needs | ||
- Commit changes and build! | ||
|
||
2. To use the plugin | ||
- Head over to https://github.com/codespaces/new to create a new codespace | ||
|
||
![Create new codespace](./assets/codespaces_before.png) | ||
|
||
- In repository, select the repository that you pushed your Amplication code to. | ||
In branch, select the branch that your pushed your Amplication code to. | ||
In Dev container configuration, choose the configuration with the name of your Amplication app. | ||
In region, select the region that is nearest to you. | ||
In machine type, select the specs for the codespace that you want to use | ||
|
||
![Configure codespace](./assets/codespaces_after.png) | ||
|
||
- Lastly, click on the Create Codespace to create your codespace and start developing! | ||
|
||
|
||
## Configuration | ||
|
||
This plugins allows you to customize the devcontainer config based: | ||
|
||
- includeAdminUI (boolean): Start Admin UI alongside the server | ||
- customLocation (string | null): Allows generating config as a specific directory. | ||
- generateBasedOnServiceName (string): Generates the config based on the service name, i.e., at `<root>/.devcontainer/<service-name>/devcontainer.json` | ||
|
||
>[!WARNING] | ||
>If `customLocation` is not null and the `generateBasedOnServiceName` is true, then the latter will be ignored and the config will be generated in the custom location provided | ||
## Scripts | ||
|
||
### `build` | ||
|
||
Running `npm run build` will bundle your plugin with Webpack for production. | ||
|
||
### `dev` | ||
|
||
Running `npm run dev` will watch your plugin's source code and automatically bundle it with every change. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,56 @@ | ||
{ | ||
"name": "@amplication/plugin-devcontainer-github-codespaces", | ||
"version": "1.0.0", | ||
"description": "Quickly setup your GitHub codespaces configuration for your Amplication app", | ||
"main": "dist/index.js", | ||
"nx": {}, | ||
"scripts": { | ||
"prepublishOnly": "npm run build", | ||
"dev": "webpack --watch", | ||
"build": "webpack", | ||
"prebuild": "rimraf dist", | ||
"test": "jest" | ||
}, | ||
"author": "pyxelpioneer", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@amplication/code-gen-types": "^2.0.19", | ||
"@amplication/code-gen-utils": "^0.0.7", | ||
"lodash": "^4.17.21" | ||
}, | ||
"devDependencies": { | ||
"@babel/parser": "^7.23.3", | ||
"@babel/types": "^7.23.3", | ||
"@types/jest": "^29.5.8", | ||
"@types/lodash": "^4.14.201", | ||
"@typescript-eslint/eslint-plugin": "^6.11.0", | ||
"@typescript-eslint/parser": "^6.11.0", | ||
"copy-webpack-plugin": "^11.0.0", | ||
"eslint": "^8.53.0", | ||
"jest-mock-extended": "^3.0.5", | ||
"prettier": "^3.1.0", | ||
"rimraf": "^5.0.5", | ||
"ts-jest": "^29.1.1", | ||
"ts-loader": "^9.5.1", | ||
"typescript": "^5.2.2", | ||
"webpack": "^5.89.0", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"jest": { | ||
"passWithNoTests": true, | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"ts" | ||
], | ||
"rootDir": "src/tests", | ||
"testRegex": ".*\\.spec\\.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"collectCoverageFrom": [ | ||
"**/*.(t|j)s" | ||
], | ||
"testEnvironment": "node" | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"targets": { | ||
"lint": {} | ||
} | ||
} |
Oops, something went wrong.