From 02a263df2d6b44d42cdbddb4ad90b45dd9380f73 Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Fri, 5 Apr 2013 19:38:30 +0100 Subject: [PATCH] Added smart custo detection --- cache.manifest | 2 +- js/{prod/custo.js => custo.github.js} | 0 js/main.js | 10 ++++------ 3 files changed, 5 insertions(+), 7 deletions(-) rename js/{prod/custo.js => custo.github.js} (100%) diff --git a/cache.manifest b/cache.manifest index a5473ebc..95ab18b0 100644 --- a/cache.manifest +++ b/cache.manifest @@ -1 +1 @@ -CACHE MANIFEST # v24 CACHE: index.html css/bootstrap.css css/jgrowl.css css/main.css js/prod/custo.js js/async-runner.js js/bootstrap.js js/config.js js/gdrive.js js/jgrowl.js js/jquery.js js/jquery-ui.js js/layout.js js/main.js js/Markdown.Converter.js js/Markdown.Editor.js js/Markdown.Sanitizer.js js/require.js js/synchronizer.js img/ajax-loader.gif img/dropbox.png img/gdrive.png img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/stackedit-16.png img/stackedit-32.ico NETWORK: * +CACHE MANIFEST # v24 CACHE: index.html css/bootstrap.css css/jgrowl.css css/main.css js/async-runner.js js/bootstrap.js js/config.js js/custo.github.js js/gdrive.js js/jgrowl.js js/jquery.js js/jquery-ui.js js/layout.js js/main.js js/Markdown.Converter.js js/Markdown.Editor.js js/Markdown.Sanitizer.js js/require.js js/synchronizer.js img/ajax-loader.gif img/dropbox.png img/gdrive.png img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/stackedit-16.png img/stackedit-32.ico NETWORK: * diff --git a/js/prod/custo.js b/js/custo.github.js similarity index 100% rename from js/prod/custo.js rename to js/custo.github.js diff --git a/js/main.js b/js/main.js index 43abbf01..eb11db86 100644 --- a/js/main.js +++ b/js/main.js @@ -1,14 +1,12 @@ -// Use specific customization for production -var custoPath = 'dev/custo'; +// Use specific customization for sites +var configPaths = {}; if(location.hostname == "benweet.github.com") { - custoPath = 'prod/custo'; + paths.custo = 'custo.github'; } // RequireJS configuration requirejs.config({ - paths: { - 'custo': custoPath - }, + paths: configPaths, shim: { 'jquery-ui': ['jquery'], 'bootstrap': ['jquery'],