From 456a1785bb74287c610fd52488e35b506ce01704 Mon Sep 17 00:00:00 2001 From: timhub66 Date: Mon, 16 Dec 2024 11:10:46 +0800 Subject: [PATCH 1/2] fix: refix 1459 && 1460 --- src/sandbox/scoped_css.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sandbox/scoped_css.ts b/src/sandbox/scoped_css.ts index 923e7180..3d9469e7 100644 --- a/src/sandbox/scoped_css.ts +++ b/src/sandbox/scoped_css.ts @@ -116,7 +116,7 @@ class CSSParser { return matchRes.replace(/(^|,[\n\s]*)([^,]+)/g, (_, separator, selector) => { selector = trim(selector) - selector = selector.replace(/\[([^\]=]+)(?:=([^\]]+))?\]/g, (match:string, p1: string) => { + selector = selector.replace(/\[[^\]=]+(?:=([^\]]+))?\]/g, (match:string, p1: string) => { if (attributeValues[p1]) { return match.replace(p1, attributeValues[p1]) } From f8e2f4217dbdecd7bf314353fcc1b2ae6dcbccc6 Mon Sep 17 00:00:00 2001 From: timhub66 Date: Mon, 16 Dec 2024 16:18:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E4=BB=93=E5=BA=93=E8=BF=81?= =?UTF-8?q?=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DEVELOP.md | 2 +- DEVELOP.zh-cn.md | 2 +- README.md | 32 ++--- README.zh-cn.md | 34 ++--- dev/children/react16/src/index.js | 4 +- dev/children/vite2/src/main.js | 2 +- dev/children/vite4/src/main.js | 2 +- .../components/GlobalHeader/RightContent.jsx | 2 +- docs/0.x/docs.html | 4 +- docs/0.x/en-us/changelog.md | 22 +-- docs/0.x/zh-cn/advanced.md | 2 +- docs/0.x/zh-cn/changelog.md | 22 +-- docs/0.x/zh-cn/chat.md | 4 +- docs/0.x/zh-cn/deploy.md | 30 ++--- docs/0.x/zh-cn/framework/angular.md | 2 +- docs/0.x/zh-cn/framework/nextjs.md | 4 +- docs/0.x/zh-cn/framework/nuxtjs.md | 4 +- docs/0.x/zh-cn/framework/react.md | 2 +- docs/0.x/zh-cn/framework/vite.md | 4 +- docs/0.x/zh-cn/framework/vue.md | 6 +- docs/0.x/zh-cn/plugins.md | 2 +- docs/docs.html | 4 +- docs/en-us/changelog.md | 22 +-- docs/index.html | 10 +- docs/zh-cn/changelog.md | 126 +++++++++--------- docs/zh-cn/chat.md | 4 +- docs/zh-cn/deploy.md | 30 ++--- docs/zh-cn/framework/nextjs.md | 2 +- docs/zh-cn/framework/nuxtjs.md | 2 +- docs/zh-cn/micro-app-devtools.md | 8 +- docs/zh-cn/plugins.md | 2 +- package.json | 4 +- src/create_app.ts | 2 +- src/libs/utils.ts | 4 +- src/micro_app_element.ts | 2 +- src/sandbox/adapter.ts | 2 +- src/sandbox/iframe/document.ts | 2 +- src/sandbox/iframe/special_key.ts | 2 +- src/sandbox/scoped_css.ts | 2 +- src/sandbox/with/window.ts | 2 +- src/source/patch.ts | 6 +- src/source/scripts.ts | 2 +- 42 files changed, 214 insertions(+), 214 deletions(-) diff --git a/DEVELOP.md b/DEVELOP.md index c83b85a0..b0054168 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -2,7 +2,7 @@ ### clone & run project ```bash -git clone https://github.com/micro-zoe/micro-app.git +git clone https://github.com/jd-opensource/micro-app.git cd micro-app diff --git a/DEVELOP.zh-cn.md b/DEVELOP.zh-cn.md index 86b5e3fa..5de739f3 100644 --- a/DEVELOP.zh-cn.md +++ b/DEVELOP.zh-cn.md @@ -2,7 +2,7 @@ ### 下载并运行 ```bash -git clone https://github.com/micro-zoe/micro-app.git +git clone https://github.com/jd-opensource/micro-app.git cd micro-app diff --git a/README.md b/README.md index 84d76061..9fd1e3d2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- - logo + + logo

@@ -11,21 +11,21 @@ downloads - + license - + WeChat - - travis + + travis - - coveralls + + coveralls

-English|[简体中文](./README.zh-cn.md)|[Documentation](https://micro-zoe.github.io/micro-app/)|[Discussions](https://github.com/micro-zoe/micro-app/discussions)|[WeChat](./Contact.md) +English|[简体中文](./README.zh-cn.md)|[Documentation](https://jd-opensource.github.io/micro-app/)|[Discussions](https://github.com/jd-opensource/micro-app/discussions)|[WeChat](./Contact.md) # 📖Introduction micro-app is a micro front-end framework launched by JD Retail. It renders based on webcomponent-like and realizes the micro front-end from component thinking, it aiming to reduce the difficulty of getting started and improve work efficiency. @@ -72,7 +72,7 @@ The above micro front-end rendering is completed, and the effect is as follows: ![image](https://img10.360buyimg.com/imagetools/jfs/t1/188373/14/17696/41854/6111f4a0E532736ba/4b86f4f8e2044519.png) -More detailed configuration can be viewed [Documentation](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/start). +More detailed configuration can be viewed [Documentation](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/start). # 🤝 Contribution If you're interested in this project, you're welcome to mention pull request, and also welcome your "Star" ^_^ @@ -80,7 +80,7 @@ If you're interested in this project, you're welcome to mention pull request, an ### development 1、Clone ``` -git clone https://github.com/micro-zoe/micro-app.git +git clone https://github.com/jd-opensource/micro-app.git ``` 2、Install dependencies @@ -93,7 +93,7 @@ yarn bootstrap yarn start ``` -For more commands, see [DEVELOP](https://github.com/micro-zoe/micro-app/blob/master/DEVELOP.md) +For more commands, see [DEVELOP](https://github.com/jd-opensource/micro-app/blob/master/DEVELOP.md) # FAQ
@@ -138,19 +138,19 @@ For more commands, see [DEVELOP](https://github.com/micro-zoe/micro-app/blob/mas
Does it support vite? - Yes, please see [adapt vite](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/framework/vite) for details. + Yes, please see [adapt vite](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/framework/vite) for details.
Does it support ssr? - Yes, please see [nextjs](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/framework/nextjs), [nuxtjs](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/framework/nuxtjs) for details. + Yes, please see [nextjs](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/framework/nextjs), [nuxtjs](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/framework/nuxtjs) for details.
# Contributors - + # License -[MIT License](https://github.com/micro-zoe/micro-app/blob/master/LICENSE) +[MIT License](https://github.com/jd-opensource/micro-app/blob/master/LICENSE) diff --git a/README.zh-cn.md b/README.zh-cn.md index 1f1d168f..9a17ccd6 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -1,5 +1,5 @@

- + logo

@@ -11,21 +11,21 @@ downloads - + license - + WeChat - - travis + + travis - - coveralls + + coveralls

-[English](https://github.com/micro-zoe/micro-app)|简体中文|[官网文档](https://micro-zoe.github.io/micro-app/)|[讨论组](https://github.com/micro-zoe/micro-app/discussions)|[微信群](./Contact.md) +[English](https://github.com/jd-opensource/micro-app)|简体中文|[官网文档](https://jd-opensource.github.io/micro-app/)|[讨论组](https://github.com/jd-opensource/micro-app/discussions)|[微信群](./Contact.md) # 📖简介 micro-app是京东零售推出的一款微前端框架,它基于类WebComponent进行渲染,从组件化的思维实现微前端,旨在降低上手难度、提升工作效率。它是目前接入微前端成本最低的框架,并且提供了JS沙箱、样式隔离、元素隔离、预加载、虚拟路由系统、插件系统、数据通信等一系列完善的功能。 @@ -69,7 +69,7 @@ devServer: { result -更多详细配置可以查看[官网文档](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/start) +更多详细配置可以查看[官网文档](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/start) # 🤝 参与共建 如果您对这个项目感兴趣,欢迎参与贡献,也欢迎 "Star" 支持一下 ^_^ @@ -77,7 +77,7 @@ devServer: { ### 本地运行 1、克隆项目 ``` -git clone https://github.com/micro-zoe/micro-app.git +git clone https://github.com/jd-opensource/micro-app.git ``` 2、安装依赖 @@ -90,16 +90,16 @@ yarn bootstrap yarn start # 访问 http://localhost:3000 ``` -更多命令请查看[DEVELP](https://github.com/micro-zoe/micro-app/blob/master/DEVELOP.zh-cn.md) +更多命令请查看[DEVELP](https://github.com/jd-opensource/micro-app/blob/master/DEVELOP.zh-cn.md) # FAQ -[问题汇总](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/questions) +[问题汇总](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/questions)
micro-app的优势在哪里? 上手简单、侵入性低,只需改动少量的代码即可接入微前端,同时提供丰富的功能。 - 具体细节请参考文章:[micro-app介绍](https://github.com/micro-zoe/micro-app/issues/8) + 具体细节请参考文章:[micro-app介绍](https://github.com/jd-opensource/micro-app/issues/8)
@@ -136,21 +136,21 @@ yarn start # 访问 http://localhost:3000
支持vite吗? - 支持,详情请查看[适配vite](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/framework/vite) + 支持,详情请查看[适配vite](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/framework/vite)
支持ssr吗? - 支持,详情请查看[nextjs](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/framework/nextjs)、[nuxtjs](https://micro-zoe.github.io/micro-app/docs.html#/zh-cn/framework/nuxtjs) + 支持,详情请查看[nextjs](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/framework/nextjs)、[nuxtjs](https://jd-opensource.github.io/micro-app/docs.html#/zh-cn/framework/nuxtjs)
# 贡献者们 - + # License -[MIT License](https://github.com/micro-zoe/micro-app/blob/master/LICENSE) +[MIT License](https://github.com/jd-opensource/micro-app/blob/master/LICENSE) diff --git a/dev/children/react16/src/index.js b/dev/children/react16/src/index.js index b3c75987..62a2ddb5 100644 --- a/dev/children/react16/src/index.js +++ b/dev/children/react16/src/index.js @@ -260,7 +260,7 @@ document.head.insertAdjacentElement('afterbegin', dynamicScript3) /* ---------------------- DOMParser --------------------- */ -// // BUG TEST: https://github.com/micro-zoe/micro-app/issues/56 +// // BUG TEST: https://github.com/jd-opensource/micro-app/issues/56 // const parser = new DOMParser() // const htmlString = ` //
@@ -556,7 +556,7 @@ console.log('micro-app容器元素document.microAppElement', document.microAppEl /* ---------------------- 测试unhandledrejection --------------------- */ -// https://github.com/micro-zoe/micro-app/issues/1102 +// https://github.com/jd-opensource/micro-app/issues/1102 // window.addEventListener('unhandledrejection', (event) => { // console.error(`子应用Promise报错监听 -- window.addEventListener(unhandledrejection): `, event) // event.preventDefault() diff --git a/dev/children/vite2/src/main.js b/dev/children/vite2/src/main.js index 5170d824..f53ccca2 100644 --- a/dev/children/vite2/src/main.js +++ b/dev/children/vite2/src/main.js @@ -211,7 +211,7 @@ window.onclick = function () { /* ---------------------- DOMParser --------------------- */ -// BUG TEST: https://github.com/micro-zoe/micro-app/issues/56 +// BUG TEST: https://github.com/jd-opensource/micro-app/issues/56 // const parser = new DOMParser() // const htmlString = ` //
diff --git a/dev/children/vite4/src/main.js b/dev/children/vite4/src/main.js index 8dba7f49..a3aaa4af 100644 --- a/dev/children/vite4/src/main.js +++ b/dev/children/vite4/src/main.js @@ -259,7 +259,7 @@ setTimeout(() => { /* ---------------------- DOMParser --------------------- */ -// BUG TEST: https://github.com/micro-zoe/micro-app/issues/56 +// BUG TEST: https://github.com/jd-opensource/micro-app/issues/56 // const parser = new DOMParser() // const htmlString = ` //
diff --git a/dev/main-react16/src/components/GlobalHeader/RightContent.jsx b/dev/main-react16/src/components/GlobalHeader/RightContent.jsx index 0793ca03..5568596b 100644 --- a/dev/main-react16/src/components/GlobalHeader/RightContent.jsx +++ b/dev/main-react16/src/components/GlobalHeader/RightContent.jsx @@ -52,7 +52,7 @@ const GlobalHeaderRight = (props) => { color: 'inherit', }} target="_blank" - href="https://github.com/micro-zoe/micro-app/" + href="https://github.com/jd-opensource/micro-app/" rel="noopener noreferrer" className={styles.action} > diff --git a/docs/0.x/docs.html b/docs/0.x/docs.html index 2d45a324..1866f0c9 100755 --- a/docs/0.x/docs.html +++ b/docs/0.x/docs.html @@ -36,9 +36,9 @@