Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a bundle that excludes the web-vitals vendor scripts #411

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* v2.22.4
- Add a new script bundle that doesn't include the web-vitals vendor script

* v2.22.3
- Fixes an issue where the heartbeat was not clearing the `xhrStatusMap` array due to `this` referring to the window object

Expand Down
61 changes: 57 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,61 @@ module.exports = function(grunt) {
},
dist: {
files: {
'dist/raygun.js': ['tracekit/tracekit.js', 'src/raygun.tracekit.jquery.js', 'src/polyfills.js', 'src/raygun.rum/vendor/web-vitals-polyfills.vendor.js', 'src/raygun.utilities/index.js', 'src/raygun.network-tracking.js', 'src/raygun.breadcrumbs.js', 'src/raygun.rum/core-web-vitals.js', 'src/raygun.js', 'src/raygun.rum/vendor/web-vitals.vendor.js', 'src/raygun.rum/index.js', 'src/raygun.loader.js'],
'dist/raygun.vanilla.js': ['tracekit/tracekit.js', 'src/polyfills.js', 'src/raygun.rum/vendor/web-vitals-polyfills.vendor.js', 'src/raygun.utilities/index.js', 'src/raygun.network-tracking.js', 'src/raygun.breadcrumbs.js', 'src/raygun.rum/core-web-vitals.js', 'src/raygun.js', 'src/raygun.rum/vendor/web-vitals.vendor.js', 'src/raygun.rum/index.js', 'src/raygun.loader.js'],
'dist/raygun.umd.js': ['src/umd.intro.js', 'tracekit/tracekit.js', 'src/polyfills.js', 'src/raygun.rum/vendor/web-vitals-polyfills.vendor.js', 'src/raygun.tracekit.jquery.js', 'src/raygun.utilities/index.js', 'src/raygun.network-tracking.js', 'src/raygun.breadcrumbs.js', 'src/raygun.rum/core-web-vitals.js', 'src/raygun.js', 'src/raygun.rum/vendor/web-vitals.vendor.js', 'src/raygun.rum/index.js', 'src/raygun.loader.js', 'src/umd.outro.js']
'dist/raygun.js': [
'tracekit/tracekit.js',
'src/raygun.tracekit.jquery.js',
'src/polyfills.js',
'src/raygun.rum/vendor/web-vitals-polyfills.vendor.js',
'src/raygun.utilities/index.js',
'src/raygun.network-tracking.js',
'src/raygun.breadcrumbs.js',
'src/raygun.rum/core-web-vitals.js',
'src/raygun.js',
'src/raygun.rum/vendor/web-vitals.vendor.js',
'src/raygun.rum/index.js',
'src/raygun.loader.js'
],
'dist/raygun.vanilla.js': [
'tracekit/tracekit.js',
'src/polyfills.js',
'src/raygun.rum/vendor/web-vitals-polyfills.vendor.js',
'src/raygun.utilities/index.js',
'src/raygun.network-tracking.js',
'src/raygun.breadcrumbs.js',
'src/raygun.rum/core-web-vitals.js',
'src/raygun.js',
'src/raygun.rum/vendor/web-vitals.vendor.js',
'src/raygun.rum/index.js',
'src/raygun.loader.js'
],
'dist/raygun.umd.js': [
'src/umd.intro.js',
'tracekit/tracekit.js',
'src/polyfills.js',
'src/raygun.rum/vendor/web-vitals-polyfills.vendor.js',
'src/raygun.tracekit.jquery.js',
'src/raygun.utilities/index.js',
'src/raygun.network-tracking.js',
'src/raygun.breadcrumbs.js',
'src/raygun.rum/core-web-vitals.js',
'src/raygun.js',
'src/raygun.rum/vendor/web-vitals.vendor.js',
'src/raygun.rum/index.js',
'src/raygun.loader.js',
'src/umd.outro.js'
],
'dist/raygun.nowebvitals.js': [
'tracekit/tracekit.js',
'src/raygun.tracekit.jquery.js',
'src/polyfills.js',
'src/raygun.utilities/index.js',
'src/raygun.network-tracking.js',
'src/raygun.breadcrumbs.js',
'src/raygun.rum/core-web-vitals.js',
'src/raygun.js',
'src/raygun.rum/index.js',
'src/raygun.loader.js'
],
}
}
},
Expand All @@ -37,7 +89,8 @@ module.exports = function(grunt) {
files: {
'dist/raygun.min.js': ['dist/raygun.js'],
'dist/raygun.vanilla.min.js': ['dist/raygun.vanilla.js'],
'dist/raygun.umd.min.js': ['dist/raygun.umd.js']
'dist/raygun.umd.min.js': ['dist/raygun.umd.js'],
'dist/raygun.nowebvitals.min.js': ['dist/raygun.nowebvitals.js'],
}
},
snippet:{
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,14 @@ Download the [production version][min] or the [development version][max]. You ca
the jQuery hooks if you are not using jQuery or you wish to provide your own hooks. Get this as a
[production version][min.vanilla] or [development version][max.vanilla].

The standard bundle includes the [web-vitals](https://github.com/GoogleChrome/web-vitals) base and polyfill scripts for automatically tracking Core Web Vitals metrics. If you prefer to add these yourself, there is a separate bundle that does not include the vendor scripts. This is available as a [production version][min.nowebvitals] or [development version][max.nowebvitals].

[min]: https://raw.github.com/MindscapeHQ/raygun4js/master/dist/raygun.min.js
[max]: https://raw.github.com/MindscapeHQ/raygun4js/master/dist/raygun.js
[min.vanilla]: https://raw.github.com/MindscapeHQ/raygun4js/master/dist/raygun.vanilla.min.js
[max.vanilla]: https://raw.github.com/MindscapeHQ/raygun4js/master/dist/raygun.vanilla.js
[min.nowebvitals]: https://raw.github.com/MindscapeHQ/raygun4js/master/dist/raygun.nowebvitals.min.js
[max.nowebvitals]: https://raw.github.com/MindscapeHQ/raygun4js/master/dist/raygun.nowebvitals.js

## Usage

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raygun4js",
"version": "2.22.0",
"version": "2.22.4",
"homepage": "http://raygun.io",
"authors": [
"Mindscape <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"title": "Raygun4js",
"description": "Raygun.com plugin for JavaScript",
"version": "2.22.3",
"version": "2.22.4",
"homepage": "https://github.com/MindscapeHQ/raygun4js",
"author": {
"name": "MindscapeHQ",
Expand Down
2 changes: 1 addition & 1 deletion raygun4js.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>raygun4js</id>
<version>2.22.0</version>
<version>2.22.4</version>
<title>Raygun4js</title>
<authors>Mindscape Limited</authors>
<owners>Mindscape Limited</owners>
Expand Down