diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-22 17:12:41 +0800 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-22 17:38:45 +0800 |
commit | 63d77017a205a394e604ec9f943d0ef6d2511ef4 (patch) | |
tree | 072287c838bdd75373c959724e7025c2a404845c /examples | |
parent | 66b668b9cdcefcbdb5db1b3e8a0d9adb08b608ff (diff) | |
download | cbt-63d77017a205a394e604ec9f943d0ef6d2511ef4.tar.gz cbt-63d77017a205a394e604ec9f943d0ef6d2511ef4.tar.bz2 cbt-63d77017a205a394e604ec9f943d0ef6d2511ef4.zip |
refactor scalajs to make use of nested builds for scoping
Diffstat (limited to 'examples')
-rw-r--r-- | examples/scalajs-react-example/README.md | 7 | ||||
-rw-r--r-- | examples/scalajs-react-example/js/build/build.scala | 5 | ||||
-rw-r--r-- | examples/scalajs-react-example/server/public/index.html | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/examples/scalajs-react-example/README.md b/examples/scalajs-react-example/README.md index 74e015a..82936eb 100644 --- a/examples/scalajs-react-example/README.md +++ b/examples/scalajs-react-example/README.md @@ -1,11 +1,12 @@ Compilation instructions ------------------------------------------- -1. `cbt fastOptJS` +1. `cd js` +2. `cbt compile` or `cbt fullOpt.compile` Execution instructions ------------------------------------------- -1. `cd server` +1. `cd ../server` 2. `npm install` 3. `node app.js` -4. Go to http://localhost:3000 in a browser
\ No newline at end of file +4. Go to http://localhost:3000 in a browser diff --git a/examples/scalajs-react-example/js/build/build.scala b/examples/scalajs-react-example/js/build/build.scala index f5fe33f..6db866b 100644 --- a/examples/scalajs-react-example/js/build/build.scala +++ b/examples/scalajs-react-example/js/build/build.scala @@ -16,7 +16,6 @@ class Build(val context: Context) extends ScalaJsBuild{ ) ) - override protected def fastOptJSFile = { - projectDirectory.getParentFile ++ "/server/public" ++ ("/"++super.fastOptJSFile.getName) - } + override def scalaJsTargetFile = + projectDirectory.getParentFile ++ ("/server/public/generated/" ++ projectName ++ ".js") } diff --git a/examples/scalajs-react-example/server/public/index.html b/examples/scalajs-react-example/server/public/index.html index 08de20d..e07687c 100644 --- a/examples/scalajs-react-example/server/public/index.html +++ b/examples/scalajs-react-example/server/public/index.html @@ -10,7 +10,7 @@ <script src="https://fb.me/react-15.1.0.min.js"></script> <script src="https://fb.me/react-dom-15.1.0.min.js"></script> - <script type="text/javascript" src="./my-project-fastopt.js"></script> + <script type="text/javascript" src="generated/my-project.js"></script> <script type="text/javascript"> App().main(); </script> |