Skip to content

Transpile javascript code with Babel 7 to make it cross-browser compatible.

License

Notifications You must be signed in to change notification settings

Fyresite/transpiler-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transpiler-JS Action

Package Managers

License

MIT License

Version

GitHub Release

Github action to transpile javascript code to make it cross-browser compatible, using @babel/cli, @babel/core and @babel/preset-env packages.

Usage

Here the target branch is master. You need to checkout your repository so the ES2015 Trasnpiler job can access it. Then, you can auto-commit the files to the repository if desired.

name: Transpiler-JS Workflow
on:
  push:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      # Checks-out your repository
      - uses: actions/checkout@v2
        with:
          ref: ${{ github.ref }}
          
      # Job for transpiler the code
      - name: 'Transpiler-JS Action'
        uses: jossydevers/[email protected]
        with:
          # If the typename is specified, the transpilation result file will be as follows path/filename.{tipename}.js
          # By default the value is 'release'
          typename: 'release' # (OPTIONAL)
          # Directory in which to start searching for files to transpile
          # By default the entire repository is transpiled
          directory: 'src/' # (OPTIONAL)
          # Directory where the transpilation result will be stored
          # By default each transpiled file is saved in the folder next to the original file
          output: 'transpile/' # (OPTIONAL)
          
      # Auto-commit to repository
      - uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: 'Github Action : Code Transpiled'
          branch: ${{ github.ref }}

About

Transpile javascript code with Babel 7 to make it cross-browser compatible.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 92.7%
  • Dockerfile 7.3%