diff --git a/Gruntfile.js b/Gruntfile.js index 8844d8e30..e4d0a51ef 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -115,6 +115,7 @@ module.exports = function(grunt) { 'lib/angular-foundation/mm-foundation.min.js', 'lib/angular-foundation/mm-foundation-tpls.min.js', 'lib/angular-gettext/dist/angular-gettext.min.js' + 'lib/angular-load/angular-load.min.js', ], dest: 'lib/angularjs-all.js' }, diff --git a/config.js b/config.js index a22baad87..fe4031e42 100644 --- a/config.js +++ b/config.js @@ -50,6 +50,15 @@ var defaultConfig = { updateFrequencySeconds: 60 * 60 }, + verbose: 1, + + plugins: { + googleDrive: true, + }, + + googleDrive: { + clientId: '1', + }, }; if (typeof module !== 'undefined') module.exports = defaultConfig; diff --git a/js/app.js b/js/app.js index 177755b2a..a5c169307 100644 --- a/js/app.js +++ b/js/app.js @@ -18,7 +18,13 @@ if (localConfig) { } } +var log = function() { + if (config.verbose) console.log(arguments); +} var copayApp = window.copayApp = angular.module('copayApp', [ + + +var modules = [ 'ngRoute', 'angularMoment', 'mm.foundation', @@ -29,7 +35,12 @@ var copayApp = window.copayApp = angular.module('copayApp', [ 'copayApp.services', 'copayApp.controllers', 'copayApp.directives', -]); +]; + +if (config.plugins.googleDrive) + modules.push('angularLoad'); + +var copayApp = window.copayApp = angular.module('copayApp', modules); copayApp.config(function($sceDelegateProvider) { $sceDelegateProvider.resourceUrlWhitelist([