How to use the ember-get-config.bundles function in ember-get-config

To help you get started, we’ve selected a few ember-get-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github duizendnegen / ember-cli-lazy-load / addon / services / bundle-loader.js View on Github external
_modifyConfig(){
        if(!config.bundles && config.enviroment==="development"){
            console.warn("please specify a bundles option in your enviroment config");
            return;
        }


        let jsonStr = Ember.$("meta[name='ember-asset-map']").attr("content");
        jsonStr = decodeURIComponent(jsonStr);
        let jsonObj = JSON.parse(jsonStr);
        let bundleMapKey   = Object.keys(jsonObj);

        Object.keys(config.bundles).forEach((key)=>{
            if(bundleMapKey.indexOf(key) > -1){
                config.bundles[key].url = jsonObj[key];
            }else {
                return '/assets/' + config.modulePrefix + "." + key + '.bundle.js';
            }
github duizendnegen / ember-cli-lazy-load / addon / mixins / lazy-route.js View on Github external
findBundleNameByRoute: function(routeName){
        //Find bundle for route
        var bundleName = null;
        var bundleNames = Object.keys(config.bundles);
        bundleNames.forEach(function(name) {
          var bundle = config.bundles[name];
          if(bundle.routes.indexOf(routeName) >= 0) {
            bundleName = name;
          }
        });

        return bundleName;

    },
    beforeModel: function(transition, queryParams){
github duizendnegen / ember-cli-lazy-load / addon / mixins / lazy-route.js View on Github external
bundleNames.forEach(function(name) {
          var bundle = config.bundles[name];
          if(bundle.routes.indexOf(routeName) >= 0) {
            bundleName = name;
          }
        });
github duizendnegen / ember-cli-lazy-load / addon / services / bundle-loader.js View on Github external
Object.keys(config.bundles).forEach((key)=>{
            if(bundleMapKey.indexOf(key) > -1){
                config.bundles[key].url = jsonObj[key];
            }else {
                return '/assets/' + config.modulePrefix + "." + key + '.bundle.js';
            }
        });