Skip to content

Instantly share code, notes, and snippets.

View wlee221's full-sized avatar
🙃

William Lee wlee221

🙃
View GitHub Profile
@wlee221
wlee221 / vue.config.js
Last active October 12, 2021 13:53
Vue 3: `vue.config.js` configuration for Amplify UI Components
module.exports = {
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
options.compilerOptions = {
...(options.compilerOptions || {}),
isCustomElement: tag => tag.startsWith('amplify-')
};
@wlee221
wlee221 / vite.config.js
Created January 11, 2021 20:34
Vue 3: vite.config.js configuration for Amplify UI Componets
vueCompilerOptions: {
isCustomElement: tag => tag.startsWith('amplify-')
}
@wlee221
wlee221 / machine.js
Last active April 19, 2021 21:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@wlee221
wlee221 / app-email.js
Last active April 27, 2021 09:03
Authenticator test templates for each usernameAlias
<AmplifyAuthContainer>
<AmplifyAuthenticator usernameAlias="email">
<AmplifySignIn
slot="sign-in"
headerText="My Custom Sign In"
usernameAlias="email"
formFields={[
{
type: 'email',
label: 'Custom Email Label',
@wlee221
wlee221 / machine.js
Last active May 5, 2021 17:32
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
import { Component, State, Prop, h, Host, Element, forceUpdate } from '@stencil/core';
import {
AuthState,
CognitoUserInterface,
FederatedConfig,
UsernameAliasStrings,
AuthStateHandler,
} from '../../common/types/auth-types';
import {
AUTH_CHANNEL,
@wlee221
wlee221 / machine.js
Last active June 24, 2021 18:03
Generated by XState Viz: https://xstate.js.org/viz
Machine(
{
id: 'signUp',
initial: "edit",
exit: ["clearFormValues", "clearError"],
states: {
edit: {
id: "edit",
initial: "noError",
type: "parallel",
@wlee221
wlee221 / machine.js
Created June 24, 2021 19:22
Generated by XState Viz: https://xstate.js.org/viz
Machine(
{
id: 'signUp',
initial: "edit",
exit: ["clearFormValues", "clearError"],
states: {
edit: {
on: {
SUMBIT: "submit"
}
@wlee221
wlee221 / machine.js
Last active June 30, 2021 09:28
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: "signUp",
initial: "edit",
type: 'parallel',
states: {
validation: {
initial: 'pending',
states: {
pending: {
invoke: {