diff --git a/dist/doc/extend.md b/dist/doc/extend.md index 4dc0040f..35379d7e 100644 --- a/dist/doc/extend.md +++ b/dist/doc/extend.md @@ -118,25 +118,6 @@ and [Event](https://developers.google.com/analytics/devguides/collection/analyticsjs/events) Docs. -### Track jQuery AJAX requests in Google Analytics - -An article by @JangoSteve explains how to [track jQuery AJAX requests in Google -Analytics](https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/). - -Add this to `plugins.js`: - -```js -/* - * Log all jQuery AJAX requests to Google Analytics - * See: https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/ - */ -if (typeof ga !== "undefined" && ga !== null) { - $(document).ajaxSend(function(event, xhr, settings){ - ga('send', 'pageview', settings.url); - }); -} -``` - ### Track JavaScript errors in Google Analytics Add this function after `ga` is defined: diff --git a/dist/doc/html.md b/dist/doc/html.md index a29fddf0..f61c7935 100644 --- a/dist/doc/html.md +++ b/dist/doc/html.md @@ -167,13 +167,11 @@ it before the other scripts in the bottom of the page: ```html - ``` -If you like to just include the polyfills yourself, you could include them in -`js/plugins.js`. When you have a bunch of polyfills to load in, you could also +When you have a bunch of polyfills to load in, you could also create a `polyfills.js` file in the `js/vendor` directory or include the files individually and combine them using a build tool. Always ensure that the polyfills are all loaded before any other JavaScript. diff --git a/dist/doc/js.md b/dist/doc/js.md index 542c253a..58513cff 100644 --- a/dist/doc/js.md +++ b/dist/doc/js.md @@ -11,20 +11,6 @@ This file can be used to contain or reference your site/app JavaScript code. If you're working on something more advanced you might replace this file entirely. That's cool. -## plugins.js - -This file can be used to contain all your plugins, such as jQuery plugins and -other 3rd party scripts for a simple site. - -One approach is to put jQuery plugins inside of a `(function($){ ...})(jQuery);` -closure to make sure they're in the jQuery namespace safety blanket. Read more -about [jQuery plugin authoring](https://learn.jquery.com/plugins/). - -By default the `plugins.js` file contains a small script to avoid `console` -errors in browsers that lack a `console`. The script will make sure that, if a -console method isn't available, that method will have the value of empty -function, thus, preventing the browser from throwing an error. - ## vendor This directory can be used to contain all 3rd party library code. diff --git a/dist/doc/usage.md b/dist/doc/usage.md index ef85525d..92064644 100644 --- a/dist/doc/usage.md +++ b/dist/doc/usage.md @@ -36,7 +36,6 @@ A basic HTML5 Boilerplate site initially looks something like this: ├── img ├── js │ ├── app.js -│ ├── plugins.js │ └── vendor │ └── modernizr.min.js ├── .editorconfig diff --git a/dist/index.html b/dist/index.html index a6e1472a..b18a6a40 100644 --- a/dist/index.html +++ b/dist/index.html @@ -27,7 +27,6 @@

Hello world! This is HTML5 Boilerplate.

- diff --git a/dist/js/plugins.js b/dist/js/plugins.js deleted file mode 100644 index feb7d19e..00000000 --- a/dist/js/plugins.js +++ /dev/null @@ -1,24 +0,0 @@ -// Avoid `console` errors in browsers that lack a console. -(function() { - var method; - var noop = function () {}; - var methods = [ - 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', - 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', - 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', - 'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' - ]; - var length = methods.length; - var console = (window.console = window.console || {}); - - while (length--) { - method = methods[length]; - - // Only stub undefined methods. - if (!console[method]) { - console[method] = noop; - } - } -}()); - -// Place any jQuery/helper plugins in here. diff --git a/src/doc/extend.md b/src/doc/extend.md index 4dc0040f..35379d7e 100644 --- a/src/doc/extend.md +++ b/src/doc/extend.md @@ -118,25 +118,6 @@ and [Event](https://developers.google.com/analytics/devguides/collection/analyticsjs/events) Docs. -### Track jQuery AJAX requests in Google Analytics - -An article by @JangoSteve explains how to [track jQuery AJAX requests in Google -Analytics](https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/). - -Add this to `plugins.js`: - -```js -/* - * Log all jQuery AJAX requests to Google Analytics - * See: https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/ - */ -if (typeof ga !== "undefined" && ga !== null) { - $(document).ajaxSend(function(event, xhr, settings){ - ga('send', 'pageview', settings.url); - }); -} -``` - ### Track JavaScript errors in Google Analytics Add this function after `ga` is defined: diff --git a/src/doc/html.md b/src/doc/html.md index a29fddf0..f61c7935 100644 --- a/src/doc/html.md +++ b/src/doc/html.md @@ -167,13 +167,11 @@ it before the other scripts in the bottom of the page: ```html - ``` -If you like to just include the polyfills yourself, you could include them in -`js/plugins.js`. When you have a bunch of polyfills to load in, you could also +When you have a bunch of polyfills to load in, you could also create a `polyfills.js` file in the `js/vendor` directory or include the files individually and combine them using a build tool. Always ensure that the polyfills are all loaded before any other JavaScript. diff --git a/src/doc/js.md b/src/doc/js.md index 542c253a..58513cff 100644 --- a/src/doc/js.md +++ b/src/doc/js.md @@ -11,20 +11,6 @@ This file can be used to contain or reference your site/app JavaScript code. If you're working on something more advanced you might replace this file entirely. That's cool. -## plugins.js - -This file can be used to contain all your plugins, such as jQuery plugins and -other 3rd party scripts for a simple site. - -One approach is to put jQuery plugins inside of a `(function($){ ...})(jQuery);` -closure to make sure they're in the jQuery namespace safety blanket. Read more -about [jQuery plugin authoring](https://learn.jquery.com/plugins/). - -By default the `plugins.js` file contains a small script to avoid `console` -errors in browsers that lack a `console`. The script will make sure that, if a -console method isn't available, that method will have the value of empty -function, thus, preventing the browser from throwing an error. - ## vendor This directory can be used to contain all 3rd party library code. diff --git a/src/doc/usage.md b/src/doc/usage.md index ef85525d..92064644 100644 --- a/src/doc/usage.md +++ b/src/doc/usage.md @@ -36,7 +36,6 @@ A basic HTML5 Boilerplate site initially looks something like this: ├── img ├── js │ ├── app.js -│ ├── plugins.js │ └── vendor │ └── modernizr.min.js ├── .editorconfig diff --git a/src/index.html b/src/index.html index 22b12135..15cf4d7e 100644 --- a/src/index.html +++ b/src/index.html @@ -27,7 +27,6 @@

Hello world! This is HTML5 Boilerplate.

- diff --git a/src/js/plugins.js b/src/js/plugins.js deleted file mode 100644 index feb7d19e..00000000 --- a/src/js/plugins.js +++ /dev/null @@ -1,24 +0,0 @@ -// Avoid `console` errors in browsers that lack a console. -(function() { - var method; - var noop = function () {}; - var methods = [ - 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', - 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', - 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', - 'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' - ]; - var length = methods.length; - var console = (window.console = window.console || {}); - - while (length--) { - method = methods[length]; - - // Only stub undefined methods. - if (!console[method]) { - console[method] = noop; - } - } -}()); - -// Place any jQuery/helper plugins in here. diff --git a/test/file_existence.js b/test/file_existence.js index 74acfb0a..bd4ff1e8 100644 --- a/test/file_existence.js +++ b/test/file_existence.js @@ -48,7 +48,6 @@ const expectedFilesInDistDir = [ 'js/', 'js/app.js', - 'js/plugins.js', 'js/vendor/', `js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`,