Organizing ancilliary JS files within PureScript projects

This is really a very minor issue but i’m curious what other people have done here…

I find myself needing to / wanting to split up an unwieldy JS FFI file. There’s no conceptual problem doing this (the actual FFI part is quite small, hiving off the unwieldy JS into multiple other CommonJS files seems straightforward).

My question is whether it’s better to have these JS files live along side the FFI file (and then either have to rely on build system to copy them to somewhere or to teach Parcel that they live in the src area) or alternatively to keep them elsewhere and lose the “closeness” to the FFI file in which they are used.

Like i say, not a big issue but neither of those approaches seems entirely satisfactory to me, perhaps someone else has a better solution?

1 Like