Skip to content

Commit

Permalink
use npm for lodash-es, rather than a git submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats authored and Alexander Early committed Jan 8, 2016
1 parent 41489b2 commit 1f79497
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 26 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Expand Up @@ -8,3 +8,6 @@ trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

[package.json]
indent_size = 2
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

4 changes: 1 addition & 3 deletions Makefile
Expand Up @@ -24,10 +24,8 @@ lint:
jshint $(SRC) test/*.js mocha_test/* perf/*.js
jscs $(SRC) test/*.js mocha_test/* perf/*.js

submodule-clone:
git submodule update --init --recursive

build-bundle: submodule-clone
build-bundle:
$(NODE) $(SCRIPTS)/build/modules-cjs.js
$(NODE) $(SCRIPTS)/build/aggregate-bundle.js
$(NODE) $(SCRIPTS)/build/aggregate-cjs.js
Expand Down
19 changes: 5 additions & 14 deletions build/async-bundle.js
Expand Up @@ -1246,30 +1246,21 @@

var mapSeries = doSeries(_asyncMap);

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil;
var nativeMax$2 = Math.max;
/**
* The base implementation of `_.range` and `_.rangeRight`.
* The base implementation of `_.range` and `_.rangeRight` without support
* for non-number arguments.
*
* @private
* @param {number} [start=0] The start of the range.
* @param {number} start The start of the range.
* @param {number} end The end of the range.
* @param {number} [step=1] The value to increment or decrement by.
* @param {number} step The value to increment or decrement by.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Array} Returns the new array of numbers.
*/
function baseRange(start, end, step, fromRight) {
start = toNumber(start);
start = start === start ? start : 0;

if (end === undefined) {
end = start;
start = 0;
} else {
end = toNumber(end) || 0;
}
step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);

var index = -1,
length = nativeMax$2(nativeCeil((end - start) / (step || 1)), 0),
result = Array(length);
Expand Down
1 change: 0 additions & 1 deletion deps/lodash-es
Submodule lodash-es deleted from b94d97
1 change: 1 addition & 0 deletions gulpfile.js
@@ -1,4 +1,5 @@
'use strict';
// This is used to generate individual packages for each async method

var gulp = require('gulp');
var path = require('path');
Expand Down
8 changes: 5 additions & 3 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "async",
"description": "Higher-order functions and common patterns for asynchronous code",
"version": "0.5.2",
"version": "2.0.0-alpha",
"main": "lib/async.js",
"author": "Caolan McMahon",
"repository": {
Expand All @@ -17,7 +17,10 @@
"module",
"utility"
],
"dependencies": {},
"dependencies": {
"lodash": "lodash/lodash#npm",
"lodash-es": "lodash/lodash#es"
},
"devDependencies": {
"babel-cli": "^6.3.17",
"babel-core": "^6.3.26",
Expand All @@ -38,7 +41,6 @@
"karma-firefox-launcher": "^0.1.6",
"karma-mocha": "^0.2.0",
"karma-mocha-reporter": "^1.0.2",
"lodash": "lodash/lodash#npm",
"mocha": "^2.2.5",
"native-promise-only": "^0.8.0-a",
"nodeunit": ">0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion support/build/plugin-lodash-import-rename.js
Expand Up @@ -14,7 +14,7 @@ export default function() {
let dir = dirname(f).split(sep);
let relative = _.repeat('../', dir.length + 1);

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

This comment has been minimized.

Copy link
@megawac

megawac Jan 8, 2016

Collaborator

can be even simpler and import lodash-es/

This comment has been minimized.

Copy link
@megawac

megawac Jan 9, 2016

Collaborator

never mind, the reason I was using submodules was so rollup would properly bundle lodash

This comment has been minimized.

Copy link
@aearly

aearly Jan 9, 2016

Collaborator

Yeah, I tried getting rollup to automatically bundle lodash-es from npm, but couldn't get it working. I need to familiarize myself with all the plugins and options more.

}
}
}
Expand Down

4 comments on commit 1f79497

@megawac
Copy link
Collaborator

@megawac megawac commented on 1f79497 Jan 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks

@aearly
Copy link
Collaborator

@aearly aearly commented on 1f79497 Jan 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really odd, I don't know how @Kikobeats showed up as the commit author here. I'm the one working on this. 😄

@aearly
Copy link
Collaborator

@aearly aearly commented on 1f79497 Jan 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, I accidentally cherry-picked a merge commit (the .editorconfig). That caused some weirdness.

@megawac
Copy link
Collaborator

@megawac megawac commented on 1f79497 Jan 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, I was wondering where this commit came from.

Please sign in to comment.