Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: yarn - goodbye, hello pnpm #224

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [3000, 4200],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn install",
"postCreateCommand": "pnpm install",

// Configure tool-specific properties.
"customizations": {
Expand All @@ -29,15 +26,4 @@
]
}
}

// "portsAttributes": {
// "3000": {
// "label": "Svelte App",
// "onAutoForward": "openPreview"
// },
// "4200": {
// "label": "Website",
// "onAutoForward": "openPreview"
// }
// }
}
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ jobs:
# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# - run: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
# - run: pnpm nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"

# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- run: yarn install --frozen-lockfile
- uses: pnpm/action-setup@v2
with:
version: 9.8.0
run_install: true

- uses: nrwl/nx-set-shas@v4

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: yarn nx-cloud record -- echo Hello World
# - run: pnpm nx-cloud record -- echo Hello World
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: yarn run lint
- run: yarn nx affected -t build lint test
- run: pnpm run lint
- run: pnpm nx affected -t build lint test
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/.nx/cache
/.nx/workspace-data
.output
.nuxt
.nuxt
pnpm-lock.yaml
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ Make a fork. Or clone this repo and use standard commands:

```shell
git clone https://github.com/chat-game/space
yarn install
yarn run start
pnpm i
pnpm run start:first
pnpm run start
```

## 🏆 Contributors
Expand Down
12 changes: 8 additions & 4 deletions docker/website/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
ARG NODE=node:20.16.0-alpine
ARG NODE=node:20.17.0-alpine

################# Base builder ##############

FROM $NODE AS builder
WORKDIR /app

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

COPY . .
RUN yarn install
RUN yarn nx run prisma-schema:generate
RUN yarn nx run website:build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm nx run prisma-schema:generate
RUN pnpm nx run website:build

################# Website ##############

Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"$schema": "https://raw.githubusercontent.com/nrwl/nx/master/packages/nx/schemas/nx-schema.json",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@chat-game/space",
"version": "0.2.0",
"packageManager": "[email protected]",
"description": "Chat Game for Twitch",
"author": "Nick Kosarev <[email protected]>",
"license": "MIT",
Expand All @@ -18,11 +19,12 @@
"twitch"
],
"scripts": {
"start:first": "nx run prisma-schema:generate",
"start": "nx run-many -t serve",
"build": "nx affected:build",
"test": "nx affected:test",
"lint": "nx affected:lint && nx format:write --all",
"release": "yarn run check && yarn run test && yarn run lint && yarn run build && changelogen --release --push",
"release": "pnpm run check && pnpm run test && pnpm run lint && pnpm run build && changelogen --release --push",
"prepare": "husky",
"update": "nx migrate latest",
"dep-graph": "nx dep-graph",
Expand Down
Loading
Loading