Skip to content

Commit

Permalink
[JENKINS-73744] Tweaks to Node.js contributing instructions + renovat…
Browse files Browse the repository at this point in the history
…e fix (#9757)

Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
  • Loading branch information
3 people committed Sep 21, 2024
1 parent f5ccd65 commit 10154f6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
{
"customType": "regex",
"fileMatch": [
"war/pom.xml"
"pom.xml"
],
"matchStrings": [
"<node.version>(?<currentValue>.*?)</node.version>"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ node_modules/

# Generated JavaScript Bundles
jsbundles

# In case someone accidentally runs npm install instead of yarn install
package-lock.json
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/ja

### Running the Yarn frontend build

> [!TIP]
> If you already have Node.js installed, you do not need to change your path. Start using `yarn` by enabling [Corepack](https://yarnpkg.com/corepack) with `corepack enable`, if it isn't already; this will add the `yarn` binary to your PATH.
To run the Yarn frontend build, after [building the WAR file](#building-the-war-file), add the downloaded versions of Node and Yarn to your path:

```sh
Expand All @@ -74,7 +77,7 @@ On one terminal, start a development server that will not process frontend asset
MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED' mvn -pl war jetty:run -Dskip.yarn
```

Open another terminal and start a [webpack](https://webpack.js.org/) dev server, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build):
Open another terminal and start a [webpack](https://webpack.js.org/) dev server, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build):

```sh
yarn start
Expand Down Expand Up @@ -108,13 +111,13 @@ To automatically fix backend issues, run:
mvn spotless:apply
```

To view frontend issues, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:
To view frontend issues, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:

```sh
yarn lint
```

To fix frontend issues, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:
To fix frontend issues, after [optionally adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:

```sh
yarn lint:fix
Expand Down

0 comments on commit 10154f6

Please sign in to comment.