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

Adapt code to new google library #4

Open
mike-thompson-day8 opened this issue Sep 6, 2015 · 0 comments
Open

Adapt code to new google library #4

mike-thompson-day8 opened this issue Sep 6, 2015 · 0 comments

Comments

@mike-thompson-day8
Copy link
Owner

Change this code:
https://github.com/mike-thompson-day8/cljsbuild-none-test-seed/blob/master/test.html#L118-L124

To this:

       var pathToName = {};
        for (var key in goog.dependencies_.nameToPath) {
            var value = goog.dependencies_.nameToPath[key];
            pathToName[value] = key;
        }
        for (var key in goog.dependencies_.requires) {
            if (goog.dependencies_.requires.hasOwnProperty(key)) {
                if (goog.dependencies_.requires[key]["cljs.core"]) {
                    //as key is a path find its namespace
                    goog.require(pathToName[key]);    // will trigger CLOSURE_IMPORT_SCRIPT calls which injectJs into page
                }
            }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant