]> git.wincent.com - wincent.git/commit
refactor(fig): set up path alias for "fig" -> "src"
authorGreg Hurrell <greg@hurrell.net>
Tue, 21 Apr 2020 22:13:19 +0000 (00:13 +0200)
committerGreg Hurrell <greg@hurrell.net>
Tue, 21 Apr 2020 22:13:19 +0000 (00:13 +0200)
commita8780a3ce49bb3e1ac4acd41b85904ddc1988e43
treee8655768a1ade07d2dfb8e7c9e9ada694e49dfd4
parente313852efc06c7f001f050e3d9f63cadfcc50845
refactor(fig): set up path alias for "fig" -> "src"

This enables `tsc` to find modules from aspects like so:

    import '../../src/something.js';

instead of:

    import 'fig/something.js';

Normally I hate this kind of path hacking and aliasing because it
obfuscates where things really are.

But in this case aspects are supposed to be a DSL and somehow special.
"gd" in Vim still takes you to the right file (ie. via the LSP server).
Note that "gf" doesn't work after this change, and it didn't work before
it either, because when you are looking at "something.js", you actually
want to go to the source, which is "something.ts". So, "gd" works, but
"gf" doesn't.
aspects/dotfiles/index.ts
aspects/launchd/index.ts
aspects/meta/index.ts
aspects/terminfo/index.ts
aspects/vim/index.ts
install
src/path.ts
tsconfig.json
variables.ts