Skip to content

Commit b7a5876

Browse files
Merge pull request #2157 from fable-compiler/nagareyama-standalone
Fix fable-compiler-js
2 parents bacc5e2 + be9d39e commit b7a5876

File tree

24 files changed

+345
-353
lines changed

24 files changed

+345
-353
lines changed

.vscode/launch.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,14 @@
101101
"cwd": "${workspaceFolder}/src/fable-standalone/test/bench-compiler"
102102
},
103103
{
104+
// src/fable-compiler-js/ tests/Main/Fable.Tests.fsproj build/tests-js
105+
104106
"type": "node",
105107
"request": "launch",
106108
"name": "transform tests to JS",
107-
"program": "${workspaceRoot}/src/fable-standalone/test/bench-compiler/transform.js",
108-
"args": ["${workspaceRoot}/tests/Main/Fable.Tests.fsproj", "out-tests", "${workspaceRoot}/build/fable-library", "--commonjs"],
109-
"cwd": "${workspaceRoot}/src/fable-standalone/test/bench-compiler"
109+
"program": "${workspaceRoot}/build/fable-compiler-js/src/fable-compiler-js/src/app.fs.js",
110+
"args": ["${workspaceRoot}/tests/Main/Fable.Tests.fsproj", "build/tests-js"],
111+
"stopOnEntry": true
110112
},
111113
{
112114
"type": "node",

Fable.sln

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fable.Tests.Spaces", "tests
1919
EndProject
2020
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fable.Tests.External", "tests_external\Fable.Tests.External.fsproj", "{F5DEF871-BEEB-40A1-BBF1-7A19BD8B6185}"
2121
EndProject
22-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ASTViewer", "src\tools\ASTViewer\ASTViewer.fsproj", "{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}"
23-
EndProject
2422
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fable.Library", "src\fable-library\Fable.Library.fsproj", "{C6B876C9-8410-4FFF-AD89-46539E54253C}"
2523
EndProject
2624
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{54BD4E45-0C5B-455A-9C7C-37736B216015}"
2725
ProjectSection(SolutionItems) = preProject
2826
build.fsx = build.fsx
2927
EndProjectSection
3028
EndProject
29+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fable.Standalone", "src\fable-standalone\src\Fable.Standalone.fsproj", "{D5817BB2-0664-4E0A-BBD1-06615D705E99}"
30+
EndProject
31+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Worker", "src\fable-standalone\src\Worker\Worker.fsproj", "{8CF1FD4C-0170-4E86-AD26-43012ED12929}"
32+
EndProject
33+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fable-compiler-js", "src\fable-compiler-js\src\fable-compiler-js.fsproj", "{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}"
34+
EndProject
3135
Global
3236
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3337
Debug|Any CPU = Debug|Any CPU
@@ -134,18 +138,6 @@ Global
134138
{F5DEF871-BEEB-40A1-BBF1-7A19BD8B6185}.Release|x64.Build.0 = Release|Any CPU
135139
{F5DEF871-BEEB-40A1-BBF1-7A19BD8B6185}.Release|x86.ActiveCfg = Release|Any CPU
136140
{F5DEF871-BEEB-40A1-BBF1-7A19BD8B6185}.Release|x86.Build.0 = Release|Any CPU
137-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
138-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
139-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Debug|x64.ActiveCfg = Debug|Any CPU
140-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Debug|x64.Build.0 = Debug|Any CPU
141-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Debug|x86.ActiveCfg = Debug|Any CPU
142-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Debug|x86.Build.0 = Debug|Any CPU
143-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
144-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Release|Any CPU.Build.0 = Release|Any CPU
145-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Release|x64.ActiveCfg = Release|Any CPU
146-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Release|x64.Build.0 = Release|Any CPU
147-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Release|x86.ActiveCfg = Release|Any CPU
148-
{D8C8FBCB-54AF-49C3-93B1-5460668E32EC}.Release|x86.Build.0 = Release|Any CPU
149141
{C6B876C9-8410-4FFF-AD89-46539E54253C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
150142
{C6B876C9-8410-4FFF-AD89-46539E54253C}.Debug|Any CPU.Build.0 = Debug|Any CPU
151143
{C6B876C9-8410-4FFF-AD89-46539E54253C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -158,6 +150,42 @@ Global
158150
{C6B876C9-8410-4FFF-AD89-46539E54253C}.Release|x64.Build.0 = Release|Any CPU
159151
{C6B876C9-8410-4FFF-AD89-46539E54253C}.Release|x86.ActiveCfg = Release|Any CPU
160152
{C6B876C9-8410-4FFF-AD89-46539E54253C}.Release|x86.Build.0 = Release|Any CPU
153+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
154+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Debug|Any CPU.Build.0 = Debug|Any CPU
155+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Debug|x64.ActiveCfg = Debug|Any CPU
156+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Debug|x64.Build.0 = Debug|Any CPU
157+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Debug|x86.ActiveCfg = Debug|Any CPU
158+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Debug|x86.Build.0 = Debug|Any CPU
159+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Release|Any CPU.ActiveCfg = Release|Any CPU
160+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Release|Any CPU.Build.0 = Release|Any CPU
161+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Release|x64.ActiveCfg = Release|Any CPU
162+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Release|x64.Build.0 = Release|Any CPU
163+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Release|x86.ActiveCfg = Release|Any CPU
164+
{D5817BB2-0664-4E0A-BBD1-06615D705E99}.Release|x86.Build.0 = Release|Any CPU
165+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
166+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Debug|Any CPU.Build.0 = Debug|Any CPU
167+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Debug|x64.ActiveCfg = Debug|Any CPU
168+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Debug|x64.Build.0 = Debug|Any CPU
169+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Debug|x86.ActiveCfg = Debug|Any CPU
170+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Debug|x86.Build.0 = Debug|Any CPU
171+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Release|Any CPU.ActiveCfg = Release|Any CPU
172+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Release|Any CPU.Build.0 = Release|Any CPU
173+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Release|x64.ActiveCfg = Release|Any CPU
174+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Release|x64.Build.0 = Release|Any CPU
175+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Release|x86.ActiveCfg = Release|Any CPU
176+
{8CF1FD4C-0170-4E86-AD26-43012ED12929}.Release|x86.Build.0 = Release|Any CPU
177+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
178+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Debug|Any CPU.Build.0 = Debug|Any CPU
179+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Debug|x64.ActiveCfg = Debug|Any CPU
180+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Debug|x64.Build.0 = Debug|Any CPU
181+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Debug|x86.ActiveCfg = Debug|Any CPU
182+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Debug|x86.Build.0 = Debug|Any CPU
183+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Release|Any CPU.ActiveCfg = Release|Any CPU
184+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Release|Any CPU.Build.0 = Release|Any CPU
185+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Release|x64.ActiveCfg = Release|Any CPU
186+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Release|x64.Build.0 = Release|Any CPU
187+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Release|x86.ActiveCfg = Release|Any CPU
188+
{C9A73E73-8ED5-4E5F-9E7A-7E4511F94858}.Release|x86.Build.0 = Release|Any CPU
161189
EndGlobalSection
162190
GlobalSection(SolutionProperties) = preSolution
163191
HideSolutionNode = FALSE

build.fsx

Lines changed: 100 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -111,39 +111,54 @@ let buildLibraryTs() =
111111
runInDir buildDirTs ("npx tsc --outDir ../../" + buildDirJs)
112112

113113
let quicktest () =
114-
runFableWithArgs "src/quicktest" ["--exclude Fable.Core"]
114+
runFableWithArgs "src/quicktest" [
115+
"--force-pkgs"
116+
"--exclude Fable.Core"
117+
]
115118
run "npx tsc src/quicktest/QuickTest.fs.js --allowJs -m commonJs --outDir build/quicktest"
116119
run "node build/quicktest/src/quicktest/QuickTest.fs.js"
117120

118-
let buildCompilerJs() =
119-
let projectDir = "src/fable-compiler-js"
120-
let buildDir = "build/fable-compiler-js"
121-
cleanDirs [buildDir; projectDir </> "dist"]
122-
runFableWithArgs projectDir ["--outDir " + buildDir + "/out"]
123-
run (sprintf "npx rollup %s/out/app.js --file %s/dist/app.js --format umd --name Fable" buildDir projectDir)
124-
run (sprintf "npx terser %s/dist/app.js -o %s/dist/app.min.js --mangle --compress" projectDir projectDir)
121+
let compileFcs() =
122+
runFableWithArgs "src/fable-standalone/src" [
123+
"--force-pkgs"
124+
"--typed-arrays"
125+
"--define FX_NO_CORHOST_SIGNER"
126+
"--define FX_NO_LINKEDRESOURCES"
127+
"--define FX_NO_PDB_READER"
128+
"--define FX_NO_PDB_WRITER"
129+
"--define FX_NO_WEAKTABLE"
130+
"--define FX_REDUCED_EXCEPTIONS"
131+
"--define NO_COMPILER_BACKEND"
132+
"--define NO_EXTENSIONTYPING"
133+
"--define NO_INLINE_IL_PARSER"
134+
]
125135

126136
let buildStandalone() =
127137
let buildDir = "build/fable-standalone"
128138
let libraryDir = "build/fable-library"
129-
let projectDir = "src/fable-standalone"
139+
let projectDir = "src/fable-standalone/src"
130140
let distDir = "src/fable-standalone/dist"
131141
if pathExists libraryDir |> not then
132142
buildLibrary()
133143

134144
// cleanup
135145
cleanDirs [buildDir; distDir]
136146
makeDirRecursive distDir
147+
137148
// build
138-
runFableWithArgs projectDir ["--outDir " + buildDir + "/out-bundle"]
139-
runFableWithArgs (projectDir + "/src/Worker") ["--outDir " + buildDir + "/out-worker"]
149+
compileFcs()
150+
runFableWithArgs (projectDir + "/Worker") [
151+
"--force-pkgs"
152+
]
153+
140154
// bundle
141-
run (sprintf "npx rollup %s/out-bundle/Main.js --file %s/bundle.js --format umd --name __FABLE_STANDALONE__" buildDir buildDir)
142-
run (sprintf "npx rollup %s/out-worker/Worker.js --file %s/worker.js --format esm" buildDir buildDir)
155+
run (sprintf "npx rollup %s/Main.fs.js --file %s/bundle.js --format umd --name __FABLE_STANDALONE__" projectDir buildDir)
156+
run (sprintf "npx rollup %s/Worker/Worker.fs.js --file %s/worker.js --format esm" projectDir buildDir)
157+
143158
// minimize
144159
run (sprintf "npx terser %s/bundle.js -o %s/bundle.min.js --mangle --compress" buildDir distDir)
145160
// run (sprintf "npx terser %s/worker.js -o %s/worker.min.js --mangle --compress" buildDir distDir)
146-
run (sprintf "npx webpack --entry ./%s/worker.js --output ./%s/worker.min.js --config ./%s/worker.config.js" buildDir distDir projectDir)
161+
run (sprintf "npx webpack --entry ./%s/worker.js --output ./%s/worker.min.js --config ./%s/../worker.config.js" buildDir distDir projectDir)
147162

148163
// print bundle size
149164
fileSizeInBytes (distDir </> "bundle.min.js") / 1000 |> printfn "Bundle size: %iKB"
@@ -153,15 +168,15 @@ let buildStandalone() =
153168
let libraryTarget = distDir </> "fable-library"
154169
copyDirRecursive libraryDir libraryTarget
155170
// These files will be used in the browser, so make sure the import paths include .js extension
156-
let reg = Regex(@"^import (.*"".*)("".*)$", RegexOptions.Multiline)
157-
getFullPathsInDirectoryRecursively libraryTarget
158-
|> Array.filter (fun file -> file.EndsWith(".js"))
159-
|> Array.iter (fun file ->
160-
reg.Replace(readFile file, fun m ->
161-
let fst = m.Groups.[1].Value
162-
if fst.EndsWith(".js") then m.Value
163-
else sprintf "import %s.js%s" fst m.Groups.[2].Value)
164-
|> writeFile file)
171+
// let reg = Regex(@"^import (.*"".*)("".*)$", RegexOptions.Multiline)
172+
// getFullPathsInDirectoryRecursively libraryTarget
173+
// |> Array.filter (fun file -> file.EndsWith(".js"))
174+
// |> Array.iter (fun file ->
175+
// reg.Replace(readFile file, fun m ->
176+
// let fst = m.Groups.[1].Value
177+
// if fst.EndsWith(".js") then m.Value
178+
// else sprintf "import %s.js%s" fst m.Groups.[2].Value)
179+
// |> writeFile file)
165180

166181
// Bump version
167182
// let compilerVersion = Publish.loadReleaseVersion "src/fable-compiler"
@@ -172,43 +187,76 @@ let buildStandalone() =
172187
// (if comMajor > staMajor || comMinor > staMinor then compilerVersion
173188
// else sprintf "%i.%i.%i%s" staMajor staMinor (staPatch + 1) comPrerelease)
174189

175-
let testJs() =
190+
let buildCompilerJs() =
191+
compileFcs()
192+
176193
let projectDir = "src/fable-compiler-js"
177-
let buildDir = "build/tests-js"
178-
if not (pathExists "build/fable-standalone") then
179-
buildStandalone()
180-
if not (pathExists "build/fable-compiler-js") then
181-
buildCompilerJs()
194+
runFableWithArgs (projectDir </> "src") [
195+
"--force-pkgs"
196+
"--exclude Fable.Core"
197+
]
182198

183-
cleanDirs [buildDir]
199+
cleanDirs [projectDir </> "dist"]
200+
// run (sprintf "npx rollup %s/src/app.fs.js --file %s/dist/app.js --format umd --name Fable" projectDir projectDir)
201+
// run (sprintf "npx terser %s/dist/app.js -o %s/dist/app.min.js --mangle --compress" projectDir projectDir)
184202

185-
// Link fable-compiler-js to local packages
186-
runInDir projectDir "npm link ../fable-metadata"
187-
runInDir projectDir "npm link ../fable-standalone"
203+
// Compile to commonjs modules
204+
runTypescript "src/fable-compiler-js"
205+
// Copy fable-library
206+
copyDirRecursive ("build/fable-library") (projectDir </> "dist/fable-library")
207+
// Copy fable-metadata
208+
copyDirRecursive ("src/fable-metadata/lib") (projectDir </> "dist/fable-metadata")
188209

189-
// Test fable-compiler-js locally
190-
run ("node " + projectDir + " tests/Main/Fable.Tests.fsproj " + buildDir + " --commonjs")
191-
run ("npx mocha " + buildDir + " --reporter dot -t 10000")
192-
// and another test
193-
runInDir "src/fable-compiler-js/test" "node .. test_script.fsx --commonjs"
194-
runInDir "src/fable-compiler-js/test" "node bin/test_script.js"
210+
let compileAndRunTests(compileTests) =
211+
// TODO: "rm tests/**/*.fs.js"
212+
compileTests()
213+
cleanDirs ["build/tests"]
214+
runTypescript "tests"
215+
run "npx mocha build/tests/tests/Main --reporter dot -t 10000"
195216

196-
// Unlink local packages after test
197-
runInDir projectDir "npm unlink ../fable-metadata && cd ../fable-metadata && npm unlink"
198-
runInDir projectDir "npm unlink ../fable-standalone && cd ../fable-standalone && npm unlink"
217+
let testJs() =
218+
buildCompilerJs()
219+
compileAndRunTests(fun () ->
220+
run "node src/fable-compiler-js tests/Main/Fable.Tests.fsproj")
221+
222+
// let projectDir = "src/fable-compiler-js"
223+
// let buildDir = "build/tests-js"
224+
// if not (pathExists "build/fable-standalone") then
225+
// buildStandalone()
226+
// if not (pathExists "build/fable-compiler-js") then
227+
// buildCompilerJs()
228+
229+
// cleanDirs [buildDir]
230+
231+
// // Link fable-compiler-js to local packages
232+
// runInDir projectDir "npm link ../fable-metadata"
233+
// runInDir projectDir "npm link ../fable-standalone"
234+
235+
// // Test fable-compiler-js locally
236+
// run ("node " + projectDir + " tests/Main/Fable.Tests.fsproj " + buildDir + " --commonjs")
237+
// run ("npx mocha " + buildDir + " --reporter dot -t 10000")
238+
// // and another test
239+
// runInDir "src/fable-compiler-js/test" "node .. test_script.fsx --commonjs"
240+
// runInDir "src/fable-compiler-js/test" "node bin/test_script.js"
241+
242+
// // Unlink local packages after test
243+
// runInDir projectDir "npm unlink ../fable-metadata && cd ../fable-metadata && npm unlink"
244+
// runInDir projectDir "npm unlink ../fable-standalone && cd ../fable-standalone && npm unlink"
199245

200246
let test() =
201-
if pathExists "build/fable-library" |> not then
202-
buildLibrary()
247+
compileAndRunTests(fun () ->
248+
if pathExists "build/fable-library" |> not then
249+
buildLibrary()
203250

204-
runFableWithArgs "tests/Main" ["--exclude Fable.Core"; "--force-pkgs"]
205-
runTypescript "tests"
206-
run "npx mocha build/tests/tests/Main --reporter dot -t 10000"
207-
runInDir "tests/Main" "dotnet run"
251+
runFableWithArgs "tests/Main" [
252+
"--force-pkgs"
253+
"--exclude Fable.Core"
254+
]
255+
)
208256

209-
// TODO: Temporarily deactivated to get green builds
210-
// if envVarOrNone "APPVEYOR" |> Option.isSome then
211-
// testJs()
257+
runInDir "tests/Main" "dotnet run"
258+
if envVarOrNone "APPVEYOR" |> Option.isSome then
259+
testJs()
212260

213261
let coverage() =
214262
// report converter
@@ -327,6 +375,7 @@ match argsLower with
327375
| ("fable-library-ts"|"library-ts")::_ -> buildLibraryTs()
328376
| ("fable-compiler-js"|"compiler-js")::_ -> buildCompilerJs()
329377
| ("fable-standalone"|"standalone")::_ -> buildStandalone()
378+
| "fcs"::_ -> compileFcs()
330379
| "download-standalone"::_ -> downloadStandalone()
331380
| "publish"::restArgs -> publishPackages restArgs
332381
| "github-release"::_ ->

package-lock.json

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Fable.Cli/Entry.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Arguments:
3636
--extension Extension for generated JS files (default .fs.js)
3737
--verbose Print more info during compilation
3838
--exclude Skip Fable compilation for files containing the pattern
39+
--typed-arrays Compile numeric arrays to JS typed arrays
3940
--force-pkgs Force a new copy of package sources into `.fable` folder
4041
4142
"""

src/Fable.Cli/Main.fs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,14 @@ let rec startCompilation (changes: Set<string>) (state: State) = async {
294294
// TODO: Fail already if F# compilation gives error?
295295
let logs = getFSharpErrorLogs parsed.Project
296296

297-
// TODO: Log skipped files in verbose mode
298297
let filesToCompile =
299-
match state.CliArgs.Exclude with
300-
| Some exclude -> filesToCompile |> Array.filter (fun x -> not(x.Contains(exclude))) // Use regex?
301-
| None -> filesToCompile
298+
filesToCompile
299+
|> Array.filter (fun x -> x.EndsWith(".fs"))
300+
|> fun filesToCompile ->
301+
// TODO: Log skipped files in verbose mode
302+
match state.CliArgs.Exclude with
303+
| Some exclude -> filesToCompile |> Array.filter (fun x -> not(x.Contains(exclude))) // Use regex?
304+
| None -> filesToCompile
302305

303306
let! logs, watchDependencies =
304307
filesToCompile

src/Fable.Transforms/Global/Fable.Core.fs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
namespace Fable.Core
22

3+
open System
4+
35
// Common types with Fable.Core
46

57
type CaseRules =
@@ -13,7 +15,7 @@ type CaseRules =
1315
/// FooBar -> foo-bar
1416
| KebabCase = 4
1517

16-
//[<AttributeUsage(AttributeTargets.Class)>]
17-
//type StringEnumAttribute() =
18-
// inherit Attribute()
19-
// new (caseRules: CaseRules) = StringEnumAttribute()
18+
[<AttributeUsage(AttributeTargets.Class)>]
19+
type StringEnumAttribute() =
20+
inherit Attribute()
21+
new (caseRules: CaseRules) = StringEnumAttribute()

src/fable-compiler-js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env node
2-
require("./dist/app.js");
2+
require("./dist/src/fable-compiler-js/src/app.fs.js");

0 commit comments

Comments
 (0)