Skip to content

Commit

Permalink
Do npm install in build
Browse files Browse the repository at this point in the history
  • Loading branch information
EmergentOrder committed Aug 30, 2024
1 parent 797b74f commit 2660fb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ install:
tar zxf $HOME/sbt.tgz -C $HOME
sudo rm /usr/local/bin/sbt
sudo ln -s $HOME/sbt/bin/sbt /usr/local/bin/sbt
script:
- cd backends/.js
- npm install
- cd ../..
script:
# - bash get_models.sh
- travis_wait 5 sbt test -J-Xmx5G
# - sbt docsJVM/mdoc
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ lazy val backends = (crossProject(JSPlatform, JVMPlatform)
// use Path.rebase to pair source files with target destination in crossTarget
val pairs = htmlFiles pair rebase(
src,
(Compile / target).value / "scala-3.5.1-RC2/scalajs-bundler/main/node_modules/onnxruntime-node/dist/types.d.ts"
(Compile / target).value / "../backends/.js/node_modules/onnxruntime-node/dist/types.d.ts"
)

// Copy files to source files to target
Expand Down Expand Up @@ -158,6 +158,7 @@ lazy val backends = (crossProject(JSPlatform, JVMPlatform)
_.withESVersion(org.scalajs.linker.interface.ESVersion.ES2021)
)),
externalNpm := {
Process("npm install", baseDirectory.value).!
Process("npm run", baseDirectory.value).!
baseDirectory.value
}
Expand Down

0 comments on commit 2660fb7

Please sign in to comment.