Skip to content

Commit

Permalink
chore(scripts): swap from rollup to esbuild for main build (#5420)
Browse files Browse the repository at this point in the history
This swaps over from Rollup to Esbuild for the main `npm run build`
script in `package.json`. The existing Rollup based script is preserved
as `build.rollup`.

This change causes our main CI run (`.github/workflows/main.yml`) to now
use the Esbuild-based build, so the existing, supplemental CI run which
previously was based on the Esbuild-based build pipeline now uses the
'legacy' (or nearly so) Rollup-based version. This requires a bit of
renaming and so on.

STENCIL-1016
  • Loading branch information
alicewriteswrongs authored Feb 29, 2024
1 parent 1eec9a8 commit 24623d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Stencil with Esbuild
name: Build Stencil with Rollup

on:
workflow_call:
Expand All @@ -22,7 +22,7 @@ jobs:
uses: ./.github/workflows/actions/get-core-dependencies

- name: Core Build
run: npm run build.esbuild -- --ci
run: npm run build.rollup
shell: bash

- name: Validate Build
Expand All @@ -36,6 +36,6 @@ jobs:
- name: Upload Build Artifacts
uses: ./.github/workflows/actions/upload-archive
with:
name: stencil-core-esbuild
name: stencil-core-rollup
output: stencil-core-build.zip
paths: build cli compiler dev-server internal mock-doc scripts/build screenshot sys testing
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: esbuild CI
name: Rollup (legacy) CI

on:
push:
Expand All @@ -15,39 +15,39 @@ concurrency:
jobs:
build_core:
name: Build
uses: ./.github/workflows/build-esbuild.yml
uses: ./.github/workflows/build-rollup.yml

analysis_tests:
name: Analysis Tests (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-analysis.yml
with:
build_name: stencil-core-esbuild
build_name: stencil-core-rollup

bundler_tests:
name: Bundler Tests (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-bundlers.yml
with:
build_name: stencil-core-esbuild
build_name: stencil-core-rollup

component_starter_tests:
name: Component Starter Smoke Test (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-component-starter.yml
with:
build_name: stencil-core-esbuild
build_name: stencil-core-rollup

e2e_tests:
name: E2E Tests (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-e2e.yml
with:
build_name: stencil-core-esbuild
build_name: stencil-core-rollup

unit_tests:
name: Unit Tests (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-unit.yml
with:
build_name: stencil-core-esbuild
build_name: stencil-core-rollup
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"testing/"
],
"scripts": {
"build": "npm run tsc.scripts && npm run tsc.prod && npm run rollup.prod.ci",
"build.esbuild": "npm run clean && npm run tsc.scripts && npm run tsc.prod && node scripts/build/esbuild/build.js --prod --ci",
"build.esbuild.watch": "npm run build.esbuild -- --watch",
"build.rollup": "npm run tsc.scripts && npm run tsc.prod && npm run rollup.prod.ci",
"build": "npm run clean && npm run tsc.scripts && npm run tsc.prod && node scripts/build/esbuild/build.js --prod --ci",
"build.watch": "npm run build -- --watch",
"build.updateSelectorEngine": "node scripts/build/updateSelectorEngine.js",
"clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean-scripts",
"clean-scripts": "rm -rf scripts/build",
Expand Down

0 comments on commit 24623d7

Please sign in to comment.