-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from shimataro/develop
version 1.0.0
- Loading branch information
Showing
40 changed files
with
16,927 additions
and
37,851 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,35 @@ | ||
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | ||
name: Build | ||
description: Composite action (build) | ||
|
||
inputs: | ||
node-version: | ||
description: Node.js version for build | ||
required: false | ||
default: "18" | ||
registry-url: | ||
description: Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN. | ||
required: false | ||
default: "" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Node.js (build) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
registry-url: ${{ inputs.registry-url }} | ||
- name: Output versions | ||
run: | | ||
node -v | ||
npm -v | ||
shell: bash | ||
|
||
# Build | ||
- name: Install dependencies | ||
run: npm ci | ||
shell: bash | ||
- name: Build | ||
run: npm run build | ||
shell: bash |
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,52 @@ | ||
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | ||
name: Run example | ||
description: Composite action (run example) | ||
|
||
inputs: | ||
node-version-build: | ||
description: Node.js version (build) | ||
required: false | ||
default: "6.9.0" # minimum version Babel CLI works | ||
node-version-run: | ||
description: Node.js version (run) | ||
required: true | ||
directory-example: | ||
description: Directory of example | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# Build | ||
- name: Install Node.js (build example) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version-build }} | ||
- name: Output versions | ||
run: | | ||
node -v | ||
npm -v | ||
shell: bash | ||
- name: Install dependencies (example) | ||
run: yarn | ||
working-directory: ./examples/${{ inputs.directory-example }} | ||
shell: bash | ||
- name: Build example | ||
run: npm run build | ||
working-directory: ./examples/${{ inputs.directory-example }} | ||
shell: bash | ||
|
||
# Run | ||
- name: Install Node.js (run example) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version-run }} | ||
- name: Output versions | ||
run: | | ||
node -v | ||
npm -v | ||
shell: bash | ||
- name: Run example | ||
run: node ./dist/index.js | ||
working-directory: ./examples/${{ inputs.directory-example }} | ||
shell: bash |
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,74 @@ | ||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
|
||
on: push | ||
name: Examples | ||
jobs: | ||
examples-cjs: | ||
name: Build and run examples (CommonJS) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- windows-latest | ||
- macos-latest | ||
- ubuntu-latest | ||
nodejs: | ||
- "4.0.0" # target version | ||
example: | ||
- "babel-cjs" | ||
- "ts-babel-cjs" | ||
- "ts-tsc-cjs" | ||
exclude: | ||
- os: windows-latest # not work "babel --extensions '.ts'" on Windows? | ||
example: "ts-babel-cjs" | ||
fail-fast: false | ||
steps: | ||
- name: Checkout source codes | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build plugin | ||
uses: ./.github/actions/build | ||
- name: Prune modules for build | ||
run: npm ci --only=production | ||
shell: bash | ||
|
||
- name: Run example | ||
uses: ./.github/actions/example | ||
with: | ||
node-version-run: ${{ matrix.nodejs }} | ||
directory-example: ${{ matrix.example }} | ||
|
||
examples-esm: | ||
name: Build and run examples (ES Modules) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- windows-latest | ||
- macos-latest | ||
- ubuntu-latest | ||
nodejs: | ||
- "12.17.0" # minimum version {"type": "module"} supports in package.json | ||
example: | ||
- "babel-esm" | ||
- "ts-babel-esm" | ||
- "ts-tsc-esm" | ||
exclude: | ||
- os: windows-latest # not work "babel --extensions '.ts'" on Windows? | ||
example: "ts-babel-esm" | ||
fail-fast: false | ||
steps: | ||
- name: Checkout source codes | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build plugin | ||
uses: ./.github/actions/build | ||
- name: Prune modules for build | ||
run: npm ci --only=production | ||
shell: bash | ||
|
||
- name: Run example | ||
uses: ./.github/actions/example | ||
with: | ||
node-version-run: ${{ matrix.nodejs }} | ||
directory-example: ${{ matrix.example }} |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.