Commit f32bd6f 1 parent 25fdd98 commit f32bd6f Copy full SHA for f32bd6f
File tree 4 files changed +29
-9
lines changed
4 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 3
3
4
4
<!-- Or you can load custom head-tag JavaScript: -->
5
5
6
- <!-- <script
6
+ < script
7
7
src ="dist/src/utils/syncTheme.js "
8
8
type ="application/javascript "
9
- ></script> -->
9
+ > </ script >
10
10
11
11
< link rel ="preconnect " href ="https://fonts.googleapis.com " />
12
12
< link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin />
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import peerDepsExternal from "rollup-plugin-peer-deps-external";
6
6
import preserveDirectives from "rollup-plugin-preserve-directives" ;
7
7
import { terser } from "rollup-plugin-terser" ;
8
8
9
- export default {
9
+ export default [ {
10
10
onwarn ( warning , warn ) {
11
11
if (
12
12
warning . code === "MODULE_LEVEL_DIRECTIVE" &&
@@ -39,4 +39,24 @@ export default {
39
39
terser ( { compress : { directives : false } } ) ,
40
40
preserveDirectives ( ) ,
41
41
] ,
42
- } ;
42
+
43
+ } , {
44
+ input : "src/utils/syncTheme.ts" ,
45
+ output : [
46
+ {
47
+ dir : "dist/src/utils/" ,
48
+ format : "iife" ,
49
+ name : "syncTheme" ,
50
+ } ,
51
+ ] ,
52
+ plugins : [
53
+ resolve ( ) ,
54
+ commonjs ( ) ,
55
+ typescript ( {
56
+ tsconfig : "./tsconfig.json" ,
57
+ outDir : "dist/src/utils/" ,
58
+ declaration : false ,
59
+ } ) ,
60
+ terser ( ) ,
61
+ ] ,
62
+ } ] ;
Original file line number Diff line number Diff line change 1
1
import { clsx , type ClassValue } from "clsx" ;
2
2
import { twMerge } from "tailwind-merge" ;
3
3
export * from "./darkMode" ;
4
- // export * from "./syncTheme";
5
4
export function cn ( ...inputs : ClassValue [ ] ) {
6
5
return twMerge ( clsx ( inputs ) ) ;
7
6
}
Original file line number Diff line number Diff line change 1
- // import { theme } from "./darkMode";
1
+ import { theme } from "./darkMode"
2
+
2
3
// This script sets up event listeners to set the appropriate css class in the DOM for the current theme. It's intended to be executed in the head of the document hence it is immediately invoked (IIFE).
3
- // (() => {
4
- // theme.syncTheme();
5
- // })();
4
+ ( ( ) => {
5
+ theme . syncTheme ( )
6
+ } ) ( )
You can’t perform that action at this time.
0 commit comments