Update test and perf scripts.

Former-commit-id: 434935e332ec03dfd370efcd191b3f9aff5a9387
This commit is contained in:
John-David Dalton
2013-02-08 00:58:26 -08:00
parent e78df4d981
commit 6d1c6dfd16
5 changed files with 29 additions and 20 deletions

View File

@@ -3,8 +3,8 @@ node_js:
- 0.6
- 0.9
env:
- TEST_COMMAND="node ./test/test.js"
- TEST_COMMAND="node ./test/test.js ./lodash.min.js"
- TEST_COMMAND="node ./test/test.js ./dist/lodash.js"
- TEST_COMMAND="node ./test/test.js ./dist/lodash.min.js"
- TEST_COMMAND="node ./test/test-build.js --time-limit 49m45s"
git:
depth: 1

View File

@@ -43,7 +43,7 @@
"rhino"
],
"jam": {
"main": "./lodash.js"
"main": "./dist/lodash.js"
},
"scripts": {
"build": "node ./build.js",

View File

@@ -34,19 +34,21 @@
// expose Lo-Dash build file path
ui.buildPath = (function() {
switch (build) {
case 'lodash-dev': return 'lodash.js';
case 'lodash-underscore': return 'lodash.underscore.min.js';
case 'lodash-dev': return 'dist/lodash.compat.js';
case 'lodash-modern': return 'dist/lodash.min.js';
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
case 'lodash-custom': return 'lodash.custom.min.js';
}
return 'lodash.min.js';
return 'dist/lodash.compat.min.js';
}());
// expose other library file path
ui.otherPath = (function() {
switch (other) {
case 'lodash-dev': return 'lodash.js';
case 'lodash-prod': return 'lodash.min.js';
case 'lodash-underscore': return 'lodash.underscore.min.js';
case 'lodash-dev': return 'dist/lodash.compat.js';
case 'lodash-prod': return 'dist/lodash.compat.min.js';
case 'lodash-modern': return 'dist/lodash.min.js';
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
case 'lodash-custom': return 'lodash.custom.min.js';
case 'underscore-dev': return 'vendor/underscore/underscore.js';
}
@@ -76,6 +78,7 @@
'<select id="perf-build">' +
'<option value="lodash-dev">Lo-Dash</option>' +
'<option value="lodash-prod">Lo-Dash (minified)</option>' +
'<option value="lodash-modern">Lo-Dash (modern)</option>' +
'<option value="lodash-underscore">Lo-Dash (underscore)</option>' +
'<option value="lodash-custom">Lo-Dash (custom)</option>' +
'</select>';
@@ -89,6 +92,7 @@
'<option value="underscore-prod">Underscore (minified)</option>' +
'<option value="lodash-dev">Lo-Dash</option>' +
'<option value="lodash-prod">Lo-Dash (minified)</option>' +
'<option value="lodash-modern">Lo-Dash (modern)</option>' +
'<option value="lodash-underscore">Lo-Dash (underscore)</option>' +
'<option value="lodash-custom">Lo-Dash (custom)</option>' +
'</select>';
@@ -102,20 +106,22 @@
buildList.selectedIndex = (function() {
switch (build) {
case 'lodash-dev': return 0;
case 'lodash-underscore': return 2;
case 'lodash-custom': return 3;
case 'lodash-dev': return 0;
case 'lodash-modern': return 2;
case 'lodash-underscore': return 3;
case 'lodash-custom': return 4;
}
return 1;
}());
otherList.selectedIndex = (function() {
switch (other) {
case 'underscore-dev': return 0;
case 'lodash-dev': return 2;
case 'lodash-prod': return 3;
case 'lodash-underscore': return 4;
case 'lodash-custom': return 5;
case 'underscore-dev': return 0;
case 'lodash-dev': return 2;
case 'lodash-prod': return 3;
case 'lodash-modern': return 4;
case 'lodash-underscore': return 5;
case 'lodash-custom': return 6;
}
return 1;
}());

View File

@@ -13,7 +13,7 @@
/** Load Lo-Dash */
var lodash =
window.lodash || (
lodash = load('../lodash.js') || window._,
lodash = load('../dist/lodash.js') || window._,
lodash = lodash._ || lodash,
lodash.noConflict()
);

View File

@@ -1,11 +1,14 @@
cd "$(dirname "$0")"
for cmd in rhino ringo narwhal node; do
for cmd in rhino ringo narwhal; do
echo ""
echo "Testing in $cmd..."
$cmd test.js && $cmd test.js ../lodash.min.js
$cmd test.js ../dist/lodash.compat.js && $cmd test.js ../dist/lodash.compat.min.js
done
echo ""
echo "Testing in node..."
node test.js ../dist/lodash.js && node test.js ../dist/lodash.min.js
echo "Testing build..."
node test-build.js