Skip to content

Commit

Permalink
Fix: Avoid global style override
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdong262 committed Dec 23, 2021
1 parent d48b65e commit c04150c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
20 changes: 17 additions & 3 deletions bin/post-install.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
/**
* post install script
*/
const { cp } = require('shelljs')
const { existsSync } = require('fs')
const { resolve } = require('path')
const {
cp
} = require('shelljs')
const {
existsSync
} = require('fs')
const {
resolve
} = require('path')
const prePushPath = resolve(__dirname, '../.git/hooks/pre-push')
const prePushPathFrom = resolve(__dirname, 'pre-push')

Expand All @@ -19,8 +25,16 @@ const removeAntdGlobalStyles = () => {
from: "@import 'base';",
to: ''
}
const options1 = {
files: [`${process.cwd()}/node_modules/antd/lib/style/core/index.less`, `${process.cwd()}/node_modules/antd/es/style/core/index.less`],
from: "@import 'global';",
to: ''
}

replace(options)
.then(() => {
return replace(options1)
})
.then(() => {
console.log('[INFO] Successfully Removed Antd Global Styles:')
})
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hubspot-embeddable-ringcentral-phone",
"version": "7.9.2",
"version": "7.9.3",
"description": "RingCentral Chrome extension for HubSpot based on RingCentral Embeddable",
"main": "index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/lib/antd.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import '~antd/lib/style/themes/default.less';
@import '~antd/lib/style/mixins/index.less';
*[class*='ant-'] {
@import '~antd/lib/style/core/global.less';
@import '~antd/lib/style/core/base.less';
}
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "RingCentral for HubSpot",
"description": "RingCentral Chrome extension for HubSpot based on RingCentral Embeddable",
"version": "7.9.2",
"version": "7.9.3",
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArrMAkcBow9EOct8y5xh1Ddyp+2KcWaLK4VtVzRZZlXQYDCE/gnCkiiZWrgkbWuLYdwAS9nfkrzbvxKXDXbqESMbo1JHNF4QFw2I6yv8AIpcpx7h4he4JmUc9hTErCd3I3WnsWluEoPC21kJx2HgVRHUR/9zR677t+42B70rcR2P0s9/+KsRN4vwau377xYCT2szjzfeluxrriG0v4nuggxWoZ8sFgIizJEv8jMOX9Xak3Y/4JK+1f9bffdN5wTQwvMDZKhsHJs/qgpis0GF6B9QW1CC80uj2UxjvcHMUabh83ozaawO+66d4f/opB20FltkY7ufD7jxcw4ebQpSD2wIDAQAB",
"permissions": [
"http://*/",
Expand Down

0 comments on commit c04150c

Please sign in to comment.