Skip to content

Commit dbc6234

Browse files
[BridgeJS] Hide it behind an experimental feature flag
1 parent 5c596cb commit dbc6234

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: Plugins/BridgeJS/Sources/BridgeJSCommandPlugin/BridgeJSCommandPlugin.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct BridgeJSCommandPlugin: CommandPlugin {
2727
Generated code will be placed in the target's 'Generated' directory.
2828
2929
OPTIONS:
30-
--target <target> Specify target(s) to generate bridge code for. If omitted,
30+
--target <target> Specify target(s) to generate bridge code for. If omitted,
3131
generates for all targets with JavaScriptKit dependency.
3232
"""
3333
}

Diff for: Plugins/PackageToJS/Sources/PackageToJS.swift

+5
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,11 @@ struct PackagingPlanner {
564564
packageInputs.append(packageJsonTask)
565565

566566
if exportedSkeletons.count > 0 || importedSkeletons.count > 0 {
567+
if ProcessInfo.processInfo.environment["JAVASCRIPTKIT_EXPERIMENTAL_BRIDGEJS"] == nil {
568+
fatalError(
569+
"BridgeJS is still an experimental feature. Set the environment variable JAVASCRIPTKIT_EXPERIMENTAL_BRIDGEJS=1 to enable."
570+
)
571+
}
567572
let bridgeJs = outputDir.appending(path: "bridge.js")
568573
let bridgeDts = outputDir.appending(path: "bridge.d.ts")
569574
packageInputs.append(

0 commit comments

Comments
 (0)