Skip to content

Commit 1f79497

Browse files
KikobeatsAlexander Early
authored andcommitted
use npm for lodash-es, rather than a git submodule
1 parent 41489b2 commit 1f79497

File tree

8 files changed

+16
-26
lines changed

8 files changed

+16
-26
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ trim_trailing_whitespace = true
88
insert_final_newline = true
99
indent_style = space
1010
indent_size = 4
11+
12+
[package.json]
13+
indent_size = 2

.gitmodules

Lines changed: 0 additions & 4 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ lint:
2424
jshint $(SRC) test/*.js mocha_test/* perf/*.js
2525
jscs $(SRC) test/*.js mocha_test/* perf/*.js
2626

27-
submodule-clone:
28-
git submodule update --init --recursive
2927

30-
build-bundle: submodule-clone
28+
build-bundle:
3129
$(NODE) $(SCRIPTS)/build/modules-cjs.js
3230
$(NODE) $(SCRIPTS)/build/aggregate-bundle.js
3331
$(NODE) $(SCRIPTS)/build/aggregate-cjs.js

build/async-bundle.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,30 +1246,21 @@
12461246

12471247
var mapSeries = doSeries(_asyncMap);
12481248

1249+
/* Built-in method references for those with the same name as other `lodash` methods. */
12491250
var nativeCeil = Math.ceil;
12501251
var nativeMax$2 = Math.max;
12511252
/**
1252-
* The base implementation of `_.range` and `_.rangeRight`.
1253+
* The base implementation of `_.range` and `_.rangeRight` without support
1254+
* for non-number arguments.
12531255
*
12541256
* @private
1255-
* @param {number} [start=0] The start of the range.
1257+
* @param {number} start The start of the range.
12561258
* @param {number} end The end of the range.
1257-
* @param {number} [step=1] The value to increment or decrement by.
1259+
* @param {number} step The value to increment or decrement by.
12581260
* @param {boolean} [fromRight] Specify iterating from right to left.
12591261
* @returns {Array} Returns the new array of numbers.
12601262
*/
12611263
function baseRange(start, end, step, fromRight) {
1262-
start = toNumber(start);
1263-
start = start === start ? start : 0;
1264-
1265-
if (end === undefined) {
1266-
end = start;
1267-
start = 0;
1268-
} else {
1269-
end = toNumber(end) || 0;
1270-
}
1271-
step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);
1272-
12731264
var index = -1,
12741265
length = nativeMax$2(nativeCeil((end - start) / (step || 1)), 0),
12751266
result = Array(length);

deps/lodash-es

Lines changed: 0 additions & 1 deletion
This file was deleted.

gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
// This is used to generate individual packages for each async method
23

34
var gulp = require('gulp');
45
var path = require('path');

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "async",
33
"description": "Higher-order functions and common patterns for asynchronous code",
4-
"version": "0.5.2",
4+
"version": "2.0.0-alpha",
55
"main": "lib/async.js",
66
"author": "Caolan McMahon",
77
"repository": {
@@ -17,7 +17,10 @@
1717
"module",
1818
"utility"
1919
],
20-
"dependencies": {},
20+
"dependencies": {
21+
"lodash": "lodash/lodash#npm",
22+
"lodash-es": "lodash/lodash#es"
23+
},
2124
"devDependencies": {
2225
"babel-cli": "^6.3.17",
2326
"babel-core": "^6.3.26",
@@ -38,7 +41,6 @@
3841
"karma-firefox-launcher": "^0.1.6",
3942
"karma-mocha": "^0.2.0",
4043
"karma-mocha-reporter": "^1.0.2",
41-
"lodash": "lodash/lodash#npm",
4244
"mocha": "^2.2.5",
4345
"native-promise-only": "^0.8.0-a",
4446
"nodeunit": ">0.0.0",

support/build/plugin-lodash-import-rename.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function() {
1414
let dir = dirname(f).split(sep);
1515
let relative = _.repeat('../', dir.length + 1);
1616

17-
node.source.value = value.replace(/\blodash\b/, relative + 'deps/lodash-es');
17+
node.source.value = value.replace(/\blodash\b/, relative + 'node_modules/lodash-es');
1818
}
1919
}
2020
}

0 commit comments

Comments
 (0)