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 indexFilePath option #36

Merged
merged 1 commit into from
Dec 31, 2021

Conversation

DomThePorcupine
Copy link
Contributor

@DomThePorcupine DomThePorcupine commented Dec 31, 2021

Hi all,

It seems that the --index option is not being parsed properly. When running:

npx denoify --src denoDist --out deno_dist --index index.ts

I receive the following output:

...
Denoify did not generate "mod.ts" file because your index wasn't found. You have two options:
1) You may create denoDist/mod.ts it will be denoified and moved to deno_dist.
2) You can also specify where is your index using the denoify.index field in package.js

Adding a little logging

...
const options = commanderStatic.opts();
console.log(options);

denoify({
    "projectPath": options.project,
    "srcDirPath": options.src,
    "denoDistPath": options.out,
    "indexFilePath": options.index
});

reveals:

{
  project: undefined,
  src: 'denoDist',
  out: 'deno_dist',
  index: 'index.ts'
}

so I simply changed the call to the main denoify function to be:

denoify({
    "projectPath": options.project,
    "srcDirPath": options.src,
    "denoDistPath": options.out,
    "indexFilePath": options.index
});

Please let me know if there's anything else I can do :)
Dom

@garronej
Copy link
Owner

Thank you for your contribution!
Also, sorry about this bug. It should have been tested out.
Releasing a new version.

Best

@garronej garronej merged commit e46be4b into garronej:master Dec 31, 2021
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.

None yet

2 participants