Skip to content

Instantly share code, notes, and snippets.

View mcansh's full-sized avatar
🤠

Logan McAnsh mcansh

🤠
View GitHub Profile
npx create-remix@latest --template remix-run/indie-stack test-999
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? Yes
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
@mcansh
mcansh / run.sh
Last active December 7, 2022 18:47
install, build, and type-check all `remix-run/examples`
function install() {
packageManager="yarn install --silent"
if test -f "package-lock.json"; then
echo "package-lock.json found, using npm"
packageManager="npm install --legacy-peer-deps --silent"
elif test -f "pnpm-lock.yaml"; then
echo "yarn.lock found, using yarn"
packageManager="pnpm install --reporter=silent"
else
@mcansh
mcansh / heroicon-symbols.mjs
Last active November 14, 2023 16:35
convert heroicons to an svg <symbol> so you can do `<svg><use href="..."></svg>` with them and not have them all inlined everytime
import path from "node:path";
import fse from "fs-extra";
import svgstore from "svgstore";
import { glob } from "glob";
import prettier from "prettier";
let HEROICONS_PATH = path.join(process.cwd(), "node_modules/heroicons");
let ASSETS_PATH = path.join(process.cwd(), "assets");
let OUTFILE = path.join(process.cwd(), "app/components/sprite/index.svg");
@mcansh
mcansh / !RemixVercelGitHubAction.markdown
Last active February 27, 2024 14:34
GitHub Action for automatically deploying a Remix app to Vercel

Things to note to make this work:

  1. you'll need to have your remix registry token available in your shell under REMIX_TOKEN
  2. you'll need to add secrets to your GitHub repo for the following items:
  3. you'll need to have your REMIX_TOKEN available in your vercel repo as an environment variable