Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Rename Cucumber namespace to CucumberHTML #4

Closed
wants to merge 2 commits into from

Conversation

jbpros
Copy link
Contributor

@jbpros jbpros commented Sep 25, 2011

As discussed previously with Aslak, I suggest we rename the cucumber-html namespace (i.e. the entry-point variable name) to CucumberHTML (from Cucumber).

The reason is simple: it will practically clash with Cucumber.js's own Cucumber function.

By practically I mean that it should not be a real problem from a technical perspective. Thanks to the CommonJS modules the two identically-named variables won't live in the same scopes. Cucumber.js is always require'd (even in the browser, through browserify); therefore it won't ever be in the scope of cucumber-html's Cucumber.

However, the natural way of referring to cucumber.js's main object function is something like:

var Cucumber = require('cucumber');

This of course won't play well with cucumber-html also declared as Cucumber.

Plus, the name Cucumber is simply a bit too generic for the content of this project, IMHO.

Hit me with better name suggestions if you can!

@cedric-lamalle
Copy link
Contributor

I don't see any problem with this.
I was thinking of an Html namespace inside the Cucumber namespace, but two independent namespaces should be more practical.

@jbpros
Copy link
Contributor Author

jbpros commented Sep 27, 2011

That would be cool but I think it's not easy to enforce on our side without including one project into the other.

But as I'm thinking about it, I feel it's a good idea. It makes sense to include cucumber-html as a hard dependency of cucumber-js and make it part of the namespace. It would be reachable through Cucumber.Formatter.HTML or something. I can go that route when integrating cucumber-html.

This would not have any impact on the current pull request though, the exposed variable name should not be Cucumber, for non-CommonJS environments.

@jbpros jbpros closed this in af74fd0 Sep 29, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants