-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
env: | ||
IMPORT_STATEMENT: import "webext-dynamic-content-scripts" | ||
|
||
# FILE GENERATED WITH: npx ghat fregante/ghatemplates/esm-lint | ||
# SOURCE: https://github.com/fregante/ghatemplates | ||
# OPTIONS: {"exclude":["jobs.Node"]} | ||
|
||
name: ESM | ||
on: | ||
pull_request: | ||
branches: | ||
- '*' | ||
push: | ||
branches: | ||
- master | ||
- main | ||
jobs: | ||
Pack: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: npm install | ||
- run: npm run build --if-present | ||
- run: npm pack --dry-run | ||
- run: npm pack | tail -1 | xargs -n1 tar -xzf | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: package | ||
Publint: | ||
runs-on: ubuntu-latest | ||
needs: Pack | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- run: npx publint ./artifact | ||
Webpack: | ||
runs-on: ubuntu-latest | ||
needs: Pack | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- run: npm install --omit=dev ./artifact | ||
- run: echo "$IMPORT_STATEMENT" > index.js | ||
- run: webpack --entry ./index.js | ||
- run: cat dist/main.js | ||
Parcel: | ||
runs-on: ubuntu-latest | ||
needs: Pack | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- run: npm install --omit=dev ./artifact | ||
- run: echo "$IMPORT_STATEMENT" > index.js | ||
- run: > | ||
echo '{"@parcel/resolver-default": {"packageExports": true}}' > | ||
package.json | ||
- run: npx parcel@2 build index.js | ||
- run: cat dist/index.js | ||
Rollup: | ||
runs-on: ubuntu-latest | ||
needs: Pack | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- run: npm install --omit=dev ./artifact rollup@2 @rollup/plugin-node-resolve | ||
- run: echo "$IMPORT_STATEMENT" > index.js | ||
- run: npx rollup -p node-resolve index.js | ||
Vite: | ||
runs-on: ubuntu-latest | ||
needs: Pack | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- run: npm install --omit=dev ./artifact | ||
- run: echo '<script type="module">$IMPORT_STATEMENT</script>' > index.html | ||
- run: npx vite build | ||
- run: cat dist/assets/* | ||
esbuild: | ||
runs-on: ubuntu-latest | ||
needs: Pack | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- run: echo '{}' > package.json | ||
- run: echo "$IMPORT_STATEMENT" > index.js | ||
- run: npm install --omit=dev ./artifact | ||
- run: npx esbuild --bundle index.js | ||
TypeScript: | ||
runs-on: ubuntu-latest | ||
needs: Pack | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- run: npm install --omit=dev ./artifact @sindresorhus/tsconfig | ||
- run: echo "$IMPORT_STATEMENT" > index.ts | ||
- run: > | ||
echo '{"extends":"@sindresorhus/tsconfig","files":["index.ts"]}' > | ||
tsconfig.json | ||
- run: npx --package typescript -- tsc | ||
- run: cat distribution/index.js |