Merge pull request #11 from dhaber/rhino-issue3

Fix for issue #3: Tests should automatically take latest rhino file
This commit is contained in:
Mária Jurčovičová
2014-01-12 14:02:15 -08:00
2 changed files with 12 additions and 4 deletions

View File

@@ -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',

View File

@@ -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()
@@ -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'
}
@@ -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"
}
}
}
@@ -106,7 +109,7 @@ task testRhinoCompression(type: RhinoTest) {
}
task setupTest {
dependsOn combineJs
dependsOn grunt_rhino, combineJs
doLast {
file(testOut).deleteDir()
}