Created
November 2, 2015 09:19
-
-
Save Kimserey/86c9fc26132e187efd84 to your computer and use it in GitHub Desktop.
Error while building with FAKE script. `ConfigMacro: error: No default constructor`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
color | |
cls | |
packages\FAKE.4.7.2\tools\FAKE.exe build.fsx %* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------- | |
// FAKE build script | |
// -------------------------------------------------------------------------------------- | |
#r "packages/FAKE.4.7.2/tools/FakeLib.dll" | |
open System | |
open System.IO | |
open System.Diagnostics | |
open Fake | |
let buildDir = "./MacroTest/build" | |
let projFile = !! "./MacroTest/MacroTest.fsproj" | |
Target "build" (fun () -> | |
MSBuildDebug buildDir "Build" projFile | |
|> Log "Output - " | |
) | |
Target "default" DoNothing | |
"build" | |
==> "default" | |
RunTargetOrDefault "default" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MacroTest | |
open WebSharper | |
open WebSharper.JavaScript | |
open WebSharper.JQuery | |
open WebSharper.UI.Next | |
open WebSharper.UI.Next.Client | |
open WebSharper.UI.Next.Html | |
open WebSharper.Core.Quotations | |
open WebSharper.Core.JavaScript.Core | |
open WebSharper.Core.Macros | |
open WebSharper.Core.Reflection.Type | |
module Macro = | |
type ConfigMacro() = | |
interface IMacro with | |
member this.Translate(q, tr) = !~ (Literal.String "Test") | |
[<Macro(typeof<ConfigMacro>)>] | |
let Config () = X<string> | |
[<JavaScript>] | |
module Client = | |
let Main = | |
[ | |
h1 [text (Macro.Config ())] :> Doc | |
] | |
|> Doc.Concat | |
|> Doc.RunById "main" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>MacroTest</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link rel="stylesheet" type="text/css" href="Content/MacroTest.css" /> | |
<script type="text/javascript" src="Content/MacroTest.head.js"></script> | |
</head> | |
<body> | |
<div id="main"></div> | |
<script type="text/javascript" src="Content/MacroTest.min.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment