ESBuildMobile

module
v0.0.0-...-aca8a38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: MIT

README

ESBuildMobile

Swift and Kotlin ESBuild bindings for use on Android, iOS, and MacOS

Swift Example

import ESBuildMobileHelpers
import ESBuildMobile

let opts = EsbuildmobileTransformOptions()

// Set your desired JSX factory function
opts.setJSXFactory("exports.text")

do {
    // Transform JSX using the helper function
    let result = try transformJSX("""
    <text>Hello World!</text>
    """, options: opts)
    
    print("Result: ", result)
    
} catch let error as TransformError {
    switch error {
    case .transformationFailed(let nsError):
        print("Transformation failed with error: \(nsError)")
    }
} catch {
    print("An unexpected error occurred: \(error)")
}

Directories

Path Synopsis
lib

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL