pioneer icon indicating copy to clipboard operation
pioneer copied to clipboard

Make pioneer widgets modular

Open buob opened this issue 11 years ago • 5 comments

I want to be able to require a certain class outside of cucumber

buob avatar Feb 13 '15 16:02 buob

yes, we talked about how to do this IRL, it will require a change to the pioneer build phase and a but of shuffling around of the classes, however it should not be so hard. @buob are you interested in doing this?

samccone avatar Feb 13 '15 16:02 samccone

Sure. Let's leave it unassigned for now though in case someone else gets to it before I do.

buob avatar Feb 13 '15 16:02 buob

Would you like to outline the approach here so that someone else could possibly pick this up. Currently the issue does not really explain the Why or How very well.

samccone avatar Feb 13 '15 17:02 samccone

Why?

The most valuable part of pioneer is the widget abstraction. I should be able to use that separate from all of the runner, gherkin, etc. pieces. For example, in my plain old javascript file, something like:

module.exports = require('pioneer/widget').extend({
    root: '.foo',

    welcomeMessage: function() {
      return this.find('.welcome');
    }
});

How?

Alter the build so that it builds each component separately, and then in the cucumber side of things, require those and invoke them.

buob avatar Feb 24 '15 20:02 buob

yep :+1: this is the way to do it

samccone avatar Feb 24 '15 20:02 samccone