Skip to content

Commit

Permalink
chore: remove useless script and upgrade @ahooks.js/dumi-theme-antd (#…
Browse files Browse the repository at this point in the history
…2504)

* chore: remove useless script

* chore: update @ahooks.js/dumi-theme-antd
  • Loading branch information
liuyib authored Mar 28, 2024
1 parent 0e6c453 commit 0d65ad8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 113 deletions.
23 changes: 0 additions & 23 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,29 +108,6 @@ export default defineConfig({
},
{ rel: 'stylesheet', href: '/style.css' },
],
scripts: [
`const insertVersion = function() {
const logo = document.querySelector('.__dumi-default-navbar-logo');
if (!logo) return;
const dom = document.createElement('span');
dom.id = 'logo-version';
dom.innerHTML = '${packages.version}';
logo.parentNode.insertBefore(dom, logo.nextSibling);
};
const observer = new MutationObserver((mutationsList, observer) => {
for (const mutation of mutationsList) {
if (mutation.type === 'childList') {
const logoVersion = document.querySelector('#logo-version');
if (logoVersion) {
observer.disconnect();
} else {
insertVersion();
}
}
}
});
observer.observe(document.body, { childList: true, subtree: true });`,
],
extraBabelPlugins: [
[
'babel-plugin-import',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"test:strict": "cross-env REACT_MODE=strict jest"
},
"devDependencies": {
"@ahooks.js/dumi-theme-antd": "^0.1.1",
"@ahooks.js/dumi-theme-antd": "^0.1.3",
"@ant-design/icons": "^5.3.0",
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
Expand Down
117 changes: 28 additions & 89 deletions pnpm-lock.yaml

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

0 comments on commit 0d65ad8

Please sign in to comment.