Skip to content

Commit

Permalink
upgrade to epicshop
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Apr 23, 2024
1 parent dd383b6 commit 5af7349
Show file tree
Hide file tree
Showing 26 changed files with 12,926 additions and 11,549 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:

- name: 🚀 Deploy
run: flyctl deploy --remote-only
working-directory: ./scripts/deployed
working-directory: ./epicshop
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
11 changes: 0 additions & 11 deletions .prettierignore

This file was deleted.

35 changes: 0 additions & 35 deletions .prettierrc

This file was deleted.

File renamed without changes.
21 changes: 21 additions & 0 deletions epicshop/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:20-bookworm-slim as base

RUN apt-get update && apt-get install -y git

ENV EPICSHOP_CONTEXT_CWD="/myapp/workshop-content"
ENV EPICSHOP_DEPLOYED="true"
ENV EPICSHOP_DISABLE_WATCHER="true"
ENV FLY="true"
ENV PORT="8080"
ENV NODE_ENV="production"

WORKDIR /myapp

ADD . .

RUN npm install --omit=dev

CMD rm -rf ${EPICSHOP_CONTEXT_CWD} && \
git clone https://github.com/epicweb-dev/react-hooks ${EPICSHOP_CONTEXT_CWD} && \
cd ${EPICSHOP_CONTEXT_CWD} && \
npx epicshop start
6 changes: 3 additions & 3 deletions scripts/fix-watch.js → epicshop/fix-watch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chokidar from 'chokidar'
import path from 'node:path'
import { $ } from 'execa'
import { fileURLToPath } from 'node:url'
import chokidar from 'chokidar'
import { $ } from 'execa'

const __dirname = path.dirname(fileURLToPath(import.meta.url))
const here = (...p) => path.join(__dirname, ...p)
Expand All @@ -10,7 +10,7 @@ const workshopRoot = here('..')

const watchPath = path.join(workshopRoot, './exercises/*')
const watcher = chokidar.watch(watchPath, {
ignored: /(^|[\/\\])\../, // ignore dotfiles
ignored: /(^|[/\\])\../, // ignore dotfiles
persistent: true,
ignoreInitial: true,
depth: 2,
Expand Down
3 changes: 0 additions & 3 deletions scripts/fix.js → epicshop/fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
// because you may need to run it without deps.

import fs from 'node:fs'
import cp from 'node:child_process'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

const __dirname = path.dirname(fileURLToPath(import.meta.url))
const here = (...p) => path.join(__dirname, ...p)
const VERBOSE = false
const logVerbose = (...args) => (VERBOSE ? console.log(...args) : undefined)

const workshopRoot = here('..')
const examples = (await readDir(here('../examples'))).map(dir =>
Expand Down
File renamed without changes.
Loading

0 comments on commit 5af7349

Please sign in to comment.