Skip to content

Commit

Permalink
up node version, add nvmrc, recommend nvm
Browse files Browse the repository at this point in the history
  • Loading branch information
akellbl4 authored and umputun committed Jul 2, 2022
1 parent 24e9404 commit 9971698
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.13.2]
node: [16.15.1]

steps:
- uses: actions/checkout@v2
Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.13.2]
node: [16.15.1]

steps:
- uses: actions/checkout@v2
Expand All @@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.13.2]
node: [16.15.1]

steps:
- uses: actions/checkout@v2
Expand All @@ -87,7 +87,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.13.2]
node: [16.15.1]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN \
echo "version=$version" && \
go build -o remark42 -ldflags "-X main.revision=${version} -s -w" ./app

FROM --platform=$BUILDPLATFORM node:16.13.2-alpine as build-frontend-deps
FROM --platform=$BUILDPLATFORM node:16.15.1-alpine as build-frontend-deps

ARG CI
ARG SKIP_FRONTEND_BUILD
Expand All @@ -52,7 +52,7 @@ RUN if [ -z "$SKIP_FRONTEND_BUILD" ] ; then \
echo "skip frontend build" \
; fi

FROM --platform=$BUILDPLATFORM node:16.13.2-alpine as build-frontend
FROM --platform=$BUILDPLATFORM node:16.15.1-alpine as build-frontend

ARG CI
ARG SKIP_FRONTEND_TEST
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.artifacts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.16-alpine as build-frontend-deps
FROM node:16.15.1-alpine as build-frontend-deps

ARG CI

Expand All @@ -9,7 +9,7 @@ ADD frontend/package.json /srv/frontend/package.json
ADD frontend/package-lock.json /srv/frontend/package-lock.json
RUN cd /srv/frontend && CI=true npm ci

FROM node:12.16-alpine as build-frontend
FROM node:16.15.1-alpine as build-frontend

ARG CI
ARG NODE_ENV=production
Expand Down
1 change: 1 addition & 0 deletions frontend/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.15.1
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"translation:check": "node ./tasks/checkTranslation.js"
},
"engines": {
"node": ">=16.13.0 <=17.*",
"node": ">=16.15 <=17.*",
"npm": ">=8.1.0 <=8.*"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions site/src/docs/contributing/development/frontend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ title: Frontend Development Guidelines

You must have at least 2GB RAM or swap enabled for building.

- install [Node.js 16.13.0](https://nodejs.org/en/) or higher
- install [NPM 8.1.0](https://www.npmjs.com/package/npm)
- install [Node.js 16.15](https://nodejs.org/en/) or higher (we recommend using [NVM](https://github.com/nvm-sh/nvm) for node version autoswitch)
- install [NPM 8.1](https://www.npmjs.com/package/npm)
- run `npm install` inside `./frontend`

Running `npm install` will set up pre-commit hooks into your git repository. They are used to reformat your frontend code using `prettier` and lint with `eslint` and `stylelint` before every commit.
Expand Down

0 comments on commit 9971698

Please sign in to comment.