Skip to content

Commit

Permalink
Amplify VS Code Extension (aws-amplify#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommypraeger authored and mlabieniec committed Aug 1, 2018
1 parent 5d74ee4 commit 1b9e5a3
Show file tree
Hide file tree
Showing 43 changed files with 10,912 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
!.vscode
37 changes: 37 additions & 0 deletions vscode/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [

{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: watch"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: watch"
}
]
}
25 changes: 25 additions & 0 deletions vscode/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "install",
"problemMatcher": []
}
]
}
4 changes: 4 additions & 0 deletions vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Change Log

## 0.1
- Initial release
34 changes: 34 additions & 0 deletions vscode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# AWS Amplify VS Code Extension

<img src="https://s3.amazonaws.com/aws-mobile-hub-images/aws-amplify-logo.png" alt="AWS Amplify" width="550" >

Code snippets and completion for the [AWS Amplify](https://aws.github.io/aws-amplify) API.


## Installation

Go to the Extension Marketplace in VS Code and search for AWS Amplify API. Click install on the extension with title "AWS Amplify API".

## Usage

In a JavaScript or JSX file*, start typing an AWS Amplify API command that has a corresponding snippet and choose the appropriate snippet by either clicking it or pressing "enter" or "tab" when the correct snippet is highlighted in the dropdown menu. You can scroll between snippets using the up and down arrow keys.

The snippets options that pop up are based on the prefix that you type. For the complete set of prefix/snippet pairings for AWS Amplify, see the documentation:

Full code blocks from the documentation guides: https://github.com/aws-amplify/amplify-js/wiki/VS-Code-Snippet-Extension#full-code-block-snippet-documentation

Prefix naming convention for full code block snippets: "Amplify" + most recent heading in documentation.
For code blocks that are not the first after a heading, prefixes are numbered in order (e.g. 3rd snippet in section with heading "Analytics Installation And Configuration" will have the prefix "Amplify Analytics Installation And Configuration 3".

Selected code segments from the documentation guides, broken down by documentation page:
https://github.com/aws-amplify/amplify-js/wiki/VS-Code-Snippet-Extension#selected-code-block-snippet-documentation

Single word snippets (snippets that complete single words when clicked): https://github.com/aws-amplify/amplify-js/wiki/VS-Code-Snippet-Extension#single-word-snippet-documentation

*The snippets also have limited TypeScript functionality.

## Examples

![Alt Text](gifs/update_endpoint_example.gif)

![Alt Text](gifs/auth_setup_example.gif)
Loading

0 comments on commit 1b9e5a3

Please sign in to comment.