Wykres commitów

9 Commity (f49fa7170d089091ebb3af29e57517d02881e972)

Autor SHA1 Wiadomość Data
Atul Varma d73116509c
Move SVG vocabulary from JSON to TS. (#59)
Ugh, we need to write out a TypeScript file instead of importing the JSON directly because otherwise the TS compiler will spend an inordinate amount of time doing type inference, which massively slows down type-checking (especially in IDEs and such).

The TS file actually uses `JSON.parse` on a stringified version of the JSON instead of just inlining the JSON itself because [apparently it's much faster][1].

[1]: https://www.bram.us/2019/11/25/faster-javascript-apps-with-json-parse/
2021-03-27 16:00:20 -04:00
Atul Varma e69ce202da Oops, rename 'data' to 'assets' (#47). 2021-03-22 23:00:04 -04:00
Atul Varma 233dbc379d
Move SVGs into data/symbols. (#54)
This fixes #47 by moving the SVGs into `data/symbols`.
2021-03-22 20:30:36 -04:00
Atul Varma 5cf9408f55 Ignore empty groups in SVGs. Fixes #42. 2021-03-03 20:08:43 -05:00
Atul Varma c62214186b Only log warnings for unrecognized metadata properties. 2021-02-28 18:57:51 -05:00
Atul Varma 3e1b66a984
Add support for TOML symbol metadata. (#33)
This fixes #20 by adding support for TOML-based metadata for symbols.

There's now a template TOML file in `svg/_template.toml` that documents all the different metadata properties.  The file can be copied to match the name of an SVG file (but with a `.toml` extension) and it will be processed by the vocabulary builder when the site is generated.

Currently there are only two properties documented, `always_nest` and `always_be_nested` (as per the needs outlined in https://github.com/toolness/mystic-symbolic/issues/17#issuecomment-786696966), but they don't actually do anything yet (actual support for _using_ the metadata will come in another file).

Right now the TOML files are validated quite stringently: if a file contains the name of a property it doesn't understand, or the type of the property is wrong, it will raise an error. We can revisit this if it becomes burdensome.
2021-02-26 21:30:38 -05:00
Atul Varma 7322740b14 Factor out convertSvgMarkupToSymbolData(), add test. 2021-02-21 20:54:36 -05:00
Atul Varma 36165f2892 Make all symbol names lowercase. 2021-02-15 12:39:22 -05:00
Atul Varma e736afc7be Rename vocabulary.ts to vocabulary-builder.ts. 2021-02-15 12:37:25 -05:00