mirror of
https://github.com/bower/bower.git
synced 2026-02-11 14:34:58 -05:00
Remove events.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
var util = require('util');
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var events = require('events');
|
||||
var Q = require('q');
|
||||
var tmp = require('tmp');
|
||||
var mkdirp = require('mkdirp');
|
||||
@@ -24,8 +22,6 @@ var Resolver = function (source, options) {
|
||||
this._config = options.config || config;
|
||||
};
|
||||
|
||||
util.inherits(Resolver, events.EventEmitter);
|
||||
|
||||
// -----------------
|
||||
|
||||
Resolver.prototype.getSource = function () {
|
||||
@@ -112,7 +108,7 @@ Resolver.prototype._readJson = function (dir) {
|
||||
.then(function (filename) {
|
||||
// If it is a component.json, warn about the deprecation
|
||||
if (path.basename(filename) === 'component.json') {
|
||||
this.emit('warn', 'Package "' + this._name + '" is using the deprecated component.json file');
|
||||
//deferred.notify({ type: 'warn', data: 'Package "' + this._name + '" is using the deprecated component.json file' });
|
||||
}
|
||||
|
||||
// Read it
|
||||
@@ -134,17 +130,13 @@ Resolver.prototype._applyPkgMeta = function (meta) {
|
||||
// If so and if the name was "guessed", assume the json name
|
||||
if (this._guessedName) {
|
||||
this._name = meta.name;
|
||||
this.emit('name_change', this._name);
|
||||
// Otherwise use/force the configured one
|
||||
// Otherwise force the configured one
|
||||
} else {
|
||||
meta.name = this._name;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle ignore property, deleting all files from the temporary directory
|
||||
// TODO: Think better about this... some concrete resolvers can handle the ignore property
|
||||
// in a more efficient way.
|
||||
// In such cases, this step should be skipped
|
||||
if (meta.ignore && meta.ignore.length) {
|
||||
return Q.nfcall(glob, '**/*', { cwd: this._tempDir, dot: true, mark: true })
|
||||
.then(function (files) {
|
||||
|
||||
Reference in New Issue
Block a user