Skip to content

Commit

Permalink
feat: supercollider icon
Browse files Browse the repository at this point in the history
  • Loading branch information
prazdevs committed Apr 6, 2024
1 parent cb33509 commit a5d7196
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 4 deletions.
Binary file modified assets/frappe.webp
Binary file not shown.
Binary file modified assets/latte.webp
Binary file not shown.
Binary file modified assets/macchiato.webp
Binary file not shown.
Binary file modified assets/mocha.webp
Binary file not shown.
3 changes: 3 additions & 0 deletions icons/css-variables/super-collider.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/frappe/super-collider.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/latte/super-collider.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/macchiato/super-collider.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/mocha/super-collider.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions scripts/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function optimizeIcons() {
'removeXMLProcInst',
'sortAttrs',
'sortDefsChildren',
] })
], multipass: true })
await writeFile(
svgPath,
svg.toPrettyString()
Expand All @@ -84,7 +84,7 @@ async function optimizeIcons() {
* Generates missing icons from existing ones from other palettes.
* If an icon exists in `icons/latte`, it will create its counterparts for other palettes.
*/
async function generateIcons() {
function generateIcons() {
const flavors = [
'css-variables',
'frappe',
Expand All @@ -103,7 +103,7 @@ async function generateIcons() {
for (const dest of flavors.filter(f => f !== origin)) {
const destPath = resolve('icons', dest)
const destSvgs = readdirSync(destPath)
originSvgs.filter(s => !destSvgs.includes(s)).forEach(async (i) => {
originSvgs.filter(s => !destSvgs.includes(s)).forEach((i) => {
const svg = new SVG(readFileSync(resolve(originPath, i), 'utf8'))
parseColors(svg, {
callback(attr, color) {
Expand Down Expand Up @@ -271,7 +271,7 @@ if (argv.flags.all || argv.flags.optimize)
await optimizeIcons()

if (argv.flags.all || argv.flags.generate)
await generateIcons()
generateIcons()

if (argv.flags.all || argv.flags.preview)
await previewIcons()
3 changes: 3 additions & 0 deletions src/defaults/fileIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,9 @@ const fileIcons: Record<string, {
'sublime-workspace',
],
},
'super-collider': {
fileExtensions: ['sc', 'scd'],
},
'svelte': {
languageIds: ['svelte'],
fileExtensions: ['svelte'],
Expand Down

0 comments on commit a5d7196

Please sign in to comment.