diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e5501b3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,14 @@
+Chrome System Monitor
+=========
+Simple example of chrome application.
+
+## For developers
+To create unpacked application:
+
+```
+sbt
+chromeUnpackedFast
+````
+You can find result in `./target/chrome/unpacked-fast` folder.
+
+After you install unpacked extension to Chrome, it can be found on `chrome://apps` page.
\ No newline at end of file
diff --git a/build.sbt b/build.sbt
index 414a651..c8ac376 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,56 +1,54 @@
-import chrome.Impl._
-import chrome.permissions.APIPermission._
+import Dependencies.{addLibraries, addJsLibraries}
+import chrome.permissions.Permission
+import chrome.permissions.Permission.API
+import chrome.{App, AppManifest, Background}
import net.lullabyte.{Chrome, ChromeSbtPlugin}
-lazy val root = project.in(file("."))
- .enablePlugins(ChromeSbtPlugin)
- .settings(
- name := "System Monitor",
- version := "0.1.0",
- scalaVersion := "2.11.8",
- scalacOptions ++= Seq(
- "-language:implicitConversions",
- "-language:existentials",
- "-Xlint",
- "-deprecation",
- "-Xfatal-warnings",
- "-feature"
- ),
- persistLauncher := true,
- persistLauncher in Test := false,
- relativeSourceMaps := true,
- libraryDependencies ++= Seq(
- "org.scala-js" %%% "scalajs-dom" % "0.9.0" withSources() withJavadoc(),
- "com.github.japgolly.scalajs-react" %%% "core" % "0.9.1" withSources() withJavadoc(),
- "com.github.japgolly.scalajs-react" %%% "extra" % "0.9.1" withSources() withJavadoc(),
- "com.github.japgolly.scalacss" %%% "core" % "0.3.0" withSources() withJavadoc(),
- "com.github.japgolly.scalacss" %%% "ext-react" % "0.3.0" withSources() withJavadoc(),
- "net.lullabyte" %%% "scala-js-chrome" % "0.2.0" withSources() withJavadoc()
- ),
- jsDependencies += "org.webjars" % "react" % "0.13.3" / "react-with-addons.min.js" commonJSName "React",
- skip in packageJSDependencies := false,
- chromeManifest := AppManifest(
- name = name.value,
- version = version.value,
- app = App(
- background = Background(
- scripts = List("deps.js", "main.js", "launcher.js")
- )
- ),
- defaultLocale = Some("en"),
- icons = Chrome.icons(
- "assets/icons",
- "app.png",
- Set(16, 32, 48, 64, 96, 128, 256, 512)
- ),
- permissions = Set(
- System.CPU,
- System.Display,
- System.Memory,
- System.Network,
- Storage
- )
+enablePlugins(ChromeSbtPlugin)
+
+name := "System Monitor"
+version := "0.2.1"
+scalaVersion := "2.12.4"
+
+
+addLibraries()
+addJsLibraries()
+
+
+scalaJSUseMainModuleInitializer := true
+scalaJSUseMainModuleInitializer in Test := false
+relativeSourceMaps := true
+skip in packageJSDependencies := false
+
+
+scalacOptions ++= MyBuildConfig.scalacOptions
+
+
+chromeManifest := new AppManifest {
+ val name = Keys.name.value
+ val version = Keys.version.value
+ val app = App(
+ background = Background(
+ scripts = List("dependencies.js", "main.js")
)
)
+ override val defaultLocale = Some("en")
+
+ override val icons = Chrome.icons(
+ "assets/icons",
+ "app.png",
+ Set(16, 32, 48, 64, 96, 128, 256, 512)
+ )
+
+ override val permissions: Set[Permission] = Set(
+ API.System.CPU,
+ API.System.Display,
+ API.System.Memory,
+ API.System.Network,
+ API.Storage
+ )
+}
+
+
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
new file mode 100644
index 0000000..fe5e063
--- /dev/null
+++ b/project/Dependencies.scala
@@ -0,0 +1,52 @@
+import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
+import sbt.Keys.libraryDependencies
+import sbt._
+
+object Dependencies {
+
+ object versions {
+ val scalacss = "0.5.6"
+ val scalaReact = "1.4.2"
+
+ val react = "16.7.0"
+ }
+
+ def addLibraries() = {
+ libraryDependencies ++= Seq(
+ "org.scala-js" %%% "scalajs-dom" % "0.9.2" withSources() withJavadoc(),
+ "com.github.japgolly.scalajs-react" %%% "core" % versions.scalaReact withSources() withJavadoc(),
+ "com.github.japgolly.scalajs-react" %%% "extra" % versions.scalaReact withSources() withJavadoc(),
+ "com.github.japgolly.scalacss" %%% "core" % versions.scalacss withSources() withJavadoc(),
+ "com.github.japgolly.scalacss" %%% "ext-react" % versions.scalacss withSources() withJavadoc(),
+ "net.lullabyte" %%% "scala-js-chrome" % "0.5.0" withSources() withJavadoc()
+ )
+ }
+
+ def addJsLibraries() = {
+ jsDependencies ++= Seq(
+ "org.webjars.npm" % "react" % versions.react
+ / "umd/react.development.js"
+ minified "umd/react.production.min.js"
+ commonJSName "React",
+
+ "org.webjars.npm" % "react-dom" % versions.react
+ / "umd/react-dom.development.js"
+ minified "umd/react-dom.production.min.js"
+ dependsOn "umd/react.development.js"
+ commonJSName "ReactDOM"
+ )
+ }
+}
+
+object MyBuildConfig {
+
+ val scalacOptions = Seq(
+ "-language:implicitConversions",
+ "-language:existentials",
+ "-Xlint",
+ "-deprecation",
+ "-Xfatal-warnings",
+ "-feature"
+ )
+
+}
\ No newline at end of file
diff --git a/project/build.properties b/project/build.properties
index 19623ba..c288de4 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version = 0.13.8
+sbt.version = 1.3.4
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 7c13a71..b27191e 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,2 +1,4 @@
-addSbtPlugin("net.lullabyte" % "sbt-chrome-plugin" % "0.2.1")
-addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.6.0")
+resolvers += Resolver.bintrayIvyRepo("veinhorn", "sbt-plugins")
+
+addSbtPlugin("net.lullabyte" % "sbt-chrome-plugin" % "0.5.8")
+addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
diff --git a/scalastyle-config.xml b/scalastyle-config.xml
index 7e3596f..3432d70 100644
--- a/scalastyle-config.xml
+++ b/scalastyle-config.xml
@@ -6,7 +6,7 @@
-