Skip to content

typomedia/gobabel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gobabel - Babel CLI Transpiler

Go Report Card Go Reference GitHub release GitHub license

This is a simple CLI to transpile JavaScript code using Babel. It is written in Go and uses the goja-babel library.

Motivation

For lessgo I needed a toolchain command to transpile JavaScript code using Babel without the need of installing the Node.js runtime.

Install

go install github.com/typomedia/gobabel@latest

Flags

-s, --source string   Source folder
-t, --target string   Target folder
-p, --preset string   Babel preset [env, react, flow] (default "env")
-h, --help            help for gobabel

Example

gobabel -s less.js/packages/less/src/less/ -t dist/less/

Help

gobabel -h

Build

make

Cross compile

make cross

Copyright © 2024 Typomedia Foundation. All rights reserved.

About

Babel CLI Transpiler in Go

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors