Skip to content

Commit 2511dae

Browse files
committed
feat: adds support for package.json merging
1 parent 75f290d commit 2511dae

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/static.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,14 @@ jobs:
155155
if [ -d "./overrides" ]; then
156156
rsync -av ./overrides/ ./.static--generator/
157157
fi
158-
# Call the ecosystem's default install and build command.
158+
# [ECOSYSTEM SPECIFIC STEPS]
159+
#
160+
# At the moment, this action only supports `npm` as the ecosystem, but the steps below
161+
# can be modified to support other ecosystems.
162+
#
163+
- name: Merge the package.json, removing the targeted generator from the dependencies.
164+
run: |
165+
jq -s '.[0] * .[1] | del(.dependencies["${{ fromJson(steps.static.outputs.result)._static.generator.name }}"])' ./.static--generator/package.json package.json > ./.static--generator/package.json
159166
- name: "Building from ${{ fromJson(steps.static.outputs.result)._static.generator.name }}"
160167
run: cd ./.static--generator && npm ci && npm run build
161168
- name: Copying Output to Base Directory

0 commit comments

Comments
 (0)