Skip to content

Commit

Permalink
Update lodash usage for v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Demboski committed Jan 25, 2016
1 parent 8c51fdb commit 474bd65
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lib/commands/init.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var copy = require('lodash/lang/clone');
var merge = require('lodash/object/merge');
var clone = require('lodash/clone');
var merge = require('lodash/merge');
var Command = require('../models/command');
var Promise = require('../ext/promise');
var SilentError = require('silent-error');
Expand Down Expand Up @@ -87,7 +87,7 @@ module.exports = Command.extend({
return Promise.reject(new SilentError(message));
}

var blueprintOpts = copy(commandOptions);
var blueprintOpts = clone(commandOptions);
merge(blueprintOpts, {
rawName: packageName,
targetFiles: rawArgs || '',
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/install-blueprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var isGitRepo = require('is-git-url');
var temp = require('temp');
var childProcess = require('child_process');
var path = require('path');
var merge = require('lodash/object/merge');
var merge = require('lodash/merge');

// Automatically track and cleanup temp files at exit
temp.track();
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/commands/init-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var fs = require('fs');
var os = require('os');
var path = require('path');
var expect = require('chai').expect;
var pluck = require('lodash/collection/pluck');
var map = require('lodash/map');
var MockUI = require('../../helpers/mock-ui');
var MockAnalytics = require('../../helpers/mock-analytics');
var stub = require('../../helpers/stub');
Expand Down Expand Up @@ -224,7 +224,7 @@ describe('init command', function() {
buildCommand();

command.beforeRun(['app']);
expect(pluck(command.availableOptions, 'name')).to.contain('custom-blueprint-option');
expect(map(command.availableOptions, 'name')).to.contain('custom-blueprint-option');
});

it('Passes command options through to the install blueprint task', function() {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/commands/new-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var expect = require('chai').expect;
var pluck = require('lodash/collection/pluck');
var map = require('lodash/map');
var commandOptions = require('../../factories/command-options');
var stub = require('../../helpers/stub');
var NewCommand = require('../../../lib/commands/new');
Expand Down Expand Up @@ -118,7 +118,7 @@ describe('new command', function() {
}, true);

command.beforeRun(['app']);
expect(pluck(command.availableOptions, 'name')).to.contain('custom-blueprint-option');
expect(map(command.availableOptions, 'name')).to.contain('custom-blueprint-option');
});

it('passes command options through to init command', function() {
Expand Down

0 comments on commit 474bd65

Please sign in to comment.