Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

don't hook into compile by default

  • Loading branch information...
commit f2faed6c87dbf55a33a4b83169e9ec3b7b2289d8 1 parent 0da26a4
@casualjim casualjim authored
View
4 README.md
@@ -40,11 +40,11 @@ mainConfigFile in (Compile, requireJs) <<=
```
The `buildProfile` key allows you to configure the r.js tool.
-All of the possible configuration options are discussed in this [example.build.js](https://github.com/jrburke/r.js/blob/master/build/example.build.js).
+All of the possible configuration options are discussed in this [example.build.js](https://github.com/jrburke/r.js/blob/master/build/example.build.js).
Be sure to read the [require.js optimization docs](http://requirejs.org/docs/optimization.html) too.
In addition to the buildProfile key the appDir, mainConfigFile, dir and baseUrl are configurable through sbt too.
-To configure the appDir you have to set the `sourceDirectory` key.
+To configure the appDir you have to set the `sourceDirectory` key (defaults to `src/main/requirejs`).
To configure the dir you have to set the `target` key, the dir is an intermediate step for this plugin.
To configure the mainConfigFile you have to set the `mainConfigFile` key.
To configure the baseUrl you have to set the `baseUrl` key.
View
15 build.sbt
@@ -12,14 +12,13 @@ libraryDependencies ++= Seq(
"net.liftweb" %% "lift-json" % "2.4"
)
-publishMavenStyle := true
-
-publishTo <<= version { (v: String) =>
- val nexus = "https://oss.sonatype.org/"
- if (v.trim.endsWith("SNAPSHOT"))
- Some("snapshots" at nexus + "content/repositories/snapshots")
- else
- Some("releases" at nexus + "service/local/staging/deploy/maven2")
+publishTo <<= (version) { version: String =>
+ val scalasbt = "http://scalasbt.artifactoryonline.com/scalasbt/"
+ val (name, url) = if (version.contains("-SNAPSHOT"))
+ ("sbt-plugin-snapshots", scalasbt+"sbt-plugin-snapshots")
+ else
+ ("sbt-plugin-releases", scalasbt+"sbt-plugin-releases")
+ Some(Resolver.url(name, new URL(url))(Resolver.ivyStylePatterns))
}
publishArtifact in Test := false
View
2  project/plugins.sbt
@@ -2,4 +2,4 @@ resolvers += Resolver.url("sbt-plugin-releases",
new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(
Resolver.ivyStylePatterns)
- addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
+addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
View
3  src/main/scala/org/scalatra/requirejs/RequireJsPlugin.scala
@@ -113,8 +113,7 @@ object RequireJsPlugin extends Plugin {
excludeFilter in requireJs := "build.txt" || (".*" - ".") || "_*" || HiddenFileFilter,
watchSources in requireJs <<= (unmanagedSources in requireJs)
)) ++ Seq(
- watchSources <++= (unmanagedSources in requireJs in c),
- compile in c <<= (compile in c).dependsOn(requireJs in c)
+ watchSources <++= (unmanagedSources in requireJs in c)
)
private def cleanTask =
Please sign in to comment.
Something went wrong with that request. Please try again.