Skip to content

Commit a24ad7d

Browse files
author
Florian Lorétan
committed
Add support for building frontend with npm.
1 parent a041d97 commit a24ad7d

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

orb.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,38 @@ commands:
114114
- node_modules
115115
key: v1-yarn-{{ checksum "yarn.lock" }}
116116

117+
npm-install-build:
118+
parameters:
119+
path:
120+
type: string
121+
default: "."
122+
build-command:
123+
type: string
124+
default: "npm run build"
125+
126+
steps:
127+
- restore_cache:
128+
keys:
129+
- v1-npm-{{ checksum "<<parameters.path>>/package-lock.json" }}
130+
- v1-npm-
131+
132+
- run:
133+
name: Install frontend dependencies
134+
command: |
135+
cd <<parameters.path>>
136+
npm install
137+
138+
- run:
139+
name: Build frontend
140+
command: |
141+
cd <<parameters.path>>
142+
<<parameters.build-command>>
143+
144+
- save_cache:
145+
paths:
146+
- <<parameters.path>>/node_modules
147+
key: v1-npm-{{ checksum "<<parameters.path>>/package-lock.json" }}
148+
117149
drupal-docker-build:
118150
steps:
119151
- setup_remote_docker

0 commit comments

Comments
 (0)