mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Update test and perf scripts.
Former-commit-id: 434935e332ec03dfd370efcd191b3f9aff5a9387
This commit is contained in:
@@ -3,8 +3,8 @@ node_js:
|
|||||||
- 0.6
|
- 0.6
|
||||||
- 0.9
|
- 0.9
|
||||||
env:
|
env:
|
||||||
- TEST_COMMAND="node ./test/test.js"
|
- TEST_COMMAND="node ./test/test.js ./dist/lodash.js"
|
||||||
- TEST_COMMAND="node ./test/test.js ./lodash.min.js"
|
- TEST_COMMAND="node ./test/test.js ./dist/lodash.min.js"
|
||||||
- TEST_COMMAND="node ./test/test-build.js --time-limit 49m45s"
|
- TEST_COMMAND="node ./test/test-build.js --time-limit 49m45s"
|
||||||
git:
|
git:
|
||||||
depth: 1
|
depth: 1
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
"rhino"
|
"rhino"
|
||||||
],
|
],
|
||||||
"jam": {
|
"jam": {
|
||||||
"main": "./lodash.js"
|
"main": "./dist/lodash.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node ./build.js",
|
"build": "node ./build.js",
|
||||||
|
|||||||
@@ -34,19 +34,21 @@
|
|||||||
// expose Lo-Dash build file path
|
// expose Lo-Dash build file path
|
||||||
ui.buildPath = (function() {
|
ui.buildPath = (function() {
|
||||||
switch (build) {
|
switch (build) {
|
||||||
case 'lodash-dev': return 'lodash.js';
|
case 'lodash-dev': return 'dist/lodash.compat.js';
|
||||||
case 'lodash-underscore': return 'lodash.underscore.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 'lodash-custom': return 'lodash.custom.min.js';
|
||||||
}
|
}
|
||||||
return 'lodash.min.js';
|
return 'dist/lodash.compat.min.js';
|
||||||
}());
|
}());
|
||||||
|
|
||||||
// expose other library file path
|
// expose other library file path
|
||||||
ui.otherPath = (function() {
|
ui.otherPath = (function() {
|
||||||
switch (other) {
|
switch (other) {
|
||||||
case 'lodash-dev': return 'lodash.js';
|
case 'lodash-dev': return 'dist/lodash.compat.js';
|
||||||
case 'lodash-prod': return 'lodash.min.js';
|
case 'lodash-prod': return 'dist/lodash.compat.min.js';
|
||||||
case 'lodash-underscore': return 'lodash.underscore.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 'lodash-custom': return 'lodash.custom.min.js';
|
||||||
case 'underscore-dev': return 'vendor/underscore/underscore.js';
|
case 'underscore-dev': return 'vendor/underscore/underscore.js';
|
||||||
}
|
}
|
||||||
@@ -76,6 +78,7 @@
|
|||||||
'<select id="perf-build">' +
|
'<select id="perf-build">' +
|
||||||
'<option value="lodash-dev">Lo-Dash</option>' +
|
'<option value="lodash-dev">Lo-Dash</option>' +
|
||||||
'<option value="lodash-prod">Lo-Dash (minified)</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-underscore">Lo-Dash (underscore)</option>' +
|
||||||
'<option value="lodash-custom">Lo-Dash (custom)</option>' +
|
'<option value="lodash-custom">Lo-Dash (custom)</option>' +
|
||||||
'</select>';
|
'</select>';
|
||||||
@@ -89,6 +92,7 @@
|
|||||||
'<option value="underscore-prod">Underscore (minified)</option>' +
|
'<option value="underscore-prod">Underscore (minified)</option>' +
|
||||||
'<option value="lodash-dev">Lo-Dash</option>' +
|
'<option value="lodash-dev">Lo-Dash</option>' +
|
||||||
'<option value="lodash-prod">Lo-Dash (minified)</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-underscore">Lo-Dash (underscore)</option>' +
|
||||||
'<option value="lodash-custom">Lo-Dash (custom)</option>' +
|
'<option value="lodash-custom">Lo-Dash (custom)</option>' +
|
||||||
'</select>';
|
'</select>';
|
||||||
@@ -102,20 +106,22 @@
|
|||||||
|
|
||||||
buildList.selectedIndex = (function() {
|
buildList.selectedIndex = (function() {
|
||||||
switch (build) {
|
switch (build) {
|
||||||
case 'lodash-dev': return 0;
|
case 'lodash-dev': return 0;
|
||||||
case 'lodash-underscore': return 2;
|
case 'lodash-modern': return 2;
|
||||||
case 'lodash-custom': return 3;
|
case 'lodash-underscore': return 3;
|
||||||
|
case 'lodash-custom': return 4;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
otherList.selectedIndex = (function() {
|
otherList.selectedIndex = (function() {
|
||||||
switch (other) {
|
switch (other) {
|
||||||
case 'underscore-dev': return 0;
|
case 'underscore-dev': return 0;
|
||||||
case 'lodash-dev': return 2;
|
case 'lodash-dev': return 2;
|
||||||
case 'lodash-prod': return 3;
|
case 'lodash-prod': return 3;
|
||||||
case 'lodash-underscore': return 4;
|
case 'lodash-modern': return 4;
|
||||||
case 'lodash-custom': return 5;
|
case 'lodash-underscore': return 5;
|
||||||
|
case 'lodash-custom': return 6;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}());
|
}());
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
/** Load Lo-Dash */
|
/** Load Lo-Dash */
|
||||||
var lodash =
|
var lodash =
|
||||||
window.lodash || (
|
window.lodash || (
|
||||||
lodash = load('../lodash.js') || window._,
|
lodash = load('../dist/lodash.js') || window._,
|
||||||
lodash = lodash._ || lodash,
|
lodash = lodash._ || lodash,
|
||||||
lodash.noConflict()
|
lodash.noConflict()
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
for cmd in rhino ringo narwhal node; do
|
for cmd in rhino ringo narwhal; do
|
||||||
echo ""
|
echo ""
|
||||||
echo "Testing in $cmd..."
|
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
|
done
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "Testing in node..."
|
||||||
|
node test.js ../dist/lodash.js && node test.js ../dist/lodash.min.js
|
||||||
|
|
||||||
echo "Testing build..."
|
echo "Testing build..."
|
||||||
node test-build.js
|
node test-build.js
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user