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

allow passing of js file name in bundled mode (for renaming main.js) #8

Open
Fishrock123 opened this issue Aug 6, 2016 · 0 comments

Comments

@Fishrock123
Copy link
Member

This should allow a different entry other than main.js and use the parent path of that as the bundle file, in both disk and zip-bundle mode.

This used to work but some things needed changing for bundled mode to work, the relevant code is at

rustyduk/src/main.rs

Lines 153 to 170 in 3797dd1

let entry_file: String = "main.js".to_owned();
// TODO(Fishrock123): support renaming of main.js
// If there are free arguments (i.e. not an option or past `--`)
// if !matches.free.is_empty() {
// let possible_entry = matches.free[0].clone();
// If we we passed a .js file,
// if Path::new(&possible_entry).ends_with(".js") {
// entry_file = possible_entry;
// } else {
resource::check_set_zip(&base_path);
// }
// }
duk::push_string(ctx, "nucleus.dofile('");
duk::push_lstring(ctx, entry_file);
and entry_file is the variable that should be altered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant