From c04150c73e773fe57fdebb2223b598e3257ad584 Mon Sep 17 00:00:00 2001 From: ZHAO Xudong Date: Thu, 23 Dec 2021 08:14:24 +0800 Subject: [PATCH] Fix: Avoid global style override --- bin/post-install.js | 20 +++++++++++++++++--- package-lock.json | 2 +- package.json | 2 +- src/lib/antd.less | 1 + src/manifest.json | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/bin/post-install.js b/bin/post-install.js index 15df3d2..e89f92b 100644 --- a/bin/post-install.js +++ b/bin/post-install.js @@ -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') @@ -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:') }) diff --git a/package-lock.json b/package-lock.json index 8a70290..48f12b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hubspot-embeddable-ringcentral-phone", - "version": "7.8.3", + "version": "7.9.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a89fad5..dae6098 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/lib/antd.less b/src/lib/antd.less index 9bc7505..855de88 100644 --- a/src/lib/antd.less +++ b/src/lib/antd.less @@ -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'; } \ No newline at end of file diff --git a/src/manifest.json b/src/manifest.json index 3f171b0..77d2fac 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -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://*/",