Skip to content

Commit

Permalink
Merge pull request #290 from jaredh159/open-source
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredh159 authored Mar 21, 2024
2 parents 1c1e35a + 65e886b commit 628451c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 100 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ jobs:
runs-on: ubuntu-latest
env:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
RUN_ARGOS:
${{ contains(github.event.pull_request.labels.*.name, 'run-argos') ||
github.event_name == 'push' }}
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -71,19 +68,17 @@ jobs:
- name: build storybook
run: STORYBOOK_SCREENSHOT_TESTING=true just build-storybook
- name: serve storybook
if: env.RUN_ARGOS == 'true'
run: |
mv -f storybook/storybook-static/{iframe,index}.html
pnpm dlx [email protected] -l 4777 storybook/storybook-static &
- name: screenshots
if: env.RUN_ARGOS == 'true'
run: |
just visual-test
pnpm dlx @argos-ci/cli upload storybook/visual-tests/screenshots/argos || true
- name: create screenshots pr
id: pr
uses: peter-evans/create-pull-request@v4
if: env.RUN_ARGOS == 'true' && github.event_name == 'pull_request'
if: github.event_name == 'pull_request'
with:
base: ${{ github.head_ref }}
commit-message: '[automated] update screenshots from CI'
Expand Down
12 changes: 0 additions & 12 deletions .vscode/settings.json

This file was deleted.

61 changes: 0 additions & 61 deletions docs/signup-flow.md

This file was deleted.

28 changes: 7 additions & 21 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,25 @@

## Environment

- `node` 16
- `pnpm` 7
- `node` 18
- `pnpm` 8
- `just` 1.9

## Usage

Run `make` for an overview of the most commonly used dev commands. Check out the
`Makefile` for even more.

For watching typescript errors, the following monstrosity of a bash command filters out
some of the duplicates/noise:

```sh
script -q /dev/null make ts-watch | grep -P " [^\.][^\.][^ ]+: (- )?error TS\d+|(?<=0 errors)"
```
Run `just` for an overview of the most commonly used dev commands. Check out the
`justfile` for even more.

## Tips on adding a new package

- `pnpm` requires that the lib be explicitly listed as a dependency, so in other apps/libs
that need it, you'll need to run `pnpm --filter @some/pkg install @new/pkg`
- if the lib has react components using tailwind, be sure to updated the `content` section
of the `tailwind.comfig.js` for the app consuming it, so that JIT works correctly.
- if a next app is consuming it, edit the `next.config.js` file to transpile the module
(because we don't _build_ anything for consumption, we just deal with straight
typescript), and possibly add the path to the `package.json` `start` script (if using
`next-remote-watch`)
- add the new package to the `Makefile` typechecking commands: `ts-check` and `ts-watch`
of the `tailwind.config.js` for the app consuming it, so that JIT works correctly.
- add the new package to the `justfile` typechecking commands: `ts-check` and `ts-watch`

## Monorepo hacks/issues

- to get `next dev` to HMR when something in a workspace dependency changes, i had to pull
in `next-remote-watch` to replace the standard `next-dev`
- for next.js apps to directly consume un-transpiled typescript, we use
`with-transpiled-modules` in our `next.config.js`
- netlify's pnpm+monorepo support isn't quite there yet, had to add
`NETLIFY_USE_PNPM=true`
([see here](https://github.com/netlify/build/issues/4648#issuecomment-1288804297))
Expand Down

0 comments on commit 628451c

Please sign in to comment.