This repository has been archived by the owner on Dec 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iss #12: frontend pipeline with babel js, less; dev mode; build info
- Loading branch information
Showing
23 changed files
with
215 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,5 @@ lib_managed/ | |
src_managed/ | ||
project/boot/ | ||
project/plugins/project/ | ||
|
||
node_modules/ |
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
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,3 @@ | ||
{ | ||
"presets": ["es2015", "react"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"devDependencies": { | ||
"babel-core": "6.7.7", | ||
"babel-preset-es2015": "6.6.0", | ||
"babel-preset-react": "6.5.0" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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 @@ | ||
// tutorial1.js | ||
var CommentBox = React.createClass({ | ||
render: function() { | ||
return ( | ||
<div className="commentBox"> | ||
Hello, world! I am a CommentBox. | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
ReactDOM.render( | ||
<CommentBox />, | ||
document.getElementById('content') | ||
); |
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,3 @@ | ||
{ | ||
var test = [1, 2, 3].map(x => x * 2); | ||
} |
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,3 @@ | ||
body { | ||
background: #ddd; | ||
} |
6 changes: 4 additions & 2 deletions
6
server/src/main/resources/web-ui/index.html → server/src/main/public/index.html
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
32 changes: 32 additions & 0 deletions
32
server/src/main/scala/ru/maizy/cheesecake/server/BuildInfo.scala
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,32 @@ | ||
package ru.maizy.cheesecake.server | ||
|
||
import java.time.{ Instant, ZoneId, ZonedDateTime } | ||
import java.util.Properties | ||
|
||
/** | ||
* Copyright (c) Nikita Kovaliov, maizy.ru, 2016 | ||
* See LICENSE.txt for details. | ||
*/ | ||
case object BuildInfo { | ||
|
||
private val buildProperties: Map[String, Option[String]] = { | ||
val props = new Properties | ||
Option(getClass.getClassLoader.getResourceAsStream("buildinfo.properties")) | ||
.foreach(props.load) | ||
Map( | ||
"version" -> Option(props.getProperty("version")), | ||
"name" -> Option(props.getProperty("name")), | ||
"buildTime" -> Option(props.getProperty("buildTime")) | ||
) | ||
} | ||
|
||
def version: String = buildProperties("version").getOrElse("0.0.0") | ||
def projectName: String = buildProperties("name").getOrElse("cheesecake-server") | ||
def buildTime: ZonedDateTime = { | ||
val utc = ZoneId.of("UTC") | ||
buildProperties("buildTime") | ||
.map { t => ZonedDateTime.ofInstant(Instant.ofEpochMilli(t.toLong), utc) } | ||
.getOrElse(ZonedDateTime.now().withZoneSameInstant(utc)) | ||
} | ||
|
||
} |
7 changes: 5 additions & 2 deletions
7
server/src/main/scala/ru/maizy/cheesecake/server/Version.scala
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,14 +1,17 @@ | ||
package ru.maizy.cheesecake.server | ||
|
||
import java.util.Properties | ||
|
||
/** | ||
* Copyright (c) Nikita Kovaliov, maizy.ru, 2016 | ||
* See LICENSE.txt for details. | ||
*/ | ||
|
||
|
||
object Version { | ||
val asSeq: Seq[Int] = Seq(0, 0, 1) | ||
val literal: String = asSeq.mkString(".") | ||
|
||
val literal: String = BuildInfo.version | ||
val asSeq: Seq[Int] = literal.split(".").map(_.toInt) | ||
|
||
override def toString: String = literal | ||
} |
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
3 changes: 3 additions & 0 deletions
3
server/src/main/scala/ru/maizy/cheesecake/server/jsonapi/models/AppConfigs.scala
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,7 +1,10 @@ | ||
package ru.maizy.cheesecake.server.jsonapi.models | ||
|
||
import java.time.ZonedDateTime | ||
|
||
/** | ||
* Copyright (c) Nikita Kovaliov, maizy.ru, 2016 | ||
* See LICENSE.txt for details. | ||
*/ | ||
case class AppConfigs(wsStateUrl: String) | ||
case class AppVersion(version: String, buildTime: ZonedDateTime) |
Oops, something went wrong.