Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cauchy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
cauchy-ui
Commits
ffa3c906
Commit
ffa3c906
authored
Aug 09, 2022
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: sentry接入
parent
538b9be0
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
281 additions
and
30 deletions
+281
-30
.sentryclirc.js
.sentryclirc.js
+23
-16
package-lock.json
package-lock.json
+239
-2
package.json
package.json
+2
-0
main.js
src/main.js
+7
-8
vue.config.js
vue.config.js
+10
-4
No files found.
.sentryclirc.js
View file @
ffa3c906
module
.
exports
=
{
const
crypto
=
require
(
'
crypto
'
);
// Sentry options are required
const
pkgInfo
=
require
(
'
./package.json
'
);
organization
:
'
sentry
'
,
const
project
=
pkgInfo
.
name
;
project
:
'
cauchy-ui
'
,
const
hashName
=
crypto
apiKey
:
'
0d3fa45c10f047d7bfe03eb268a93c23a878d7585dc749418f728f88d65e1477
'
,
.
createHash
(
'
md5
'
)
.
update
(
project
)
.
digest
(
'
hex
'
)
.
substr
(
0
,
8
);
// Release version name/hash is required
module
.
exports
=
{
release
:
'
cauchy-ui@1.0.0
'
,
org
:
'
sentry
'
,
baseSentryURL
:
'
http://sentry.quantgroups.com/api/0
'
,
project
,
deleteAfterCompile
:
true
,
authToken
:
'
3f1f6f3789594e3a81280c1cd8d4d1008037a7abad714698b60b6f358c3d7562
'
,
include
:
/static
\/
js
\/
/
,
// 只上传js和map文件
url
:
'
http://newsentry.quantgroups.com
'
,
ignore
:
[
'
node_modules
'
],
release
:
`
${
project
}
@1.0.0`
,
suppressErrors
:
true
,
ignore
:
[
'
node_modules
'
,
'
tests
'
],
filenameTransform
:
function
(
filename
)
{
silent
:
true
,
return
'
~/cauchy-ui/public/
'
+
filename
include
:
[
},
{
}
paths
:
[
'
./dist/js
'
],
urlPrefix
:
`https://misc.lkbang.net/
${
hashName
}
/`
}
]
};
package-lock.json
View file @
ffa3c906
This diff is collapsed.
Click to expand it.
package.json
View file @
ffa3c906
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
"
@qg/qg-scroll
"
:
"
^1.4.2
"
,
"
@qg/qg-scroll
"
:
"
^1.4.2
"
,
"
@qg/ui-request
"
:
"
0.0.20
"
,
"
@qg/ui-request
"
:
"
0.0.20
"
,
"
@qg/ui-track-web
"
:
"
0.0.3
"
,
"
@qg/ui-track-web
"
:
"
0.0.3
"
,
"
@sentry/vue
"
:
"
^7.9.0
"
,
"
clipboard
"
:
"
^2.0.8
"
,
"
clipboard
"
:
"
^2.0.8
"
,
"
core-js
"
:
"
^3.6.5
"
,
"
core-js
"
:
"
^3.6.5
"
,
"
crypto-js
"
:
"
^3.3.0
"
,
"
crypto-js
"
:
"
^3.3.0
"
,
...
@@ -31,6 +32,7 @@
...
@@ -31,6 +32,7 @@
"
@babel/plugin-proposal-nullish-coalescing-operator
"
:
"
^7.12.1
"
,
"
@babel/plugin-proposal-nullish-coalescing-operator
"
:
"
^7.12.1
"
,
"
@babel/plugin-proposal-optional-chaining
"
:
"
^7.12.7
"
,
"
@babel/plugin-proposal-optional-chaining
"
:
"
^7.12.7
"
,
"
@qg/webpack-cos-cdn-upload-plugin
"
:
"
1.0.2
"
,
"
@qg/webpack-cos-cdn-upload-plugin
"
:
"
1.0.2
"
,
"
@qg/sentry-webpack-plugin
"
:
"
^1.19.0
"
,
"
@vue/cli-plugin-babel
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-babel
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-eslint
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-eslint
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-router
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-router
"
:
"
^4.4.0
"
,
...
...
src/main.js
View file @
ffa3c906
...
@@ -8,21 +8,20 @@ import '@/service/cherryUI.service';
...
@@ -8,21 +8,20 @@ import '@/service/cherryUI.service';
import
'
./style/index.less
'
;
import
'
./style/index.less
'
;
import
saService
from
'
@/service/sa.service
'
;
import
saService
from
'
@/service/sa.service
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
import
Raven
from
'
raven-js
'
;
import
{
init
as
sentryInit
}
from
'
@sentry/vue
'
;
import
RavenVue
from
'
raven-js/plugins/vue
'
;
import
{
release
}
from
'
../.sentryclirc
'
;
import
fontResize
from
'
./directives/fontResize
'
;
import
fontResize
from
'
./directives/fontResize
'
;
import
cfg
from
'
./config
'
;
import
cfg
from
'
./config
'
;
import
FastClick
from
'
fastclick
'
;
import
FastClick
from
'
fastclick
'
;
FastClick
.
attach
(
document
.
body
,
{
tapDelay
:
1
});
FastClick
.
attach
(
document
.
body
,
{
tapDelay
:
1
});
if
(
process
.
env
.
SENTRY_ENV
!==
'
test
'
&&
process
.
env
.
NODE_ENV
===
'
production
'
)
{
if
(
process
.
env
.
SENTRY_ENV
!==
'
test
'
&&
process
.
env
.
NODE_ENV
===
'
production
'
)
{
Raven
.
config
(
'
//7fc2cea5ef8244fd9b4cf13051e408d8@sentry.quantgroups.com/73
'
,
{
sentryInit
({
release
,
Vue
,
dsn
:
'
http://d7ca98c07c6946b6b56a54b9707cb9b3@sentry.q-gp.com/15
'
,
// 项目设置中的Client Keys
release
:
'
cauchy-ui@1.0.0
'
,
// 项目名加版本号
tracesSampleRate
:
0.5
,
// 上报频率, 1最大, 0最小, 建议验证设置为1, 项目运行根据情况降低频率
environment
:
process
.
env
.
NODE_ENV
environment
:
process
.
env
.
NODE_ENV
})
});
.
addPlugin
(
RavenVue
,
Vue
)
.
install
();
}
}
Vue
.
prototype
.
util
=
new
Bridge
();
Vue
.
prototype
.
util
=
new
Bridge
();
Vue
.
prototype
.
$track
=
new
uiTrack
({
Vue
.
prototype
.
$track
=
new
uiTrack
({
...
...
vue.config.js
View file @
ffa3c906
const
path
=
require
(
'
path
'
);
const
path
=
require
(
'
path
'
);
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
);
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
);
const
IS_PROD
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
IS_PROD
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
webpack
=
require
(
'
webpack
'
);
const
WebpackCosCdnUploadPlugin
=
require
(
'
@qg/webpack-cos-cdn-upload-plugin
'
);
const
WebpackCosCdnUploadPlugin
=
require
(
'
@qg/webpack-cos-cdn-upload-plugin
'
);
// const SentryPlugin = require('webpack-sentry
-plugin');
const
SentryPlugin
=
require
(
'
@qg/sentry-webpack
-plugin
'
);
//
const SentryConfig = require('./.sentryclirc');
const
SentryConfig
=
require
(
'
./.sentryclirc
'
);
// cdn预加载使用
// cdn预加载使用
const
externals
=
{
const
externals
=
{
vue
:
'
Vue
'
,
vue
:
'
Vue
'
,
...
@@ -131,8 +132,13 @@ module.exports = {
...
@@ -131,8 +132,13 @@ module.exports = {
if
(
IS_PROD
)
{
if
(
IS_PROD
)
{
config
.
externals
=
externals
;
config
.
externals
=
externals
;
configObj
=
{
configObj
=
{
// plugins: [new SentryPlugin(SentryConfig), new WebpackCosCdnUploadPlugin()]
plugins
:
[
plugins
:
[
new
WebpackCosCdnUploadPlugin
()]
new
WebpackCosCdnUploadPlugin
(),
new
SentryPlugin
(
SentryConfig
),
new
webpack
.
DefinePlugin
({
'
process.env.SENTRY_ENV
'
:
`"
${
process
.
env
.
SENTRY_ENV
||
''
}
"`
})
]
};
};
}
}
return
configObj
;
return
configObj
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment