Skip to content

Commit dcc8490

Browse files
committed
Update: Replace lodash.* modules (closes #129)
1 parent a6a1e34 commit dcc8490

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

lib/shared/log/tasks.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,15 @@ var archy = require('archy');
44
var chalk = require('chalk');
55
var log = require('gulplog');
66

7-
var sortBy = require('lodash.sortby');
8-
var isObject = require('lodash.isplainobject');
7+
var sortBy = require('array-sort');
8+
var isObject = require('isobject');
99
var isString = require('../is-string');
1010

1111
var copyTree = require('./copy-tree');
1212

13-
function sorter(node) {
14-
return node.label;
15-
}
16-
1713
function logTasks(tree, opts, getTask) {
1814
if (opts.sortTasks) {
19-
tree.nodes = sortBy(tree.nodes, sorter);
15+
tree.nodes = sortBy(tree.nodes, 'label');
2016
}
2117

2218
var lineInfos = [];

lib/versioned/^4.0.0/log/getTask.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

3-
var isObject = require('lodash.isplainobject');
4-
var isFunction = require('lodash.isfunction');
3+
var isObject = require('isobject');
54

65
var isString = require('../../../shared/is-string');
76

@@ -19,7 +18,7 @@ function getDescription(task) {
1918
if (isString(task.description)) {
2019
return task.description;
2120
}
22-
if (isFunction(task.unwrap)) {
21+
if (typeof task.unwrap === 'function') {
2322
var origFn = task.unwrap();
2423
if (isString(origFn.description)) {
2524
return origFn.description;
@@ -32,7 +31,7 @@ function getFlags(task) {
3231
if (isObject(task.flags)) {
3332
return task.flags;
3433
}
35-
if (isFunction(task.unwrap)) {
34+
if (typeof task.unwrap === 'function') {
3635
var origFn = task.unwrap();
3736
if (isObject(origFn.flags)) {
3837
return origFn.flags;

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@
3333
},
3434
"dependencies": {
3535
"archy": "^1.0.0",
36+
"array-sort": "^1.0.0",
3637
"chalk": "^1.1.0",
3738
"copy-props": "^2.0.1",
3839
"fancy-log": "^1.1.0",
3940
"gulplog": "^1.0.0",
4041
"interpret": "^1.0.0",
42+
"isobject": "^3.0.1",
4143
"liftoff": "^2.3.0",
42-
"lodash.isfunction": "^3.0.8",
43-
"lodash.isplainobject": "^4.0.4",
44-
"lodash.sortby": "^4.5.0",
4544
"matchdep": "^2.0.0",
4645
"mute-stdout": "^1.0.0",
4746
"pretty-hrtime": "^1.0.0",

0 commit comments

Comments
 (0)