Skip to content

Commit

Permalink
chore: yarn - goodbye, hello pnpm (#224)
Browse files Browse the repository at this point in the history
hmbanan666 authored Aug 23, 2024
1 parent ecedc75 commit 31034bc
Showing 9 changed files with 21,878 additions and 13,275 deletions.
16 changes: 1 addition & 15 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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": {
@@ -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
@@ -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
@@ -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
@@ -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
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 ##############

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": [
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": "pnpm@9.8.0",
"description": "Chat Game for Twitch",
"author": "Nick Kosarev <hmbanan666@hotmail.com>",
"license": "MIT",
@@ -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",
Loading

0 comments on commit 31034bc

Please sign in to comment.