Skip to content

Commit

Permalink
Merge pull request less#11 from dhaber/rhino-issue3
Browse files Browse the repository at this point in the history
Fix for issue less#3: Tests should automatically take latest rhino file
  • Loading branch information
SomMeri committed Jan 12, 2014
2 parents 9806fcb + cfb04d1 commit 8bbc221
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ module.exports = function(grunt) {
'uglify:stable'
]);

// Release Rhino Version
grunt.registerTask('rhino', [
'concat:rhino'
]);

// Run all browser tests
grunt.registerTask('browsertest', [
'browser',
Expand Down
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ import groovy.io.FileType
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.eriwen:gradle-js-plugin:1.8.0'
classpath 'com.moowork.gradle:gradle-grunt-plugin:0.2'
}
}

apply plugin: 'js'

apply plugin: 'grunt'

repositories {
mavenCentral()
Expand All @@ -25,8 +27,9 @@ dependencies {
}

project.ext {
packageProps = new groovy.json.JsonSlurper().parseText(new File("package.json").toURL().text)
failures = 0;
rhinoTestSrc = 'out/rhino-test.js'
rhinoTestSrc = "out/rhino-test-${packageProps.version}.js"
testSrc = 'test/less'
testOut = 'out/test'
}
Expand All @@ -36,7 +39,7 @@ javascript.source {
js {
srcDir '.'
include 'test/rhino/test-header.js'
include 'dist/less-rhino-1.5.1.js'
include "dist/less-rhino-${packageProps.version}.js"
}
}
}
Expand Down Expand Up @@ -106,7 +109,7 @@ task testRhinoCompression(type: RhinoTest) {
}

task setupTest {
dependsOn combineJs
dependsOn grunt_rhino, combineJs
doLast {
file(testOut).deleteDir()
}
Expand Down

0 comments on commit 8bbc221

Please sign in to comment.