mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-22 08:04:04 +01:00
Clean up handling of untransformed files
This control flow is difficult enough as it is to follow. Move the handling of the untransformed files to a separate block to make it slightly easier to understand.
This commit is contained in:
parent
6c84631bbc
commit
d6d875ef3b
@ -188,9 +188,17 @@ function make_lib_files(import_format, source_maps, with_app_dir, only_legacy) {
|
||||
return; // skip non-javascript files
|
||||
}
|
||||
|
||||
if (no_transform_files.has(filename)) {
|
||||
return ensureDir(path.dirname(out_path))
|
||||
.then(() => {
|
||||
console.log(`Writing ${out_path}`);
|
||||
return copy(filename, out_path);
|
||||
});
|
||||
}
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => {
|
||||
if (only_legacy && !no_transform_files.has(filename)) {
|
||||
if (only_legacy) {
|
||||
return;
|
||||
}
|
||||
return ensureDir(path.dirname(out_path))
|
||||
@ -201,10 +209,6 @@ function make_lib_files(import_format, source_maps, with_app_dir, only_legacy) {
|
||||
})
|
||||
.then(() => ensureDir(path.dirname(legacy_path)))
|
||||
.then(() => {
|
||||
if (no_transform_files.has(filename)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const opts = babel_opts();
|
||||
if (helper && helpers.optionsOverride) {
|
||||
helper.optionsOverride(opts);
|
||||
|
Loading…
Reference in New Issue
Block a user