2016-04-03 49 views
1

耶索德快速入门建议我说:在耶索德开发中使用预编译的二进制

Follow the installation instructions for stack to get stack. 
Create a new scaffolded site: stack new my-project yesod-sqlite && cd my-project 
    NOTE: Use stack templates to see other available Yesod scaffoldings. 
Install the yesod command line tool: stack install yesod-bin cabal-install --install-ghc 
Build libraries: stack build 
Launch devel server: stack exec -- yesod devel 
View your Yesod site at http://localhost:3000/ 

然而stack install ..stack build要下载并编译〜200个软件包,并建立时间是不可接受的(约一小时)。

最重要的是,你的应用程序本身并不会编译到stack exec,如果我有很多像hamlet和persistent这样的TH东西,可能需要一些时间。

我认为最好让我的堆栈或cabal下载所有预编译的二进制文件,并通过runhaskellstack exec runhaskell运行我的开发站点,以缩短编译时间。所以这里是我的两个问题:

  1. 如何使用预编译的二进制文件进行堆栈和yesod安装?
  2. 如何在解释模式下运行后编辑ghci以重新加载源代码? yesod devel这样做,但它试图重新编译..
+1

对于它的价值,现在你已经安装了这些二进制文件'stack'将会重用它们以备将来安装。你是否期望做大量的从头安装? – MaxGabriel

回答

2

看看Yesod Web框架书的Deploying your Webapp一章。简而言之,有一个名为Keter的部署管理器,集成到yesod工具中,可用于部署已编译的应用程序。