|
|
|
@ -578,7 +578,7 @@ impl CrateData { |
|
|
|
|
fn npm_data( |
|
|
|
|
&self, |
|
|
|
|
scope: &Option<String>, |
|
|
|
|
include_commonjs_shim: bool, |
|
|
|
|
add_js_bg_to_package_json: bool, |
|
|
|
|
disable_dts: bool, |
|
|
|
|
out_dir: &Path, |
|
|
|
|
) -> NpmData { |
|
|
|
@ -588,10 +588,10 @@ impl CrateData { |
|
|
|
|
let mut files = vec![wasm_file]; |
|
|
|
|
|
|
|
|
|
files.push(js_file.clone()); |
|
|
|
|
// if include_commonjs_shim {
|
|
|
|
|
if add_js_bg_to_package_json { |
|
|
|
|
let js_bg_file = format!("{}_bg.js", name_prefix); |
|
|
|
|
files.push(js_bg_file); |
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let pkg = &self.data.packages[self.current_idx]; |
|
|
|
|
let npm_name = match scope { |
|
|
|
@ -671,7 +671,7 @@ impl CrateData { |
|
|
|
|
disable_dts: bool, |
|
|
|
|
out_dir: &Path, |
|
|
|
|
) -> NpmPackage { |
|
|
|
|
let data = self.npm_data(scope, false, disable_dts, out_dir); |
|
|
|
|
let data = self.npm_data(scope, true, disable_dts, out_dir); |
|
|
|
|
let pkg = &self.data.packages[self.current_idx]; |
|
|
|
|
|
|
|
|
|
self.check_optional_fields(); |
|
|
|
|