Skip to content

Commit

Permalink
Fixing build profile path & simplifying guard
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Fitzgerald committed Feb 8, 2013
1 parent b7498cd commit 4d5c66f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ class RequireJsTask extends SourceTask {

final List<String> args = [requireJsFile.canonicalPath]
args.add("-o")
if (project.requirejs.buildprofile != null && project.requirejs.buildprofile.class == File) {
File buildprofile = project.requirejs.buildprofile
if (buildprofile.exists()) {
args.add(buildprofile.canonicalPath)
}
if (project.requirejs.buildprofile != null && project.requirejs.buildprofile.class == File && project.requirejs.buildprofile.exists()) {
args.add("${project.requirejs.buildprofile.canonicalPath}")
}

def outAdded = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class RequireJsTaskTest extends Specification {

def "runWithBuildProfile"() {
given:
project.requirejs.buildprofile = new File("build.js")
project.requirejs.buildprofile = new File("${project.projectDir.absolutePath}${File.separator}build.js")
addBuildFile()
addMainFile()
addJamDir()
Expand Down

0 comments on commit 4d5c66f

Please sign in to comment.