Skip to content

Commit

Permalink
Merge pull request yeoman#170 from mklabs/dep-tree
Browse files Browse the repository at this point in the history
reduce dependency tree
  • Loading branch information
addyosmani committed Jul 31, 2012
2 parents f6cf735 + 7b62c09 commit 0bc5b71
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 19 deletions.
7 changes: 4 additions & 3 deletions bin/yeoman
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env node
var fs = require('fs'),
join = require('path').join,
_ = require('underscore'),
grunt = require('grunt'),
colors = require('colors'),
insight = require('../lib/plugins/insight.js'),
yeoman = require('../'),
async = require('async'),
pkg = require('../package.json'),
_ = grunt.util._,
async = grunt.util.async,
compiled = _.template( fs.readFileSync( join(__dirname, 'help.txt'), 'utf8' ));

// Returns the user's home directory in a platform agnostic way.
Expand All @@ -15,7 +16,7 @@ function getUserHome() {
}

// grunt with the plugin registered
var grunt = require('grunt').npmTasks(join(__dirname, '../'));
grunt.npmTasks(join(__dirname, '../'));

// Get back a reference to the internal grunt cli object so that we can read
// command line parsed options from grunt, to run our internal additional
Expand Down
3 changes: 2 additions & 1 deletion lib/generators/ember/controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
var path = require('path'),
util = require('util'),
yeoman = require('../../../../'),
_ = require('underscore');
grunt = require('grunt'),
_ = grunt.util._;

module.exports = Generator;

Expand Down
9 changes: 1 addition & 8 deletions lib/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var utils = module.exports;
// flatiron/utile inspired.
//
// Set of common utilities, mainly defining wrapper to various utility modules
// (like ncp, mkdir, rimraf) as lazy-loaded getters.
// (like mkdir, rimraf) as lazy-loaded getters.
//

//
Expand All @@ -24,13 +24,6 @@ utils.__defineGetter__('rimraf', function () {
return require('rimraf');
});

//
// Wrapper to `require('ncp').ncp`
//
utils.__defineGetter__('ncp', function () {
return require('ncp').ncp;
});

//
// Wrapper to `require('./fetch')`, internal tarball helper using
// mikeal/request, zlib and isaacs/tar.
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
"open": "0.0.2",
"rimraf": "~2.0.1",
"mkdirp": "~0.3.1",
"async": "~0.1.18",
"ncp": "~0.2.6",
"requirejs": "~2.0.2",
"clean-css": "~0.3.2",
"connect": "~1.8.6",
"connect": "~2.2.1",
"request": "~2.9.200",
"html-minifier": "~0.4.5",
"which": "~1.0.5",
Expand All @@ -32,8 +30,7 @@
"coffee-script": "~1.3.3",
"grunt-jasmine-task": "~0.2.0",
"faye-websocket": "~0.4.2",
"prompt": "~0.2.1",
"underscore": "1.3.3",
"prompt": "~0.1.12",
"colors": "~0.6.0",
"grunt-mocha": "~0.1.1"
},
Expand Down
3 changes: 2 additions & 1 deletion tasks/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var fs = require('fs'),
path = require('path'),
util = require('util'),
http = require('http'),
events = require('events'),
colors = require('colors'),
connect = require('connect'),
Expand All @@ -27,7 +28,7 @@ module.exports = function(grunt) {

this.server = options.server;

if ( !( this.server instanceof connect.HTTPServer ) ) {
if ( !( this.server instanceof http.Server ) ) {
throw new Error('Is not a valid HTTP server');
}

Expand Down
1 change: 0 additions & 1 deletion test/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var fs = require('fs'),
assert = require('assert'),
rimraf = require('rimraf'),
mkdirp = require('mkdirp'),
ncp = require('ncp').ncp,
EventEmitter = require('events').EventEmitter;

// helpers exports
Expand Down

0 comments on commit 0bc5b71

Please sign in to comment.