使用 F# 创建 SPA 静态无服务器应用程序
Create a SPA static serverless application with F#
我想做的是用 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 扩展)。
遗憾的是,当前答案是 "no"。
今天的问题仍然开放:https://github.com/fable-compiler/Fable/issues/1369
人们已经构建了原型:https://github.com/TheAngryByrd/fantasy
但我认为你现在不能用 "yes" 来回答。
希望对您有所帮助。
我想做的是用 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 扩展)。
遗憾的是,当前答案是 "no"。
今天的问题仍然开放:https://github.com/fable-compiler/Fable/issues/1369
人们已经构建了原型:https://github.com/TheAngryByrd/fantasy
但我认为你现在不能用 "yes" 来回答。
希望对您有所帮助。