chore: fixed union pay & jcb logo

This commit is contained in:
Shariq Ansari 2024-11-14 13:01:31 +05:30
parent a4de6b1d5b
commit 2b74539d4e
3 changed files with 123 additions and 134 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -71,12 +71,12 @@ const argv = yargs
.example("node esbuild --apps frappe,erpnext", "Run build only for frappe and erpnext")
.example(
"node esbuild --files frappe/website.bundle.js,frappe/desk.bundle.js",
"Run build only for specified bundles",
"Run build only for specified bundles"
)
.version(false).argv;
const APPS = (!argv.apps ? app_list : argv.apps.split(",")).filter(
(app) => !(argv.skip_frappe && app == "frappe"),
(app) => !(argv.skip_frappe && app == "frappe")
);
const FILES_TO_BUILD = argv.files ? argv.files.split(",") : [];
const WATCH_MODE = Boolean(argv.watch);
@ -88,7 +88,7 @@ const NODE_PATHS = [].concat(
// node_modules of apps directly importable
app_list.map((app) => path.resolve(apps_path, app, "node_modules")).filter(fs.existsSync),
// import js file of any app if you provide the full path
app_list.map((app) => path.resolve(apps_path, app)).filter(fs.existsSync),
app_list.map((app) => path.resolve(apps_path, app)).filter(fs.existsSync)
);
const USING_CACHED = Boolean(argv["using-cached"]);
@ -250,11 +250,11 @@ function get_all_files_to_build(apps) {
for (let app of apps) {
let public_path = get_public_path(app);
include_patterns.push(
path.resolve(public_path, "**", "*.bundle.{js,ts,css,sass,scss,less,styl,jsx}"),
path.resolve(public_path, "**", "*.bundle.{js,ts,css,sass,scss,less,styl,jsx}")
);
ignore_patterns.push(
path.resolve(public_path, "node_modules"),
path.resolve(public_path, "dist"),
path.resolve(public_path, "dist")
);
}
@ -275,7 +275,7 @@ function get_files_to_build(files) {
include_patterns.push(path.resolve(public_path, "**", bundle));
ignore_patterns.push(
path.resolve(public_path, "node_modules"),
path.resolve(public_path, "dist"),
path.resolve(public_path, "dist")
);
}
@ -341,7 +341,7 @@ function get_watch_config() {
notify_redis({ error });
} else {
let { new_assets_json, prev_assets_json } = await write_assets_json(
result.metafile,
result.metafile
);
let changed_files;
@ -379,7 +379,7 @@ function log_built_assets(results) {
{
text: chalk.cyan.bold("Size"),
width: column_widths[1],
},
}
);
cliui.div("");
@ -422,7 +422,7 @@ function log_built_assets(results) {
{
text: file.size,
width: column_widths[1],
},
}
);
}
cliui.div("");
@ -524,7 +524,7 @@ function run_build_command_for_apps(apps) {
process.chdir(root_app_path);
if (!fs.existsSync(node_modules)) {
log(
`\nInstalling dependencies for ${chalk.bold(app)} (because node_modules not found)`,
`\nInstalling dependencies for ${chalk.bold(app)} (because node_modules not found)`
);
execSync("yarn install", { encoding: "utf8", stdio: "inherit" });
}
@ -571,7 +571,7 @@ async function notify_redis({ error, success, changed_files }) {
JSON.stringify({
event: "build_event",
message: payload,
}),
})
);
}