-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
9 changed files
with
37 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/sbt-test/sbt-web-scalajs/akka-http-scalajs/countScalaAndSourceMapFiles.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
baseDir="$( cd "$( dirname "$0" )" && pwd )" | ||
cd $baseDir | ||
|
||
expectedNbScalaFiles=$1 | ||
expectedNbSourceMapFiles=$2 | ||
archive="$baseDir/server/target/universal/server-0.1.0-SNAPSHOT.zip" | ||
unzip -o $archive | ||
nbScalaFiles=$(unzip -l "server-0.1.0-SNAPSHOT/lib/*web-assets.jar" | grep ".*\.scala$" | wc -l) | ||
nbSourceMapFiles=$(unzip -l "server-0.1.0-SNAPSHOT/lib/*web-assets.jar" | grep ".*\.map$" | wc -l) | ||
|
||
echo "Number of Scala files: "$((nbScalaFiles))" ($expectedNbScalaFiles expected)" | ||
echo "Number of Source Map files: "$((nbSourceMapFiles))" ($expectedNbSourceMapFiles expected)" | ||
[ "$nbScalaFiles" -eq "$expectedNbScalaFiles" -a "$nbSourceMapFiles" -eq "$expectedNbSourceMapFiles" ] |
12 changes: 0 additions & 12 deletions
12
src/sbt-test/sbt-web-scalajs/akka-http-scalajs/countScalaFiles.sh
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/sbt-test/sbt-web-scalajs/akka-http-scalajs/project/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.3.2 | ||
sbt.version=1.3.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
> clean | ||
> akka-http-scalajs/clean | ||
|
||
# produce archive with no source maps | ||
> universal:packageBin | ||
$ exec chmod +x countScalaFiles.sh | ||
$ exec ./countScalaFiles.sh 0 | ||
$ exec chmod +x countScalaAndSourceMapFiles.sh | ||
$ exec ./countScalaAndSourceMapFiles.sh 0 0 | ||
|
||
# cleaning needed, otherwise source map files (.map) are not generated | ||
> akka-http-scalajs/clean | ||
|
||
# produce archive with source maps | ||
> set scalaJSLinkerConfig in (client, fullOptJS) ~= (_.withSourceMap(true)) | ||
> set scalaJSLinkerConfig in (sharedJs, fullOptJS) ~= (_.withSourceMap(true)) | ||
> set scalaJSLinkerConfig in (client, Compile, fullOptJS) ~= (_.withSourceMap(true)) | ||
> set scalaJSLinkerConfig in (sharedJs, Compile, fullOptJS) ~= (_.withSourceMap(true)) | ||
> universal:packageBin | ||
$ exec chmod +x countScalaFiles.sh | ||
# The Scala files are replicated into two folders (META-INF, public) inside the JAR. | ||
# So, we expect to see double the number of Scala files that exist in client and shared. | ||
$ exec ./countScalaFiles.sh 4 | ||
$ exec chmod +x countScalaAndSourceMapFiles.sh | ||
$ exec ./countScalaAndSourceMapFiles.sh 2 1 |