-
-
Notifications
You must be signed in to change notification settings - Fork 43
feat: Community adders #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c248427
tweak
AdrianGonz97 6bb9be6
sample community adders
AdrianGonz97 7033592
bundle script
AdrianGonz97 d9b61d4
simplify with tinyexec
AdrianGonz97 57a15fb
namespace common
AdrianGonz97 d98817b
add support for community adders
AdrianGonz97 7a48ce0
tweaks
AdrianGonz97 84f01c7
ensure new symlinks are always created
AdrianGonz97 f30aff2
use TS modules instead
AdrianGonz97 d002194
apply suggestions
AdrianGonz97 60b8675
print usage of `--community` when no args are passed
AdrianGonz97 dfc8ae5
tweak metadata
AdrianGonz97 1fe6d39
infer id by filename
AdrianGonz97 80ec058
add confirmation prompt before downloading community adders
AdrianGonz97 d361183
tweak warning
AdrianGonz97 36895bb
more tweaks
AdrianGonz97 31925c8
final tweaks
AdrianGonz97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { CommunityAdder } from '../packages/adders/_config/community'; | ||
|
||
export default { | ||
name: 'UnoCSS', | ||
description: 'The instant on-demand Atomic CSS engine', | ||
category: 'CSS', | ||
npm: 'unocss-svelte-integration', | ||
repo: 'https://github.com/owner-name/repo-name', | ||
website: 'https://unocss.dev', | ||
logo: 'unocss.svg' | ||
} satisfies CommunityAdder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { CommunityAdder } from '../packages/adders/_config/community'; | ||
|
||
export default { | ||
name: 'unplugin-icons', | ||
description: 'Access thousands of icons as components on-demand universally', | ||
category: 'Icons', | ||
npm: 'unplugin-icons-svelte-integration', | ||
repo: 'https://github.com/owner-name/repo-name', | ||
website: 'https://www.npmjs.com/package/unplugin-icons', | ||
logo: 'unplugin-icons.svg' | ||
} satisfies CommunityAdder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
export type CommunityAdder = { | ||
AdrianGonz97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
id: string; | ||
displayName: string; | ||
name: string; | ||
description: string; | ||
package: string; | ||
category: string; | ||
npm: string; | ||
repo: string; | ||
website: string; | ||
logo: string; | ||
}; | ||
|
||
export type CommunityAdders = CommunityAdder[]; | ||
/** EVALUATED AT BUILD TIME */ | ||
export const communityAdderIds: string[] = []; | ||
|
||
export const communityAdders: CommunityAdders = []; | ||
export async function getCommunityAdders(name: string): Promise<CommunityAdder> { | ||
const { default: details } = await import(`../../../community/${name}.ts`); | ||
return details; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { adderIds, adderCategories, getAdderDetails } from './official'; | ||
export { categories, type CategoryKeys, type CategoryInfo } from './categories'; | ||
export { communityAdders } from './community'; | ||
export { getCommunityAdders, communityAdderIds } from './community'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.