GithubHelp home page GithubHelp logo

amplify-vscode-snippets's Introduction

This is an unofficial snippets extension for AWS Amplify users. Speed up your development by scaffolding out commonly used code snippets for Amplify CSS, UI Components, API/DataStore calls, and GraphQL Transform directives.

⚠️ this is unofficial and not formally maintained by the Amplify team! It is a personal project of some employees.

On the plus side, it's very simple. pls feel free to fork and customize your own, or propose additions! I may not accept them based on personal preference.

See Gif Demo

amplifysnippets

Install

You can add this by searching Amplify Snippets in your VS Code Extensions.

Direct link here: https://marketplace.visualstudio.com/items?itemName=sw-yx.amplify-vscode-snippets

Snippets Included

General TypeScript/JavaScript

Snippets for Angular and Vue are planned.

Prefix Method
import amplify→ import Amplify from 'aws-amplify';import awsconfig from './aws-exports';Amplify.configure(awsconfig);
Authenticator→ import { withAuthenticator,AmplifySignOut } from \"@aws-amplify/ui-react\"
DataStore import→ import { DataStore } from '@aws-amplify/datastore' etc
DataStore Read/Create/Update/Delete→ relevant sample code

CSS

Prefix Method
Amplify :root→ --amplify-primary-color/tint/shade

GraphQL

Prefix Method
@auth public read→ @auth(rules: [{ allow: owner, queries: null }])
@auth everything private→ @auth(rules: [{ allow: owner }])
basic @model with no auth→ type Todo @model { /* etc */ }

Known Issues

this is not an official extension! it is just a helper for swyx

Publishing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.