From b5628ccde854257695659b947786b415f78dc8ee Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 7 Apr 2017 17:24:40 +0200 Subject: [PATCH] Revert "Switch to treeForAddonTestSupport (#89)" (#92) This reverts commit 07236295ef30cae4d97d43ac7215a5ebc80ed7c6. --- {addon-test-support => addon}/.eslintrc.js | 0 {addon-test-support => addon}/index.js | 0 .../utils/bind-data-test-attributes.js | 0 index.js | 20 +++++-------------- package.json | 2 -- 5 files changed, 5 insertions(+), 17 deletions(-) rename {addon-test-support => addon}/.eslintrc.js (100%) rename {addon-test-support => addon}/index.js (100%) rename {addon-test-support => addon}/utils/bind-data-test-attributes.js (100%) diff --git a/addon-test-support/.eslintrc.js b/addon/.eslintrc.js similarity index 100% rename from addon-test-support/.eslintrc.js rename to addon/.eslintrc.js diff --git a/addon-test-support/index.js b/addon/index.js similarity index 100% rename from addon-test-support/index.js rename to addon/index.js diff --git a/addon-test-support/utils/bind-data-test-attributes.js b/addon/utils/bind-data-test-attributes.js similarity index 100% rename from addon-test-support/utils/bind-data-test-attributes.js rename to addon/utils/bind-data-test-attributes.js diff --git a/index.js b/index.js index 9997386d..85cc1628 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,6 @@ /* eslint-env node */ const VersionChecker = require('ember-cli-version-checker'); -const Funnel = require('broccoli-funnel'); module.exports = { name: 'ember-test-selectors', @@ -80,20 +79,11 @@ module.exports = { } }, - treeForAddonTestSupport(tree) { - // intentionally not calling _super here - // so that can have our `import`'s be - // import testSelector from 'ember-test-selectors'; - - let namespacedTree = new Funnel(tree, { - srcDir: '/', - destDir: `/${this.moduleName()}`, - annotation: `Addon#treeForTestSupport (${this.name})`, - }); - - return this.preprocessJs(namespacedTree, '/', this.name, { - registry: this.registry, - }); + treeForAddon() { + // remove our "addon" folder from the build if we're stripping test selectors + if (!this._stripTestSelectors) { + return this._super.treeForAddon.apply(this, arguments); + } }, preprocessTree(type, tree) { diff --git a/package.json b/package.json index 59e28cff..9adc9bd6 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,6 @@ "test:strip": "STRIP_TEST_SELECTORS=true ember test" }, "dependencies": { - "broccoli-funnel": "^1.1.0", - "broccoli-stew": "^1.4.0", "ember-cli-babel": "^5.1.7", "ember-cli-version-checker": "^1.2.0" },