Skip to content

Commit

Permalink
deprecate both this.Funnel and this.pickFiles
Browse files Browse the repository at this point in the history
this wasn’t really intended for public API, users should depend on their own packages.
  • Loading branch information
stefanpenner committed Mar 27, 2015
1 parent 126cf55 commit 33d85ab
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions lib/models/addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ var AddonsFactory = require('../models/addons-factory');
var CoreObject = require('core-object');
var Project = require('./project');

var mergeTrees = require('broccoli-merge-trees');
var Funnel = require('broccoli-funnel');
var walkSync = require('walk-sync');

/**
Root class for an Addon. If your addon module exports an Object this
will be extended from this base class. If you export a constructor (function),
Expand Down Expand Up @@ -112,14 +116,17 @@ Addon.prototype._requireBuildPackages = function() {

this.transpileModules = this.transpileModules || require('broccoli-es6modules');

this.mergeTrees = this.mergeTrees || require('broccoli-merge-trees');
this.Funnel = this.Funnel || require('broccoli-funnel');
this.walkSync = this.walkSync || require('walk-sync');
var ui = this.ui;

this.Funnel = function FunnelFactory(tree, options) {
ui.writeLine('[Deprecated] new this.Funnel(..) is deprecated, please use broccoli-funnel directly instead [addon: ' + this.name + ']');
return new Funnel(tree, options)
};

this.pickFiles = function(tree, options) {
this.ui.writeLine('[Deprecated] this.pickFiles(..) is deprecated in-favour of new this.Funnel(..) [addon: ' + this.name + ']');
return new this.Funnel(tree, options);
}.bind(this);
ui.writeLine('[Deprecated] this.pickFiles(..) is deprecated, please use broccoli-funnel directly instead [addon: ' + this.name + ']');
return new Funnel(tree, options);
};
};

/**
Expand Down

0 comments on commit 33d85ab

Please sign in to comment.