« get me outta code hell

README.md « shared-util « static « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/shared-util/README.md
blob: d21c0e6b52e563aef31564f53f13d229f4743902 (plain)
1
2
3
4
5
6
7
8
9
10
11
# `src/static/shared-util`

Module imports under `src/static/js` may appear to be pointing to files that aren't at quite the right place. For example, the import:

    import {empty} from '../shared-util/sugar.js';

...is reading a file that doesn't exist here, under `shared-util`. This isn't an error!

This folder (`src/shared-util`) does not actually exist in a build of the website; instead, the folder `src/util` is symlinked in its place. So, all files under `src/util` are actually available at (e.g.) `/static/shared-util/` online.

The above import would actually import from the bindings in `src/util/sugar.js`.