Skip to content

Instantly share code, notes, and snippets.

View ganobrega's full-sized avatar
:electron:

Gabriel Nobrega ganobrega

:electron:
  • Brazil, São Paulo
View GitHub Profile
@ganobrega
ganobrega / _.md
Last active October 20, 2023 10:36
Checkout with Deno - Alpha

VTEX Checkout with Deno

No polyfill. No browserlist.

This is a alpha version that I'm not using any more...

Now I'm using ESBuild and PostCSS

  1. First create a new app using checkout-ui-settings scaffold
{
"importOrder": [
"^@kubernetes?.+$",
"^electron?.+$",
"^react?.+$",
"^antd?.+$",
"^@ant-design?.+$",
"^@reduxjs?.+$",
"^@rjsf?.+$",
"^(?![@\\.]).+$",
@ganobrega
ganobrega / parse_dotenv.bash
Created March 5, 2023 01:08 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
1. `/checkout/cart/add/?sku=0000&qty=1&seller=1&sc=1&redirect=true`
@ganobrega
ganobrega / vtex-checkout-events.js
Created October 11, 2022 21:03 — forked from acjr1910/vtex-checkout-events.js
VTEX checkout events
$(window).on('orderFormUpdated.vtex', (event, orderForm) => console.log("orderFormUpdated.vtex"));
$(window).on('orderFormUpdated.vtex', (event, orderForm) => console.log("orderFormUpdated.vtex"));
$(window).on('checkoutRequestEnd.vtex', (event, orderForm) => console.log("checkoutRequestEnd.vtex"));
$(window).on('checkout.vtex.com', (event, orderForm) => console.log("checkout.vtex.com "));
$(window).on('.vtexIdUI', (event, orderForm) => console.log(".vtexIdUI"));
$(window).on('authenticatedUser.vtexid', (event, orderForm) => console.log("authenticatedUser.vtexid"));
$(window).on('started.vtexid', (event, orderForm) => console.log("started.vtexid"));
$(window).on('rendered.vtexid', (event, orderForm) => console.log("rendered.vtexid "));
$(window).on('closed.vtexid', (event, orderForm) => console.log("closed.vtexid"));
$(window).on('guestUser.vtexid', (event, orderForm) => console.log("guestUser.vtexid "));
@ganobrega
ganobrega / checkout-events.js
Created October 11, 2022 21:03 — forked from Juanpablobar/checkout-events.js
VTEX: Checkout events
$(window).on('orderFormUpdated.vtex', (event, orderForm) => console.log("orderFormUpdated.vtex"));
$(window).on('orderFormUpdated.vtex', (event, orderForm) => console.log("orderFormUpdated.vtex"));
$(window).on('checkoutRequestEnd.vtex', (event, orderForm) => console.log("checkoutRequestEnd.vtex"));
$(window).on('checkout.vtex.com', (event, orderForm) => console.log("checkout.vtex.com "));
$(window).on('.vtexIdUI', (event, orderForm) => console.log(".vtexIdUI"));
@ganobrega
ganobrega / vtex-toolbelt-set-env.sh
Created May 5, 2022 18:53
VTEX Toobelt Export Variables
#!/bin/bash
VTEX_WORKSPACE="gabriel"
echo $VTEX_WORKSPACE
➜ BBBB-components git:(master) vtex link
11:07:50.639 - info: Running yarn in react
yarn install v1.22.17
warning package.json: No license field
warning No license field
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.37s.
11:07:51.216 - info: Finished running yarn
11:07:51.218 - info: Linking app AAAA.BBBB-components@0.118.2
@ganobrega
ganobrega / store-block.md
Created September 9, 2021 21:27 — forked from lucis/store-block.md
Store Block Summary

Conhecendo uma app VTEX IO

Introdução

Antes de começar, é necessário relembrar alguns conceitos importantes para uma maior compreensão do fluxo lógico ao desenvolver uma app.

manifest.json

vendor

Define o nome da conta VTEX que está desenvolvendo a app. Essa conta é responsável pela manutenção e distribuição da app (pode ser instalada em outras contas ou somente na própria)

@ganobrega
ganobrega / remove-git-tags.sh
Created September 9, 2021 21:26 — forked from lucis/remove-git-tags.sh
Removing ALL git tags for a Repo
git tag -l | xargs git tag -d && git fetch && git tag -l | xargs -n 1 git push --delete origin && git tag -l | xargs git tag -d