Skip to content

Instantly share code, notes, and snippets.

View PhoneDroid's full-sized avatar
๐Ÿชซ

แดฉสœแดษดแด‡แด…ส€แดษชแด… PhoneDroid

๐Ÿชซ
View GitHub Profile

Easy-to-work-with
Theme Requirements

The following are a set of points that
make Shopify themes easier to work with.


General

https://stackoverflow.com/a/22027731
```sh
git config --global url.ssh://git@github.com/.insteadOf https://github.com/
```

For some reason I can never find this anything about this, so here so I don't forget.

SomeElement.ts

declare class Class extends HTMLElement {
    constructor ()
}
@PhoneDroid
PhoneDroid / Shopify JSON-LD Snippet.js
Last active February 5, 2024 10:42
Queries the first JSON-LD schema and copies it when clicking on the page.
const script = document.querySelector(`[ type = 'application/ld+json' ]`)
const raw = script.textContent
const text = JSON.stringify(JSON.parse(raw),null,4)
async function log (){
@PhoneDroid
PhoneDroid / Simple Parallel Bun Bundling.md
Created December 15, 2023 09:50
Simple setup for parallel bundling with bun, useful for feature based bundling -> Shopify Theme

Feature Bundling Script

#!/usr/bin/env bash

#
#   Bundle a given feature's TypeScript into a single JavaScript
#

Console Wrapper

How to properly wrap a console logger function to retain stacktraces.



Simple

  1. Clone repository with CLI, GitHub Desktop doesn't seem to properly reconize SSH credentials

    git clone https://github.com/Organization/Repository

    • Click Add local repository..