如何编译多个.fsx
使用寓言的文件?
我(天真地)尝试在 fable.config 文件中传递它们的数组,如下所示:
{
"outDir": "app",
"projFile":["app/index.fsx", "app/testmod.fsx"],
"sourceMaps": true,
"targets": {
"production": {
"sourceMaps": false
}
}
}
但收到警告:
ARG ERROR: TypeError: Path must be a string. Received [ 'app/index.fsx', 'app/testmod.fsx' ]
我知道我可以制作一个完整的 .fsproj 文件并将寓言编译器指向该文件,但仅仅为了添加引用而这样做似乎有点矫枉过正。
感觉我错过了一些非常简单的东西?
好吧,我真的错过了一些简单的事情!
真正非常简单的解决方案就是使用中的引用.fsx
文件本身,不用担心将 Fable 指向引用的文件。
索引.fsx:
module App
#load "testmod.fsx" //this reference is all thats needed!
那么我们就不需要里面的引用了寓言.config:
{
"outDir": "app",
"projFile":"app/index.fsx",
"sourceMaps": true,
"targets": {
"production": {
"sourceMaps": false
}
}
}
Note to self - try the simplest solution first before posting on Stack Overflow!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)