diff --git a/.gitignore b/.gitignore index b375316..038c82d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ public/components .settings/ components/ css/bundle.css +js/bowr.js diff --git a/GAnalytics.js b/GAnalytics.js new file mode 100644 index 0000000..c36f57f --- /dev/null +++ b/GAnalytics.js @@ -0,0 +1 @@ +!function(e,n,t,a,i,c,o){e.GoogleAnalyticsObject=i,e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].l=1*new Date,c=n.createElement(t),o=n.getElementsByTagName(t)[0],c.async=1,c.src=a,o.parentNode.insertBefore(c,o)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-60676910-1","auto"),ga("send","pageview");var appInsights=window.appInsights||function(e){function n(e){i[e]=function(){var n=arguments;i.queue.push(function(){i[e].apply(i,n)})}}var t,a,i={config:e},c=document,o=window,r="script",s=c.createElement(r);for(s.src=e.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",c.getElementsByTagName(r)[0].parentNode.appendChild(s),i.cookie=c.cookie,i.queue=[],t=["Event","Exception","Metric","PageView","Trace"];t.length;)n("track"+t.pop());return e.disableExceptionTracking||(t="onerror",n("_"+t),a=o[t],o[t]=function(e,n,c,o,r){var s=a&&a(e,n,c,o,r);return s!==!0&&i["_"+t](e,n,c,o,r),s}),i}({instrumentationKey:"8ca49161-65fa-4f75-af00-fc302149575f"});window.appInsights=appInsights,appInsights.trackPageView(); diff --git a/bower.json b/bower.json index 6a17975..990c184 100644 --- a/bower.json +++ b/bower.json @@ -7,13 +7,9 @@ "components" ], "dependencies": { - "jquery": "~2.1.4", - "bootstrap": "~3.3.5", "mustache": "~2.1.2", "jquery-rss": "~1.5.1", "install": "~1.0.4", - "jquery.easing": "~1.3.1", - "lodestoneapi.min": "http://xivsync.com/lodestoneapi.min.js", - "font-awesome": "~4.3.0" + "jquery.easing": "~1.3.1" } } diff --git a/deploy.cmd b/deploy.cmd index a9fe181..d8fa239 100644 --- a/deploy.cmd +++ b/deploy.cmd @@ -108,7 +108,7 @@ IF EXIST "%DEPLOYMENT_TARGET%\package.json" ( :: 4. Install gulp IF EXIST "%DEPLOYMENT_TARGET%\gulpfile.js" ( pushd "%DEPLOYMENT_TARGET%" - call :ExecuteCmd !NPM_CMD! install gulp gulp-cache-bust gulp-concat-css gulp-uglify html-minifier + call :ExecuteCmd !NPM_CMD! install gulp gulp-cache-bust gulp-concat-css gulp-uglify html-minifier gulp-concat call .\node_modules\.bin\gulp publish IF !ERRORLEVEL! NEQ 0 goto error popd diff --git a/gulpfile.js b/gulpfile.js index 52bb07d..191db64 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,7 +7,8 @@ var gulp = require('gulp'), cachebust = require('gulp-cache-bust'), minifyCss = require('gulp-minify-css'), minify = require('html-minifier').minify, - fs = require("fs"); + fs = require("fs"), + concat = require('gulp-concat'); @@ -58,8 +59,15 @@ gulp.task('develop', function () { }); gulp.task('minifyJs', function() { - return gulp.src('js/*.js') + return gulp.src(['js/*.js', 'components/**/*.min.js']) .pipe(uglify()) + .pipe(concat('bowr.js')) + .pipe(gulp.dest('js')); +}); + +gulp.task('combineJs', function() { + return gulp.src(['js/*.js', 'components/**/*.min.js']) + .pipe(concat('bowr.js')) .pipe(gulp.dest('js')); }); @@ -82,6 +90,7 @@ gulp.task('publish', [ gulp.task('default', [ 'develop', + 'combineJs', 'combineCss', 'watch' ]); diff --git a/index.html b/index.html index f31288c..71f26b4 100644 --- a/index.html +++ b/index.html @@ -11,9 +11,9 @@ - + - + @@ -23,8 +23,7 @@ - - +
@@ -291,16 +290,11 @@ tommyparnell.com - - - - - - - - - - + + + + + diff --git a/js/GAnalytics.js b/js/GAnalytics.js deleted file mode 100644 index b591d14..0000000 --- a/js/GAnalytics.js +++ /dev/null @@ -1,7 +0,0 @@ - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m); - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - -ga('create', 'UA-60676910-1', 'auto'); -ga('send', 'pageview'); \ No newline at end of file diff --git a/js/GAnalytics.min.js b/js/GAnalytics.min.js deleted file mode 100644 index 42f3a17..0000000 --- a/js/GAnalytics.min.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(n,t,i,r,u,f,e){n.GoogleAnalyticsObject=u;n[u]=n[u]||function(){(n[u].q=n[u].q||[]).push(arguments)};n[u].l=1*new Date;f=t.createElement(i);e=t.getElementsByTagName(i)[0];f.async=1;f.src=r;e.parentNode.insertBefore(f,e)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create","UA-60676910-1","auto");ga("send","pageview"); -//# sourceMappingURL=GAnalytics.min.js.map diff --git a/js/GAnalytics.min.js.map b/js/GAnalytics.min.js.map deleted file mode 100644 index 856e0a3..0000000 --- a/js/GAnalytics.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -{ -"version":3, -"file":"GAnalytics.min.js", -"lineCount":1, -"mappings":"CAAG,QAAQ,CAACA,CAAC,CAACC,CAAC,CAACC,CAAC,CAACC,CAAC,CAACC,CAAC,CAACC,CAAC,CAACC,CAAb,CAAe,CAACN,CAAEO,sBAAwB,CAACH,CAAC,CAACJ,CAAE,CAAAI,CAAA,CAAE,CAACJ,CAAE,CAAAI,CAAA,CAAE,EAAE,QAAQ,CAAA,CAAE,CACvE,CAACJ,CAAE,CAAAI,CAAA,CAAEI,EAAE,CAACR,CAAE,CAAAI,CAAA,CAAEI,EAAE,EAAE,CAAA,CAAhB,CAAmBC,KAAK,CAACC,SAAD,CAD+C,C,CAClCV,CAAE,CAAAI,CAAA,CAAEO,EAAE,CAAC,CAAC,CAAC,IAAIC,I,CAAOP,CAAC,CAACJ,CAACY,cAAc,CAACX,CAAD,C,CAC1EI,CAAC,CAACL,CAACa,qBAAqB,CAACZ,CAAD,CAAI,CAAA,CAAA,C,CAAGG,CAACU,MAAM,CAAC,CAAC,CAACV,CAACW,IAAI,CAACb,CAAC,CAACG,CAACW,WAAWC,aAAa,CAACb,CAAC,CAACC,CAAH,CAFtD,EAGtB,CAACa,MAAM,CAACC,QAAQ,CAAC,QAAQ,CAAC,yCAAyC,CAAC,IAApE,CAAyE,CAE7EC,EAAE,CAAC,QAAQ,CAAE,eAAe,CAAE,MAA5B,CAAmC,CACrCA,EAAE,CAAC,MAAM,CAAE,UAAT,CAAoB", -"sources":["GAnalytics.js"], -"names":["i","s","o","g","r","a","m","GoogleAnalyticsObject","q","push","arguments","l","Date","createElement","getElementsByTagName","async","src","parentNode","insertBefore","window","document","ga"] -} diff --git a/js/appInsight.js b/js/appInsight.js deleted file mode 100644 index cb7474d..0000000 --- a/js/appInsight.js +++ /dev/null @@ -1,8 +0,0 @@ -var appInsights=window.appInsights||function(config){ - function s(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},r=document,f=window,e="script",o=r.createElement(e),i,u;for(o.src=config.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",r.getElementsByTagName(e)[0].parentNode.appendChild(o),t.cookie=r.cookie,t.queue=[],i=["Event","Exception","Metric","PageView","Trace"];i.length;)s("track"+i.pop());return config.disableExceptionTracking||(i="onerror",s("_"+i),u=f[i],f[i]=function(config,r,f,e,o){var s=u&&u(config,r,f,e,o);return s!==!0&&t["_"+i](config,r,f,e,o),s}),t -}({ - instrumentationKey:"8ca49161-65fa-4f75-af00-fc302149575f" -}); - -window.appInsights=appInsights; -appInsights.trackPageView(); diff --git a/js/lodestoneapi.js b/js/lodestoneapi.js deleted file mode 100644 index 2039bdf..0000000 --- a/js/lodestoneapi.js +++ /dev/null @@ -1,150 +0,0 @@ -/* -------------------------------------------------- - * XIVPads.com (v5) - Lodestone API (Javascript) - * This runs off: XIVSync.com - * - * > requires jquery. - * -------------------------------------------------- - * API calls will match those of the PHP API, so for - * example, you can do: - * - * LodestoneAPI.Search.Character(Name, Server); - * LodestoneAPI.Search.Character(123456); - */ -var LodestoneAPI = -{ - logEnabled: false, - - paths: - { - sync: 'http://xivsync.com', - search: '/search/character', - character: '/character/get', - }, - - // Initialize - init: function() - { - LodestoneAPI.log('init()'); - - // check for jquery. - if (typeof window.jQuery == 'undefined') { - console.error('Please include https://jquery.com/, this API requires it.'); - } - }, - - // wrapper for ajaxing - get: function(url, data, callback) - { - LodestoneAPI.log('get', url); - LodestoneAPI.log('get', data); - - $.ajax({ - url: url, - data: data, - crossDomain: true, - dataType: 'json', - success: function(data) - { - LodestoneAPI.log('get > return', data); - if (data.ok) { - return callback(data.data); - } - - console.error('XIVSync API Error: '+ data.msg); - return callback(false); - }, - error: function(data, status, error) - { - console.error('Error attempting to ajax to: ' + url); - console.error(status); - console.error(error); - console.error('Please open an issue on Github: https://github.com/viion/XIVPads-LodestoneAPI'); - return callback(false); - }, - }) - }, - - // Logging - log: function(text, data) - { - if (LodestoneAPI.logEnabled) { - if (data) { - console.log('[LODESTONE-API]', text, data); - return; - } - - console.log('[LODESTONE-API]', text); - } - }, - - // Search for thingz - Search: - { - Character: function(nameOrId, server, callback, recurrsive) - { - if (!callback || typeof callback !== 'function') { - console.error('Callback function not defined.'); - return; - } - - if (!nameOrId) { - console.error('Name or ID is empty'); - return callback(false); - } - - // if numeric, can just get character - // else we have to search! - if ($.isNumeric(nameOrId)) - { - LodestoneAPI.log('search > character > isNumeric = true =', nameOrId); - - var url = LodestoneAPI.paths.sync + LodestoneAPI.paths.character, - data = { lodestone: nameOrId } - - LodestoneAPI.get(url, data, function(data) - { - // if empty - if (data.length == 0) { - return callback(false); - } - - return callback(data); - }); - } - else if (!recurrsive) - { - LodestoneAPI.log('search > character > isNumeric = false =', nameOrId); - - var url = LodestoneAPI.paths.sync + LodestoneAPI.paths.search, - data = { name: nameOrId, server: server } - - // get - LodestoneAPI.get(url, data, function(data) - { - // if empty - if (data.length == 0) { - return callback(false); - } - - - // Try match server and name - for (var i in data) - { - var c = data[i]; - if (c.name == nameOrId && c.world == server && $.isNumeric(c.i)); - { - // recurrsive callback on character using id - LodestoneAPI.log('search > character > recurrsion with id:', c.id); - LodestoneAPI.Search.Character(c.id, null, callback, true); - return; - } - } - - LodestoneAPI.log('search > character > no results for: ', nameOrId); - return callback(false); - }); - } - }, - }, -} -LodestoneAPI.init(); \ No newline at end of file diff --git a/package.json b/package.json index 03d448a..2114dbd 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "devDependencies": { "gulp": "~3.8.10", "gulp-cache-bust": "^1.0.1", + "gulp-concat": "^2.6.0", "gulp-concat-css": "^2.2.0", "gulp-less": "~3.0.1", "gulp-livereload": "~3.8.0",