Skip to content

Commit

Permalink
build: avoid rollup output containing redundant modules
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Aug 18, 2024
1 parent 11fd349 commit 5133e8d
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 26 deletions.
6 changes: 4 additions & 2 deletions _javascript/categories.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { basic, initSidebar, initTopbar } from './modules/layouts';
import { categoryCollapse } from './modules/plugins';
import { basic } from './modules/layouts/basic';
import { initSidebar } from './modules/layouts/sidebar';
import { initTopbar } from './modules/layouts/topbar';
import { categoryCollapse } from './modules/components/category-collapse';

basic();
initSidebar();
Expand Down
4 changes: 3 additions & 1 deletion _javascript/commons.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { basic, initSidebar, initTopbar } from './modules/layouts';
import { basic } from './modules/layouts/basic';
import { initSidebar } from './modules/layouts/sidebar';
import { initTopbar } from './modules/layouts/topbar';

initSidebar();
initTopbar();
Expand Down
7 changes: 5 additions & 2 deletions _javascript/home.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { basic, initSidebar, initTopbar } from './modules/layouts';
import { initLocaleDatetime, loadImg } from './modules/plugins';
import { basic } from './modules/layouts/basic';
import { initSidebar } from './modules/layouts/sidebar';
import { initTopbar } from './modules/layouts/topbar';
import { loadImg } from './modules/components/img-loading';
import { initLocaleDatetime } from './modules/components/locale-datetime';

loadImg();
initLocaleDatetime();
Expand Down
6 changes: 4 additions & 2 deletions _javascript/misc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { basic, initSidebar, initTopbar } from './modules/layouts';
import { initLocaleDatetime } from './modules/plugins';
import { basic } from './modules/layouts/basic';
import { initSidebar } from './modules/layouts/sidebar';
import { initTopbar } from './modules/layouts/topbar';
import { initLocaleDatetime } from './modules/components/locale-datetime';

initSidebar();
initTopbar();
Expand Down
3 changes: 0 additions & 3 deletions _javascript/modules/layouts.js

This file was deleted.

6 changes: 0 additions & 6 deletions _javascript/modules/plugins.js

This file was deleted.

8 changes: 6 additions & 2 deletions _javascript/page.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { basic, initSidebar, initTopbar } from './modules/layouts';
import { loadImg, imgPopup, initClipboard } from './modules/plugins';
import { basic } from './modules/layouts/basic';
import { initSidebar } from './modules/layouts/sidebar';
import { initTopbar } from './modules/layouts/topbar';
import { loadImg } from './modules/components/img-loading';
import { imgPopup } from './modules/components/img-popup';
import { initClipboard } from './modules/components/clipboard';

loadImg();
imgPopup();
Expand Down
16 changes: 8 additions & 8 deletions _javascript/post.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { basic, initSidebar, initTopbar } from './modules/layouts';
import {
loadImg,
imgPopup,
initLocaleDatetime,
initClipboard,
toc
} from './modules/plugins';
import { basic } from './modules/layouts/basic';
import { initSidebar } from './modules/layouts/sidebar';
import { initTopbar } from './modules/layouts/topbar';
import { loadImg } from './modules/components/img-loading';
import { imgPopup } from './modules/components/img-popup';
import { initLocaleDatetime } from './modules/components/locale-datetime';
import { initClipboard } from './modules/components/clipboard';
import { toc } from './modules/components/toc';

loadImg();
toc();
Expand Down

0 comments on commit 5133e8d

Please sign in to comment.