Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions scripts/compile-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function pascalCase(x) {

const iconFiles = glob.sync('**/*.svg', { cwd: iconsDir, realpath: true });

iconFiles.forEach(async filePath => {
iconFiles.forEach(async (filePath) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a Prettier autofix on save

const svgSource = fs.readFileSync(filePath);

try {
Expand Down Expand Up @@ -55,7 +55,8 @@ export const icon = ${componentName};
);

const outputFilePath = filePath.replace(/\.svg$/, '.js');
fs.writeFileSync(outputFilePath, jsxSource);
const comment = '// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY\n\n';
fs.writeFileSync(outputFilePath, comment + jsxSource);
Comment on lines +58 to +59
Copy link
Contributor Author

@cee-chen cee-chen Sep 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments in ast are a bit of a headache apparently (you have to pass in a custom preserveComments option, and then you have to use template.smart() instead of the template.ast shortcut, etc.) so I opted for the path of least resistance and just threw in the comment directly into the writeFile 🙃

} catch (e) {
console.error(`Error processing ${filePath}`);
console.error(e);
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/accessibility.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAccessibility = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/aggregate.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAggregate = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/alert.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAlert = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/analyze_event.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAnalyzeEvent = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/annotation.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAnnotation = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/apm_trace.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconApmTrace = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_add_data.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppAddData = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_advanced_settings.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppAdvancedSettings = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_agent.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppAgent = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_apm.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppApm = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_app_search.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppAppSearch = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_auditbeat.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppAuditbeat = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_canvas.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppCanvas = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_code.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppCode = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_console.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppConsole = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_cross_cluster_replication.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppCrossClusterReplication = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_dashboard.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppDashboard = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_devtools.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppDevtools = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_discover.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppDiscover = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_ems.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppEms = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_filebeat.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppFilebeat = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_fleet.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppFleet = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_gis.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppGis = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_graph.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppGraph = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_grok.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppGrok = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_heartbeat.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppHeartbeat = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_index_management.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppIndexManagement = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_index_pattern.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppIndexPattern = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_index_rollup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppIndexRollup = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_lens.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppLens = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_logs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppLogs = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_management.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppManagement = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_metricbeat.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppMetricbeat = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_metrics.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppMetrics = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_ml.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppMl = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_monitoring.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppMonitoring = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_notebook.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppNotebook = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_packetbeat.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppPacketbeat = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_pipeline.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppPipeline = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_recently_viewed.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppRecentlyViewed = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_reporting.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppReporting = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_saved_objects.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppSavedObjects = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_search_profiler.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppSearchProfiler = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_security.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppSecurity = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_security_analytics.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppSecurityAnalytics = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_spaces.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppSpaces = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_sql.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppSql = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_timelion.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppTimelion = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_upgrade_assistant.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppUpgradeAssistant = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_uptime.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppUptime = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_users_roles.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppUsersRoles = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_visualize.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppVisualize = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_watches.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppWatches = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/app_workplace_search.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAppWorkplaceSearch = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/apps.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconApps = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/arrow_down.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconArrowDown = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/arrow_left.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconArrowLeft = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/arrow_right.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconArrowRight = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/arrow_up.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconArrowUp = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/asterisk.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconAsterisk = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/beaker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconBeaker = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/bell.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconBell = ({ title, titleId, ...props }) => (
Expand Down
2 changes: 2 additions & 0 deletions src/components/icon/assets/bellSlash.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY

import * as React from 'react';

const EuiIconBellSlash = ({ title, titleId, ...props }) => (
Expand Down
Loading