-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: suffixed generation #36
Comments
I had been thinking I could bake some custom resolver logic (#35) into the code I generate, perhaps mangling import paths, but I'm realizing that such a setup would be too difficult to watch. Thus perhaps there is also no way to do this? I'll have to think about it some more. |
I could just insert a suffix after an imported name but before its extension. For example: import 'file';
import 'file.ts';
import 'file.test.ts'; would be transpiled to: import 'file.gen';
import 'file.gen.ts';
import 'file.gen.test.ts'; This is a pure transform, and preserves the properties of the source. If the source was an esmodule with no resolver the output will still have that property. If the input did require a resolver to work, it still will. |
Buuut for that to work, every single path has to get a It seems like this is a parallel solution to what I've been considering for re-entrant macros. In this version macro evaluation is written to the |
This would be a default mode that would transform
lib/foo.js
tolib/foo.gen.js
. This feature would prevent you needing to do something like renaming an existingfoo.js
tofoo.src.js
and would speed wholesale adoption.The text was updated successfully, but these errors were encountered: