Skip to content

Commit

Permalink
feat: migrate to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Jul 15, 2022
1 parent 4d2626c commit a4302b0
Show file tree
Hide file tree
Showing 7 changed files with 13,715 additions and 13,067 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# shellcheck source=./_/husky.sh
. "$(dirname "$(readlink -f "$0")")/_/husky.sh"

yarn commitlint --edit "$1"
pnpm commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# shellcheck source=./_/husky.sh
. "$(dirname "$(readlink -f "$0")")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
24 changes: 7 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@
# Should be the specific version of node:alpine.
FROM node:16.15.1-alpine3.14@sha256:889139aa824c8b9dd29938eecfd300d51fc2e984f9cd03df391bcfbe9cf10b53 AS development

# Update and install dependencies.
# `git` is required by the `yarn` command
RUN apk add --no-cache \
git \
&& rm -rf /var/cache/apk/*

WORKDIR /srv/app/

COPY ./package.json ./yarn.lock ./
COPY ./package.json ./pnpm-lock.yaml ./

RUN yarn install
RUN corepack enable && \
pnpm install

COPY ./ ./

CMD ["yarn", "dev", "--hostname", "0.0.0.0"]
CMD ["pnpm", "run", "dev", "--hostname", "0.0.0.0"]
HEALTHCHECK --interval=10s CMD wget -O /dev/null http://localhost:3000/api/healthcheck || exit 1


Expand All @@ -32,18 +27,13 @@ ARG NUXT_ENV_STACK_DOMAIN=jonas-thelemann.de
ENV NUXT_ENV_STACK_DOMAIN=${NUXT_ENV_STACK_DOMAIN}
ENV NODE_ENV=production

# Update and install dependencies.
# - `git` is required by the `yarn` command
RUN apk add --no-cache \
git \
&& rm -rf /var/cache/apk/*

WORKDIR /srv/app/

COPY --from=development /srv/app/ ./

RUN yarn run lint \
&& yarn run build
RUN corepack enable && \
pnpm run lint && \
pnpm run build


#######################
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ The source code of [jonas-thelemann.de](https://jonas-thelemann.de/).

## Development
This project builds upon the [Nuxt.js](https://nuxtjs.org/) framework.
Install [Node.js](https://nodejs.org/) and [Yarn](https://yarnpkg.com/).
Then run `yarn` to install the project's dependencies.
After that, use `yarn develop` for development or `yarn generate` to generate the [static page](https://nuxtjs.org/blog/going-full-static).
Install [Node.js](https://nodejs.org/) and [pnpm](https://pnpm.io/).
Then run `pnpm i` to install the project's dependencies.
After that, use `pnpm dev` for development or `pnpm build` to generate the [static page](https://nuxtjs.org/blog/going-full-static).

Alternatively, build the provided [Dockerfile](https://www.docker.com/) using `docker build -t dargmuesli/jonas-thelemann .` and run the resulting image using `docker run dargmuesli/jonas-thelemann`.

Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"lint:style": "stylelint \"**/*.{vue,css}\" --ignore-path .gitignore",
"prepare": "if [[ -d '.git' && -d '.husky' ]]; then husky install && shx rm -rf .git/hooks && shx ln -s ../.husky .git/hooks; fi",
"lint": "yarn lint:js && yarn lint:style"
"lint": "pnpm lint:js && pnpm lint:style"
},
"lint-staged": {
"*.{js,vue}": "eslint",
Expand All @@ -26,13 +26,14 @@
"nuxt-helmet": "3.0.0"
},
"devDependencies": {
"@babel/core": "7.18.6",
"@babel/eslint-parser": "7.18.2",
"@babel/runtime-corejs3": "7.18.6",
"@commitlint/cli": "17.0.3",
"@commitlint/config-conventional": "17.0.3",
"@intlify/eslint-plugin-vue-i18n": "2.0.0",
"@nuxt/babel-preset-app": "2.15.8",
"@nuxt/bridge": "npm:@nuxt/bridge-edge",
"@nuxt/bridge": "npm:@nuxt/bridge-edge@3.0.0-27628751.3df21c7",
"@nuxt/types-edge": "2.16.0-27616340.013f051b",
"@nuxtjs/eslint-config-typescript": "10.0.0",
"@nuxtjs/eslint-module": "3.1.0",
Expand All @@ -41,6 +42,8 @@
"@nuxtjs/moment": "1.6.1",
"@nuxtjs/stylelint-module": "4.1.0",
"autoprefixer": "10.4.7",
"buffer": "6.0.3",
"chalk": "4.1.2",
"eslint": "8.19.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-nuxt": "3.2.0",
Expand All @@ -58,7 +61,10 @@
"stylelint-config-prettier": "9.0.3",
"stylelint-config-recommended-vue": "1.4.0",
"stylelint-config-standard": "26.0.0",
"tailwindcss": "3.1.6"
"tailwindcss": "3.1.6",
"typescript": "4.7.4",
"vue": "2.7.6",
"webpack": "4.46.0"
},
"scheduleVersion": "4.9.21"
}

0 comments on commit a4302b0

Please sign in to comment.