Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Vincent Munier
    @vmunier
    scripts.scala.html calls all the templates (including jsdeps.scala.html). More info in the README.md.
    Barry Kern
    @bskern
    thanks got it working !
    Konstantin Perikov
    @MysterionRise
    hi, guys. I'm trying to play with this project, but it's already some kinda of adopted version of mine. And recently, I've start to think about adding tests :)
    anybody faced this issue, while running sbt test?
    [error] (client/test:loadedTestFrameworks) java.io.IOException: Cannot run program "node": error=2, No such file or directory
    Sébastien Doeraene
    @sjrd
    @MysterionRise Looks like node is not installed.
    Konstantin Perikov
    @MysterionRise
    but, why do I need node? I never use it in my code? and more importantly what is node?:) Node.js?
    Sébastien Doeraene
    @sjrd
    Yes, it's Node.js.
    It is used to run the tests.
    We use Node.js because it's simply the best stand-alone JS interpreter.
    Konstantin Perikov
    @MysterionRise
    mmm, i see
    curious, why play-with-scalajs-example runs smoothly without Node.js
    when i type sbt test
    Sébastien Doeraene
    @sjrd
    Maybe because it still uses a version of Scala.js where the default was to use Rhino instead of Node.js
    Konstantin Perikov
    @MysterionRise
    i see, now I got the point. Thanks, Sebastien.
    Vincent Munier
    @vmunier
    @MysterionRise there are no Scala.js tests in play-with-scalajs-example, I think that's why you don't see any error with sbt test.
    Konstantin Perikov
    @MysterionRise
    @vmunier funny thing, that I do not have scala.js tests in my app as well :)
    William Harvey
    @harveywi
    Hi Everyone! I cloned the git repo, and I want to change the project name of the "client" project to be something different (e.g., "client-foo"). I edit the build.sbt file and add name := "client-foo" under the lazy val client = ... section, and I change (or don't change! it doesn't matter) the @scalajs.html.scripts stuff in server/app/views/main.scala.html to be "client-foo". However, when I compile and run the project, the file "client-foo.fastopt.js" is not generated, and consequently no javascript runs on the rendered HTML page. Any idea what I need to do to simply change the name := "whatever" value for the client project?
    The reason why I want to do this is so that I do not have a million Eclipse projects with the name "client".
    Vincent Munier
    @vmunier
    Hi @harveywi, do a sbt> client/clean and try again.
    William Harvey
    @harveywi
    @vmunier Thank you! It worked!
    zerodrift
    @zerodrift
    anyone know how to hook this up to a (postgres) db? maybe high-level steps?
    nafg
    @nafg
    @zerodrift have you hit a particular problem? What library do you want to use for db access?
    zerodrift
    @zerodrift
    i just dont know where to start. i have slick working and streaming from my postgres db
    in json
    wanted to get that stream to display on webpage
    @nafg ^^^
    nafg
    @nafg
    @zerodrift have you read Play docs?
    zerodrift
    @zerodrift
    @nafg i did...been staring at it for past week
    nafg
    @nafg
    @zerodrift can you expand your question more then?
    zerodrift
    @zerodrift
    @everyone anyone see this error before?
    ownloads/play-with-scalajs-example-master/build.sbt:5: error: reference to scalaJSProjects is ambiguous;
    it is imported twice in the same scope by
    import _root_.webscalajs.WebScalaJS.autoImport._
    and import _root_.playscalajs.PlayScalaJS.autoImport._
      scalaJSProjects := Seq(client),
      ^
    sbt.compiler.EvalException: Type error in expression
    [error] sbt.compiler.EvalException: Type error in expression
    just downloaded and tried to open the proje from github
    using INtellij 2016.3.5
    Daniel Gordon
    @DanielGGordon
    Hey there - this project looks interesting.
    I'm trying to create a REALLY SIMPLE single page website that displays information about files in an s3 bucket.
    I thought it would be nice to avoid writing javascript. Would this be a good place to start? i have not used play or scala.js
    Vincent Munier
    @vmunier
    Hi, you may not need a backend server for a simple single page website that displays info from an s3 bucket. So, you could start with just Scala.js and not use Play for the time being.
    Daniel Gordon
    @DanielGGordon
    I see
    So I should use a different example project?
    Vincent Munier
    @vmunier
    You could start with https://github.com/sjrd/scala-js-example-app
    If you actually need a Play server, then yes use https://github.com/vmunier/play-scalajs.g8
    nafg
    @nafg
    You probably don't want to access S3 buckets from the frontend, unless you want them to be (effectively) world-readable.
    So you want some kind of backend.
    Jean-Philippe Pellet
    @jppellet
    Hello, thanks for this template, which has proven super helpful for me. Question: is there a way not to compile the Scala.js part when running console in the server project?
    Jean-Philippe Pellet
    @jppellet
    As far as I can tell, it's effectively useless while taking quite some time.
    Vincent Munier
    @vmunier
    Hi, I am not aware of a proper workaround for this
    console triggers sbt-web's pipelineStages, which includes scalaJSPipeline. sbt-web adds the output files produced by pipelineStages (i.e. Scala.js output files for scalaJSPipeline) to the server's classpath.
    I think console triggers sbt-web's pipelineStages, so that one can read the classpath and access the Scala.js output files from the console, should you ever need that.
    To lower the time it takes to compile, make sure that fastOptJS is executed and not fullOptJS, by either adding console to the dev commands devCommands in scalaJSPipeline += "console", or setting isDevMode in scalaJSPipeline := true to always have the dev mode enabled
    Jean-Philippe Pellet
    @jppellet
    Nice suggestion, thanks. Would the latter still use fullOptJs in dist, for instance?
    Jean-Philippe Pellet
    @jppellet
    OK, I've just tried devCommands in scalaJSPipeline += "console", which works like you described and indeed saves a few minutes—always nice!
    Thanks again
    Vincent Munier
    @vmunier
    I am glad it helps! :+1: