Move SVG styles to a designated directory

This commit is contained in:
Jeremy Stretch 2024-01-05 09:54:41 -05:00
parent f38973e7ea
commit fc24534467
5 changed files with 9 additions and 8 deletions

View File

@ -75,8 +75,8 @@ async function bundleStyles() {
const entryPoints = {
'netbox-external': 'styles/_external.scss',
'netbox': 'styles/_netbox.scss',
rack_elevation: 'styles/_rack_elevation.scss',
cable_trace: 'styles/_cable_trace.scss',
rack_elevation: 'styles/svg/rack_elevation.scss',
cable_trace: 'styles/svg/cable_trace.scss',
graphiql: 'netbox-graphiql/graphiql.scss',
};
const pluginOptions = { outputStyle: 'compressed' };
@ -100,8 +100,7 @@ async function bundleStyles() {
});
if (result.errors.length === 0) {
for (const [targetName, sourceName] of Object.entries(entryPoints)) {
const source = sourceName.split('/')[1];
console.log(`✅ Bundled source file '${source}' to '${targetName}.css'`);
console.log(`✅ Bundled source file '${sourceName}' to '${targetName}.css'`);
}
}
} catch (err) {

View File

@ -1,2 +0,0 @@
@import './theme-light.scss';
@import './cable-trace.scss';

View File

@ -1,2 +0,0 @@
@import './theme-light.scss';
@import './rack-elevation.scss';

View File

@ -1,3 +1,5 @@
@import '../theme-light.scss';
// Cable Trace Styles.
:root {
@ -73,3 +75,4 @@ svg {
stroke-dasharray: 5px;
}
}

View File

@ -1,3 +1,5 @@
@import '../theme-light.scss';
// Rack Elevation Styles.
svg {
@ -110,3 +112,4 @@ svg {
fill: url(#reserved);
}
}