Skip to content

Commit

Permalink
Add back fable-libray/package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsogarciacaro committed Sep 30, 2021
1 parent f4d2ee7 commit 1895f4d
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 227 deletions.
4 changes: 1 addition & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
{
"args": [
"${workspaceFolder}/build/tests",
"-r",
"esm",
"--reporter",
"dot",
"--timeout",
Expand Down Expand Up @@ -64,7 +62,7 @@
"request": "launch",
"name": "Run bench-compiler JS tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["out-tests", "-r", "esm"],
"args": ["out-tests"],
"cwd": "${workspaceRoot}/src/fable-standalone/test/bench-compiler"
},
{
Expand Down
9 changes: 4 additions & 5 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module Util =
runFableWithArgs projectDir []

let runMocha testDir =
runNpmScript "mocha" [$"{testDir} -r esm --reporter dot -t 10000"]
runNpmScript "mocha" [$"{testDir} --reporter dot -t 10000"]

let resolveDir dir =
__SOURCE_DIRECTORY__ </> dir
Expand Down Expand Up @@ -131,8 +131,7 @@ let buildLibraryWithOptions (opts: {| watch: bool |}) =
runInDir baseDir "npm install"
makeDirRecursive buildDir

// package.json is causing issues so disable it for now #2549
// copyFile (projectDir </> "package.json") buildDir
copyFile (projectDir </> "package.json") buildDir

if opts.watch then
Async.Parallel [
Expand Down Expand Up @@ -191,7 +190,7 @@ let testJsFast() =
let fableJs = "./src/fable-compiler-js/src/app.fs.js"
let testProj = "tests/Main/Fable.Tests.fsproj"
let buildDir = "build/tests-js"
run $"node --eval \"require('esm')(module)('{fableJs}')\" {fableJs} {testProj} {buildDir}"
run $"node {fableJs} {testProj} {buildDir}"
runMocha buildDir


Expand Down Expand Up @@ -414,7 +413,7 @@ let testRepos() =
let repos = [
"https://github.com/alfonsogarciacaro/FsToolkit.ErrorHandling:update-fable-3", "npm i && npm test"
"https://github.com/fable-compiler/fable-promise:master", "npm i && npm test"
"https://github.com/alfonsogarciacaro/Thoth.Json:nagareyama", "dotnet paket restore && npm i && dotnet fable tests -o tests/bin --run mocha -r esm tests/bin"
"https://github.com/alfonsogarciacaro/Thoth.Json:nagareyama", "dotnet paket restore && npm i && dotnet fable tests -o tests/bin --run mocha tests/bin"
"https://github.com/alfonsogarciacaro/FSharp.Control.AsyncSeq:nagareyama", "cd tests/fable && npm i && npm test"
"https://github.com/alfonsogarciacaro/Fable.Extras:nagareyama", "dotnet paket restore && npm i && npm test"
"https://github.com/alfonsogarciacaro/Fable.Jester:nagareyama", "npm i && npm test"
Expand Down
Loading

0 comments on commit 1895f4d

Please sign in to comment.