Skip to content

Commit

Permalink
feat: ✨ cloudflare icon pack (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-labs authored Aug 3, 2024
1 parent 0d9c057 commit 9b8c67e
Show file tree
Hide file tree
Showing 27 changed files with 1,307 additions and 1,225 deletions.
1 change: 1 addition & 0 deletions icons-lc/node/file-js-cloudflare-function.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions icons-lc/node/file-ts-cloudflare-function.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1,267 changes: 1,267 additions & 0 deletions icons-lc/node/~node.ai

Large diffs are not rendered by default.

1,214 changes: 0 additions & 1,214 deletions icons-lc/typescript/~typescript.ai

This file was deleted.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"%configuration.activeIconPack.pest%",
"%configuration.activeIconPack.rust_ferris%",
"%configuration.activeIconPack.rust_ferris_minimal%",
"%configuration.activeIconPack.cloudflare%",
"%configuration.activeIconPack.none%"
],
"enum": [
Expand All @@ -175,6 +176,7 @@
"pest",
"rust_ferris",
"rust_ferris_minimal",
"cloudflare",
"none"
]
},
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"configuration.activeIconPack.pest": "Icons for pest-py.",
"configuration.activeIconPack.rust_ferris": "Rust icons variant with Ferris the crab replacing the Rust logo.",
"configuration.activeIconPack.rust_ferris_minimal": "Rust icons variant with Ferris the crab replacing the Rust logo in special Rust files.",
"configuration.activeIconPack.cloudflare": "Icons for working with Cloudflare stuff.",
"configuration.activeIconPack.none": "No icon pack enabled.",
"configuration.folders.theme": "Set the type for the folder icons.",
"configuration.folders.theme.specific": "Select specific folder icons.",
Expand Down
14 changes: 7 additions & 7 deletions src/@lucodear/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Currently:

```
icons-lc
├── ai # contains icons related to Artificial Intelligence
├── lucodear # contains icons related to lucodear projects
├── misc # contains miscellaneous icons *
├── python # contains icons related to Python and the lucodear's Pest framework
├── react # contains icons related to React, different from the ones in the main extension
├── rust # contains icons related to Rust, different from the ones in the main extension (including ferris packs)
└── typescript # contains icons related to TypeScript, different from the ones in the main extension
├── ai # contains icons related to Artificial Intelligence
├── lucodear # contains icons related to lucodear projects
├── misc # contains miscellaneous icons *
├── python # contains icons related to Python and the lucodear's Pest framework
├── react # contains icons related to React, different from the ones in the main extension
├── rust # contains icons related to Rust, different from the ones in the main extension (including ferris packs)
└── node # contains icons related to ts and js, different from the ones in the main extension
```

\* The `misc` folder contains:
Expand Down
4 changes: 2 additions & 2 deletions src/@lucodear/core/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import type { LucodearFileIcons, LucodearFolderTheme } from '../models';
import * as ai from './ai';
import * as lucodear from './lucodear';
import * as misc from './misc';
import * as node from './node';
import { folderPatches } from './patches';
import * as python from './python';
import * as react from './react';
import * as rust from './rust';
import * as ts from './typescript';

/** Defines file icons */
export const lucodearFileIcons: LucodearFileIcons = {
icons: [
...misc.files,
...ts.files,
...node.files,
...lucodear.files,
...python.files,
...react.files,
Expand Down
6 changes: 6 additions & 0 deletions src/@lucodear/core/icons/misc/folders.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { IconPack } from '../../../../core';
import type { LucodearFolderIcon } from '../../models';
import { lucodear } from '../utils';

Expand Down Expand Up @@ -46,6 +47,11 @@ export const folders = lucodear('misc', [
'wrangler-workers',
],
},
{
name: 'cloudflare',
enabledFor: [IconPack.CloudFlare],
folderNames: ['functions'],
},
{
name: 'binance',
looseFolderIcon: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { IconPack } from '../../../../core';
import type { LucodearFileIcon } from '../../models';
import { lucodear } from '../utils';

Expand All @@ -7,7 +8,8 @@ const namext = (names: string[]) => ({
fileExtensions: names,
});

export const files = lucodear('typescript', [
/** Defines the icons that are only available by default. */
export const typescript = lucodear('node', [
{
name: 'ts-abstract',
...namext(['abstract.ts', 'abs.ts', 'abstracts.ts']),
Expand Down Expand Up @@ -69,3 +71,18 @@ export const files = lucodear('typescript', [
...namext(['util.ts', 'utils.ts', 'helper.ts', 'helpers.ts']),
},
] satisfies LucodearFileIcon[]);

/** Defines the icons that are only available if the `IconPack.CloudFlare` is enabled. */
export const cloudflare = lucodear('node', IconPack.CloudFlare, [
{
name: 'ts-cloudflare-function',
fileExtensions: ['api/ts', 'functions/ts'],
},
{
name: 'js-cloudflare-function',
fileExtensions: ['api/js', 'functions/js'],
},
] satisfies LucodearFileIcon[]);

/** Defines all the file icons from the node lucodear pack */
export const files: LucodearFileIcon[] = [...typescript, ...cloudflare];
File renamed without changes.
2 changes: 1 addition & 1 deletion src/@lucodear/core/overrides/folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import { type FolderTheme } from '../../../core';
* [folderIcons.ts](./../../../core/icons/folderIcons.ts)
*/
export const folderIconsOverrides: Partial<FolderTheme> = {
icons: [],
icons: [{ name: 'folder-node', folderNames: ['node', 'nodejs'] }],
};
1 change: 1 addition & 0 deletions src/core/models/icons/iconPack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum IconPack {
Pest = 'pest',
RustFerris = 'rust_ferris',
RustFerrisMinimal = 'rust_ferris_minimal',
CloudFlare = 'cloudflare',
// #endregion
}

Expand Down

0 comments on commit 9b8c67e

Please sign in to comment.