Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0575dd1

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

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

‎Plugins/BridgeJS/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# BridgeJS
22

3+
> Important: This feature is still experimental, and the API may change frequently. Use at your own risk
4+
> with `JAVASCRIPTKIT_EXPERIMENTAL_BRIDGEJS=1` environment variable.
5+
36
> Note: This documentation is intended for JavaScriptKit developers, not JavaScriptKit users.
47
58
## Overview

‎Plugins/BridgeJS/Sources/BridgeJSCommandPlugin/BridgeJSCommandPlugin.swift‎

Lines changed: 1 addition & 1 deletion
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
}

‎Plugins/PackageToJS/Sources/PackageToJS.swift‎

Lines changed: 5 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /