mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-05-02 17:16:42 +03:00
Omit undefined properties (#8582)
This commit is contained in:
parent
d42c4a0883
commit
e9c814ac00
@ -63,8 +63,10 @@ const build = async () => {
|
|||||||
escape(icon.path),
|
escape(icon.path),
|
||||||
escape(icon.source),
|
escape(icon.source),
|
||||||
escape(icon.hex),
|
escape(icon.hex),
|
||||||
icon.guidelines ? `'${escape(icon.guidelines)}'` : undefined,
|
icon.guidelines ? `\n guidelines: '${escape(icon.guidelines)}',` : '',
|
||||||
licenseToObject(icon.license),
|
licenseToObject(icon.license)
|
||||||
|
? `\n license: ${JSON.stringify(licenseToObject(icon.license))},`
|
||||||
|
: '',
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const writeJs = async (filepath, rawJavaScript, opts = null) => {
|
const writeJs = async (filepath, rawJavaScript, opts = null) => {
|
||||||
|
@ -6,7 +6,5 @@
|
|||||||
},
|
},
|
||||||
path: '%s',
|
path: '%s',
|
||||||
source: '%s',
|
source: '%s',
|
||||||
hex: '%s',
|
hex: '%s',%s%s
|
||||||
guidelines: %s,
|
|
||||||
license: %s,
|
|
||||||
}
|
}
|
||||||
|
4
types.d.ts
vendored
4
types.d.ts
vendored
@ -25,6 +25,6 @@ export interface SimpleIcon {
|
|||||||
path: string;
|
path: string;
|
||||||
source: string;
|
source: string;
|
||||||
hex: string;
|
hex: string;
|
||||||
guidelines: string | undefined;
|
guidelines?: string;
|
||||||
license: License | undefined;
|
license?: License;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user