1.0.8 • Published 9 months ago
@moonlight-mod/mappings v1.0.8
mappings
WIP mappings for the Discord client, powered by moonmap and LunAST.
Embedding into client mods
After setting up moonmap and LunAST, call the load function before Webpack initializes:
import loadMappings from "@moonlight-mod/mappings";
loadMappings(moonmap, lunast);
When adding types to a mapping
- Add its path and a name to
generate.js
- Name should be the last part of the path except in cases where it breaks syntax (e.g.
highlight.js
->HighlightJS
)- Mappings for CSS class names should replace
.css
withCSS
- Mappings for CSS class names should replace
- Name should be the last part of the path except in cases where it breaks syntax (e.g.
node generate.js types --write
node generate.js declares "@moonlight-mod/wp/" > ../moonlight/packages/types/src/mappings.d.ts
to update import statements in moonlight