Skip to content

Commit

Permalink
Merge 9c75640 into 3524653
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-podzigun committed Jul 15, 2022
2 parents 3524653 + 9c75640 commit a3d1591
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 65 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[![CI](https://github.com/scommons/scommons-material-ui/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/scommons/scommons-material-ui/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/scommons/scommons-material-ui/badge.svg?branch=master)](https://coveralls.io/github/scommons/scommons-material-ui/?branch=master)
[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-1.1.0.svg)](https://www.scala-js.org)
[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-1.5.0.svg)](https://www.scala-js.org)

## Scala Commons Material UI

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lazy val `scommons-material-ui` = (project in file("."))
.settings(CommonModule.settings: _*)
.settings(MaterialUiModule.settings: _*)
.settings(
skip in publish := true,
publish / skip := true,
publish := ((): Unit),
publishLocal := ((): Unit),
publishM2 := ((): Unit)
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.2.8
sbt.version = 1.5.2
8 changes: 4 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

//addSbtPlugin(("org.scommons.sbt" % "sbt-scommons-plugin" % "0.8.0-SNAPSHOT").changing())
addSbtPlugin("org.scommons.sbt" % "sbt-scommons-plugin" % "0.8.0")
addSbtPlugin(("org.scommons.sbt" % "sbt-scommons-plugin" % "0.9.0-SNAPSHOT").changing())
//addSbtPlugin("org.scommons.sbt" % "sbt-scommons-plugin" % "0.8.0")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.3")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")
4 changes: 2 additions & 2 deletions project/src/main/scala/common/Libs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import scommons.sbtplugin.project.CommonLibs

object Libs extends CommonLibs {

val scommonsNodejsVersion = "0.8.0"
val scommonsReactVersion = "0.8.0"
val scommonsNodejsVersion = "1.0.0-SNAPSHOT"
val scommonsReactVersion = "1.0.0-SNAPSHOT"

lazy val scommonsNodejsCore = Def.setting("org.scommons.nodejs" %%% "scommons-nodejs-core" % scommonsNodejsVersion)
lazy val scommonsReactCore = Def.setting("org.scommons.react" %%% "scommons-react-core" % scommonsReactVersion)
Expand Down
9 changes: 5 additions & 4 deletions project/src/main/scala/definitions/MaterialUiCodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package definitions

import sbt.Keys._
import sbt._
import scoverage.ScoverageKeys.coverageExcludedPackages
import scalajsbundler.sbtplugin.ScalaJSBundlerPlugin.autoImport._
import scommons.sbtplugin.project.CommonNodeJsModule
import scoverage.ScoverageKeys.coverageExcludedPackages

object MaterialUiCodeGen extends NodeJsModule {
object MaterialUiCodeGen extends MaterialUiModule with CommonNodeJsModule {

override val id = "scommons-material-ui-codegen"

override val base: File = file("codegen")

override def definition: Project = super.definition
.settings(
skip in publish := true,
publish / skip := true,
publish := ((): Unit),
publishLocal := ((): Unit),
publishM2 := ((): Unit),
Expand All @@ -22,7 +23,7 @@ object MaterialUiCodeGen extends NodeJsModule {
"scommons.doctrine.raw" +
";scommons.reactdocgen.raw",

npmDependencies in Compile ++= Seq(
Compile / npmDependencies ++= Seq(
"doctrine" -> "^3.0.0",
"react-docgen" -> "^5.4.0"
)
Expand Down
8 changes: 2 additions & 6 deletions project/src/main/scala/definitions/MaterialUiCore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ object MaterialUiCore extends ScalaJsModule {

coverageExcludedPackages := "scommons.materialui.raw",

npmDependencies in Compile ++= Seq(
Compile / npmDependencies ++= Seq(
"@material-ui/core" -> "^4.12.3",
"@material-ui/icons" -> "^4.11.2"
),

npmDevDependencies in Compile ++= Seq(
"babel-loader" -> "8.0.5",
"@babel/core" -> "7.4.0",
"@babel/preset-env" -> "7.4.2",

Compile / npmDevDependencies ++= Seq(
"webpack-node-externals" -> "2.5.2",
"webpack-merge" -> "4.2.1"
)
Expand Down
2 changes: 1 addition & 1 deletion project/src/main/scala/definitions/MaterialUiModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object MaterialUiModule {
//
sonatypeProfileName := "org.scommons",
publishMavenStyle := true,
publishArtifact in Test := false,
Test / publishArtifact := false,
publishTo := sonatypePublishToBundle.value,
pomExtra := {
<url>https://github.com/scommons/scommons-material-ui</url>
Expand Down
8 changes: 4 additions & 4 deletions project/src/main/scala/definitions/MaterialUiShowcase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object MaterialUiShowcase extends ScalaJsModule {

override def definition: Project = super.definition
.settings(
skip in publish := true,
publish / skip := true,
publish := ((): Unit),
publishLocal := ((): Unit),
publishM2 := ((): Unit),
Expand All @@ -31,12 +31,12 @@ object MaterialUiShowcase extends ScalaJsModule {
// we substitute references to material-ui modules with our custom mocks during test
scommonsNodeJsTestLibs := Seq("scommons.materialui.aliases.js"),
scommonsRequireWebpackInTest := true,
webpackConfigFile in Test := Some(baseDirectory.value / "test.webpack.config.js"),
Test / webpackConfigFile := Some(baseDirectory.value / "test.webpack.config.js"),

//dev
webpackConfigFile in fastOptJS := Some(baseDirectory.value / "client.webpack.config.js"),
fastOptJS / webpackConfigFile := Some(baseDirectory.value / "client.webpack.config.js"),
//production
webpackConfigFile in fullOptJS := Some(baseDirectory.value / "client.webpack.config.js")
fullOptJS / webpackConfigFile := Some(baseDirectory.value / "client.webpack.config.js")
)

override val internalDependencies: Seq[ClasspathDep[ProjectReference]] = Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/src/main/scala/definitions/MaterialUiTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object MaterialUiTest extends ScalaJsModule {

coverageExcludedPackages := "scommons.materialui.test.raw",

npmDevDependencies in Compile ++= Seq(
Compile / npmDevDependencies ++= Seq(
"module-alias" -> "2.2.2"
)
)
Expand Down
36 changes: 0 additions & 36 deletions project/src/main/scala/definitions/NodeJsModule.scala

This file was deleted.

3 changes: 2 additions & 1 deletion project/src/main/scala/definitions/ScalaJsModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package definitions

import common.{Libs, TestLibs}
import sbt._
import scommons.sbtplugin.project.CommonNodeJsModule

trait ScalaJsModule extends NodeJsModule {
trait ScalaJsModule extends MaterialUiModule with CommonNodeJsModule {

override def superRepoProjectsDependencies: Seq[(String, String, Option[String])] = {
super.superRepoProjectsDependencies ++ Seq(
Expand Down
4 changes: 2 additions & 2 deletions showcase/client.webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const merge = require("webpack-merge")

const generatedConfig = require('./scalajs.webpack.config')
const commonBabelConfig = require("./sc-babel.webpack.config.js")
const commonConfig = require("./common.webpack.config.js")

module.exports = merge(generatedConfig, commonBabelConfig)
module.exports = merge(generatedConfig, commonConfig)
13 changes: 13 additions & 0 deletions showcase/common.webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

module.exports = {
stats: {
children: false // disable child plugin/loader logging
},

resolve: {
modules: [
'./node_modules',
'.'
]
}
}
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := sys.env.getOrElse("version", default = "1.0.0-SNAPSHOT").stripPrefix("v")
ThisBuild / version := sys.env.getOrElse("version", default = "1.0.0-SNAPSHOT").stripPrefix("v")

0 comments on commit a3d1591

Please sign in to comment.