-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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
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); |
entry_file
is the variable that should be altered.