Skip to content

Commit 72c0cce

Browse files
authored
Merge pull request #114 from freakdaniel/bugfix
Migration to jsrepo v3 for CLI installation (fixes #112)
2 parents 9214481 + 5599909 commit 72c0cce

File tree

119 files changed

+3675
-2303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+3675
-2303
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dist
1313
dist-ssr
1414
coverage
1515
*.local
16-
public/ui
1716

1817
/cypress/videos/
1918
/cypress/screenshots/

jsrepo-build-config.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

jsrepo.config.ts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import { defineConfig } from 'jsrepo';
2+
import { distributed } from 'jsrepo/outputs';
3+
import fs from 'fs';
4+
import path from 'path';
5+
6+
function getItems(cwd: string) {
7+
const contentDir = path.join(cwd, 'src/content');
8+
const categories = fs.readdirSync(contentDir).filter((f) => {
9+
return fs.statSync(path.join(contentDir, f)).isDirectory();
10+
});
11+
12+
const items: Array<{
13+
name: string;
14+
type: string;
15+
files: Array<{ path: string }>;
16+
}> = [];
17+
18+
for (const category of categories) {
19+
const categoryPath = path.join(contentDir, category);
20+
const components = fs.readdirSync(categoryPath).filter((f) => {
21+
return fs.statSync(path.join(categoryPath, f)).isDirectory();
22+
});
23+
24+
for (const component of components) {
25+
items.push({
26+
name: `${category}/${component}`,
27+
type: category,
28+
files: [{ path: `src/content/${category}/${component}` }]
29+
});
30+
}
31+
}
32+
33+
return items;
34+
}
35+
36+
export default defineConfig({
37+
registry: ({ cwd }) => ({
38+
name: 'vue-bits',
39+
description:
40+
'An open source collection of animated, interactive & fully customizable Vue components for building stunning, memorable user interfaces.',
41+
authors: ['David Haz'],
42+
homepage: 'https://vue-bits.dev',
43+
repository: 'https://github.com/DavidHDev/vue-bits',
44+
bugs: 'https://github.com/DavidHDev/vue-bits/issues',
45+
tags: [
46+
'vue',
47+
'javascript',
48+
'components',
49+
'web',
50+
'vuejs',
51+
'css-animations',
52+
'component-library',
53+
'ui-components',
54+
'3d',
55+
'ui-library',
56+
'tailwind',
57+
'tailwindcss',
58+
'components-library'
59+
],
60+
outputs: [distributed({ dir: './public/ui' })],
61+
excludeDeps: ['vue'],
62+
defaultPaths: {
63+
Animations: 'src/components/Animations',
64+
Backgrounds: 'src/components/Backgrounds',
65+
Components: 'src/components/Components',
66+
TextAnimations: 'src/components/TextAnimations'
67+
},
68+
items: getItems(cwd)
69+
})
70+
});

0 commit comments

Comments
 (0)