Skip to content

Commit

Permalink
[library] Fix package.json and add skeleton component
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkha committed Apr 2, 2024
1 parent 8d44d60 commit 50ba7bf
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/filigran-ui/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 ocavue
Copyright (c) 2024 Filigran

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 8 additions & 7 deletions packages/filigran-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@
"types": "./dist/plugin.d.ts"
},
"./clients": {
"require": "./dist/clients/index.js",
"import": "./dist/clients/index.js",
"types": "./dist/clients/index.d.ts"
"require": "./dist/components/clients/index.js",
"import": "./dist/components/clients/index.js",
"types": "./dist/components/clients/index.d.ts"
},
"./servers": {
"require": "./dist/servers/index.js",
"import": "./dist/servers/index.js",
"types": "./dist/servers/index.d.ts"
}
"require": "./dist/components/servers/index.js",
"import": "./dist/components/servers/index.js",
"types": "./dist/components/servers/index.d.ts"
},
"./theme.css": "./dist/index.css"
}
}
1 change: 1 addition & 0 deletions packages/filigran-ui/src/components/servers/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './button';
export * from './skeleton';
16 changes: 16 additions & 0 deletions packages/filigran-ui/src/components/servers/skeleton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {cn} from '../../lib/utils'


function Skeleton({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn("animate-pulse rounded-md bg-muted", className)}
{...props}
/>
)
}

export { Skeleton }
4 changes: 2 additions & 2 deletions packages/filigran-ui/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function addDirectivesToChunkFiles(distPath = 'dist'): Promise<void> {

await fsPromises.writeFile(filePath, updatedContent, 'utf8');

console.log(`💚 Directive 'use client'; has been added to ${file}`);
// console.log(`💚 Directive 'use client'; has been added to ${file}`);
}
} catch (err) {
// eslint-disable-next-line no-console -- We need to log the error
Expand All @@ -60,7 +60,7 @@ async function addDirectivesToChunkFiles(distPath = 'dist'): Promise<void> {

export default defineConfig(() => {
return {
entry: ["src/index.ts","src/plugin.ts", "src/components/**/*.{ts,tsx}"],
entry: ["src/index.ts","src/plugin.ts", "src/global.css", "src/components/**/*.{ts,tsx}"],
splitting: true,
treeshake: true,
sourcemap: true,
Expand Down

0 comments on commit 50ba7bf

Please sign in to comment.