@react-gnome/core
Version:
## Getting Started
49 lines (47 loc) • 1.91 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils/get-plugins.ts
var get_plugins_exports = {};
__export(get_plugins_exports, {
getPlugins: () => getPlugins
});
module.exports = __toCommonJS(get_plugins_exports);
var import_import_polyfills = require("../esbuild-plugins/import-polyfills/import-polyfills.cjs");
var import_react_gtk_plugin = require("../esbuild-plugins/react-gtk/react-gtk-plugin.cjs");
var import_watch_logger_plugin = require("../esbuild-plugins/watch-logger/watch-logger-plugin.cjs");
var getPlugins = (program, options) => {
const additionalPlugins = program.additionalPlugins();
const plugins = [
(0, import_import_polyfills.importPolyfillsPlugin)(program),
(0, import_react_gtk_plugin.reactGtkPlugin)(program, options)
];
if (additionalPlugins.before) {
plugins.push(...additionalPlugins.before);
}
if (program.watchMode) {
plugins.push((0, import_watch_logger_plugin.watchLoggerPlugin)());
}
if (program.config.esbuildPlugins) {
plugins.push(...program.config.esbuildPlugins);
}
if (additionalPlugins.after) {
plugins.push(...additionalPlugins.after);
}
return plugins;
};