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

Custom build integration #6

Open
joecritch opened this issue Aug 23, 2014 · 4 comments
Open

Custom build integration #6

joecritch opened this issue Aug 23, 2014 · 4 comments
Assignees
Labels

Comments

@joecritch
Copy link
Contributor

We need to hook the builder UI into the builder process. I'm in the dark on this one, but is there anything that's required from a UI perspective, in order to integrate?

@joecritch
Copy link
Contributor Author

@SlexAxton Is this what you've started refactoring, ready for integration? Do you think it'll be a big task?

@SlexAxton
Copy link
Member

Assume the following:

builder.build(options_object, function(err, built_code) { console.log(built_code); });

Where options_object looks like https://github.com/Modernizr/Modernizr/blob/master/lib/config-all.json

And where built_code is the string that you put into the output spot:

Feel free to just stub with this snippet

window.Builder = {
  build: function(obj, cb) {
    if (!obj) throw new Error('need a config yo');
    setTimeout(function(){
      cb && cb('/*Modernizr 3.0*/window.Modernizr={javascript:true}');
    }, 1000);
  }
};

@SlexAxton
Copy link
Member

Also note: I think we decided to kill the test/ in front of every test in the config file.

@SlexAxton
Copy link
Member

(Technically a hacked together version of this is in Modernizr/modernizr.com as builderapp2.js -- just running against slightly more stale core code I think)

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

No branches or pull requests

3 participants