Skip to content

Commit 4ab0da5

Browse files
committed
build: bugsnag lib integration via npm
1 parent 9e7e574 commit 4ab0da5

6 files changed

Lines changed: 218 additions & 4 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ src/phoenix/virtualfs.js.map
4141
/src/thirdparty/marked.min.js
4242
test/thirdparty/jasmine-core
4343
test/thirdparty/jasmine-reporters
44+
/src/thirdparty/bugsnag.min.js
45+
/src/thirdparty/bugsnag.min.js.map
4446

4547
# ignore files copied from node_modules to src/thirdparty
4648
# https://github.com/phcode-dev/phoenix/issues/10

gulpfile.js/thirdparty-lib-copy.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ let copyThirdPartyLibs = series(
8383
// lessjs
8484
copyFiles.bind(copyFiles, ['node_modules/less/dist/less.min.js', 'node_modules/less/dist/less.min.js.map'],
8585
'src/thirdparty'),
86+
// bugsnag
87+
copyFiles.bind(copyFiles, ['node_modules/@bugsnag/browser/dist/bugsnag.min.js',
88+
'node_modules/@bugsnag/browser/dist/bugsnag.min.js.map'], 'src/thirdparty'),
89+
copyLicence.bind(copyLicence, 'node_modules/@bugsnag/browser/LICENSE.txt', 'bugsnag'),
8690
// tern js
8791
copyFiles.bind(copyFiles, ['node_modules/tern/defs/**/*'], 'src/thirdparty/tern/defs'),
8892
copyFiles.bind(copyFiles, ['node_modules/tern/lib/**/*'], 'src/thirdparty/tern/lib'),

package-lock.json

Lines changed: 190 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
}
7070
],
7171
"dependencies": {
72+
"@bugsnag/js": "^7.18.0",
7273
"@floating-ui/dom": "^0.5.4",
7374
"@fortawesome/fontawesome-free": "^6.1.2",
7475
"@highlightjs/cdn-assets": "^11.5.1",
@@ -91,4 +92,4 @@
9192
"tinycolor2": "^1.4.2",
9293
"underscore": "^1.13.4"
9394
}
94-
}
95+
}

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<link rel="stylesheet/less" type="text/css" href="styles/brackets.less">
4545

4646
<!-- JavaScript -->
47-
<script src="//d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js"></script>
47+
<script src="thirdparty/bugsnag.min.js"></script>
4848
<script src="logger.js" type="module"></script>
4949
<script type="text/javascript">
5050
//Bugsnag.notify(new Error('Test error'));
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) Bugsnag, https://www.bugsnag.com/
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the "Software"),
5+
to deal in the Software without restriction, including without limitation
6+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
7+
and/or sell copies of the Software, and to permit persons to whom the Software
8+
is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

0 commit comments

Comments
 (0)