Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Mar 22, 2024
0 parents commit d07815f
Show file tree
Hide file tree
Showing 153 changed files with 38,931 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
build
public/build
playwright-report
test-results
server-build

60 changes: 60 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: deploy

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
setup:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: ▶️ Run setup script
run: npm run setup

- name: ʦ TypeScript
run: npm run typecheck

- name: ⬣ ESLint
run: npm run lint

deploy:
name: 🚀 Deploy
runs-on: ubuntu-latest
# only deploy main branch on pushes
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}

steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

# move Dockerfile to root
- name: 🚚 Move Files
run: |
mv ./kcdshop/fly.toml ./fly.toml
mv ./kcdshop/Dockerfile ./Dockerfile
mv ./kcdshop/.dockerignore ./.dockerignore
- name: 🚀 Deploy Production
uses: superfly/[email protected]
with:
args: 'deploy --remote-only'
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules

workspace/
**/.cache/
**/build/
**/public/build
**/playwright-report
data.db
/playground
**/tsconfig.tsbuildinfo

# in a real app you'd want to not commit the .env
# file as well, but since this is for a workshop
# we're going to keep them around.
# .env
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
legacy-peer-deps=true
registry=https://registry.npmjs.org/
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules

**/build/**
**/dist/**
**/.cache/**
**/public/build/**
.env

**/package.json
**/tsconfig.json

**/package-lock.json
**/playwright-report/**
35 changes: 35 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"arrowParens": "avoid",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleAttributePerLine": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": true,
"overrides": [
{
"files": ["**/*.json"],
"options": {
"useTabs": false
}
},
{
"files": ["**/*.mdx"],
"options": {
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "ignore"
}
}
]
}
4 changes: 4 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This material is available for private, non-commercial use under the
[GPL version 3](http://www.gnu.org/licenses/gpl-3.0-standalone.html). If you
would like to use this material to conduct your own workshop, please contact us
at [email protected]
110 changes: 110 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<div>
<h1 align="center"><a href="https://www.epicweb.dev/workshops">React Server Components</a></h1>
<strong>
Workshop tagline
</strong>
<p>
Workshop summary
</p>
</div>

<hr />

<div align="center">
<a
alt="Epic Web logo with the words Deployed Version"
href="https://epicweb-dev-react-server-components.fly.dev/"
>
<img
width="300px"
src="https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/254000390-447a3559-e7b9-4918-947a-1b326d239771.png"
/>
</a>
</div>

<hr />

<!-- prettier-ignore-start -->
[![Build Status][build-badge]][build]
[![GPL 3.0 License][license-badge]][license]
[![Code of Conduct][coc-badge]][coc]
<!-- prettier-ignore-end -->

## Prerequisites

- TODO: add prerequisites
- Some
- Pre-requisite
- links
- here

## Pre-workshop Resources

Here are some resources you can read before taking the workshop to get you up to
speed on some of the tools and concepts we'll be covering:

- TODO: add resources

## System Requirements

- [git][git] v2.18 or greater
- [NodeJS][node] v18 or greater
- [npm][npm] v8 or greater

All of these must be available in your `PATH`. To verify things are set up
properly, you can run this:

```shell
git --version
node --version
npm --version
```

If you have trouble with any of these, learn more about the PATH environment
variable and how to fix it here for [windows][win-path] or
[mac/linux][mac-path].

## Setup

This is a pretty large project (it's actually many apps in one) so it can take
several minutes to get everything set up the first time. Please have a strong
network connection before running the setup and grab a snack.

> **Warning**: This repo is _very_ large. Make sure you have a good internet
> connection before you start the setup process. The instructions below use
> `--depth` to limit the amount you download, but if you have a slow connection,
> or you pay for bandwidth, you may want to find a place with a better
> connection.
Follow these steps to get this set up:

```sh nonumber
git clone --depth 1 https://github.com/epicweb-dev/react-server-components.git
cd react-server-components
npm run setup
```

If you experience errors here, please open [an issue][issue] with as many
details as you can offer.

## The Workshop App

Learn all about the workshop app on the
[Epic Web Getting Started Guide](https://www.epicweb.dev/get-started).

[![Kent with the workshop app in the background](https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/280407082-0e012138-e01d-45d5-abf2-86ffe5d03c69.png)](https://www.epicweb.dev/get-started)

<!-- prettier-ignore-start -->
[npm]: https://www.npmjs.com/
[node]: https://nodejs.org
[git]: https://git-scm.com/
[build-badge]: https://img.shields.io/github/actions/workflow/status/epicweb-dev/react-server-components/validate.yml?branch=main&logo=github&style=flat-square
[build]: https://github.com/epicweb-dev/react-server-components/actions?query=workflow%3Avalidate
[license-badge]: https://img.shields.io/badge/license-GPL%203.0%20License-blue.svg?style=flat-square
[license]: https://github.com/epicweb-dev/react-server-components/blob/main/LICENSE
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
[coc]: https://kentcdodds.com/conduct
[win-path]: https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
[mac-path]: http://stackoverflow.com/a/24322978/971592
[issue]: https://github.com/epicweb-dev/react-server-components/issues/new
<!-- prettier-ignore-end -->
1 change: 1 addition & 0 deletions exercises/01.start/01.problem.start/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions exercises/01.start/01.problem.start/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
3 changes: 3 additions & 0 deletions exercises/01.start/01.problem.start/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
package-lock.json
built_node_modules
28 changes: 28 additions & 0 deletions exercises/01.start/01.problem.start/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"arrowParens": "avoid",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleAttributePerLine": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": true,
"overrides": [
{
"files": ["**/*.json"],
"options": {
"useTabs": false
}
}
]
}
3 changes: 3 additions & 0 deletions exercises/01.start/01.problem.start/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Start

This is the beginning form probably.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d07815f

Please sign in to comment.