Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to specify envs to strip selectors. #14

Merged
merged 1 commit into from
Apr 6, 2016

Conversation

blimmer
Copy link
Contributor

@blimmer blimmer commented Apr 3, 2016

For example, removing the test selectors in a staging or other pre-production environment.

@blimmer
Copy link
Contributor Author

blimmer commented Apr 3, 2016

I also moved the registration logic into the setupPreprocessorRegistry hook (docs), as it seemed to make more sense there than in the included block.

```javascript
var app = new EmberApp({
'ember-test-selectors': {
envsToStrip: ['production', 'staging']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe stripInEnvs, stripForEnvs or so would be better?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about environments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt like environments wasn't clear enough. stripInEnvs seems fine to me!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like environments TBH

Am 05.04.2016 um 00:22 schrieb Ben Limmer notifications@github.com:

In README.md #14 (comment):

@@ -13,6 +13,25 @@ polluting the markup that is delivered to the end user.
ember install ember-test-selectors


+## Configuartion
+To modify the default configuration, place a block called `ember-test-selectors`
+in your `ember-cli-build.js` file.
+
+### Options
+
+`envsToStrip`
+Defines the environments in which you want the test selectors to be removed.
+By default, selectors are only removed in the `production` environment. You
+might also want to remove them in other staging environments for testing.
+
+```javascript
+var app = new EmberApp({
+  'ember-test-selectors': {
+    envsToStrip: ['production', 'staging']
I felt like environments wasn't clear enough. stripInEnvs seems fine to me.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/simplabs/ember-test-selectors/pull/14/files/58d40a78b357ce56ac8613e501c221a1fdd4717f#r58459432

@marcoow
Copy link
Member

marcoow commented Apr 4, 2016

Great! Only 2 smaller things on naming and docs.

For example, removing the test selectors in a staging or other pre-production environment.
@blimmer
Copy link
Contributor Author

blimmer commented Apr 5, 2016

changed to environments.

@marcoow marcoow merged commit 11cd90c into mainmatter:master Apr 6, 2016
@pangratz
Copy link
Contributor

pangratz commented Apr 6, 2016

Wohoo, thanks @blimmer 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants