gpt4 book ai didi

f# - 使用 F# 创建 SPA 静态无服务器应用程序

转载 作者:行者123 更新时间:2023-12-02 02:52:02 26 4
gpt4 key购买 nike

我想做的是用 F# 编写一个 SPA 应用程序。是否可以在没有完整工具的情况下使用 Fable,就像 F# 到 html+javascript 编译器一样?理想情况下,我希望能够将一个或多个 F# 文件编译成静态 html+javascript 标记,并将其从 F# 交互式直接发送到浏览器,而无需任何 Web 服务器。

典型的工作流程是:

1) Create new project from template

2) Modify project files

3) Build

4) Open browser and point to specific url

我想做的是(来自 F# interactive):

let html = Fable.compile([fileXYZ.fs])
do XPlot.Plotly.Html.showInBrowser html "pageid"

这可能吗?我该怎么做?

最佳答案

我过去曾提出过同样的要求,因为有时要求只是转译单个文件(例如 Azure DevOps 扩展)。

遗憾的是,目前的答案是“不”。

今天的问题仍然悬而未决:https://github.com/fable-compiler/Fable/issues/1369

人们已经构建了原型(prototype):https://github.com/TheAngryByrd/fantasy

但我认为此时您不能回答"is"。

希望对您有所帮助。

关于f# - 使用 F# 创建 SPA 静态无服务器应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51814164/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com