Skip to content
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

Fix addSource to allow implementation path to point to a file #212

Closed

Conversation

ExE-Boss
Copy link
Contributor

This fixes the bug where:

const transformer = new WebIDL2JS();

transformer.addSource("path/to/Attr.webidl", "path/to/Attr-impl.js");
// ... add the rest, one file at a time. The client is responsible for directory iteration.

await transformer.generate("outputDir");

Would result in outputDir/Attr.js requiring path/to/Attr‑impl.js/Attr.js instead of path/to/Attr‑impl.js, because the wrapper generation code currently assumes that the impl path argument is always a directory.


This will also make it possible to implement jsdom/jsdom#2835 without renaming Window.js (jsdom/jsdom#2837) by utilising the above mention impl path name fix.

@ExE-Boss ExE-Boss force-pushed the fix/transformer/add-source-impl-file branch from 4439bbf to 9bdfffb Compare April 29, 2020 09:26
@domenic
Copy link
Member

domenic commented Apr 29, 2020

As I expressed in #208 and #160, I'd like us to decide on an API through discussion, before starting any pull requests.

@domenic domenic closed this Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants