Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions build/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import Aspects from '../src/props.aspects.js'
import Easings from '../src/props.easing.js'
import Gradients from '../src/props.gradients.js'
import Shadows from '../src/props.shadows.js'
import SVG from '../src/props.svg.js'
import Zindex from '../src/props.zindex.js'
import MaskEdges from '../src/props.masks.edges.js'
import MaskCornerCuts from '../src/props.masks.corner-cuts.js'
import BrandColors from '../src/props.brand-colors.js'
import Palette from '../src/props.palette.js'

import {buildPropsStylesheet} from './to-stylesheet.js'
import {toTokens} from './to-tokens.js'
Expand All @@ -39,10 +39,10 @@ const mainbundle = {
[`${pfx}props.shadows.css`]: Shadows,
[`${pfx}props.aspects.css`]: Aspects,
[`${pfx}props.colors.css`]: Colors.default,
// [`${pfx}props.svg.css`]: SVG,
[`${pfx}props.gradients.css`]: Gradients,
[`${pfx}props.animations.css`]: Animations,
[`${pfx}props.borders.css`]: Borders,
[`${pfx}props.palette.css`]: Palette,
}

const individual_colors = Object.keys(Colors)
Expand Down Expand Up @@ -111,8 +111,8 @@ CJS.end(`module.exports = ${JSON.stringify(toObject(), null, 2)}`)

// gen prop variants
Object.entries({
...mainbundle,
...individual_colors,
...mainbundle,
...individual_colors,
...individual_colors_hsl,
...individuals,
}).forEach(([filename, props]) => {
Expand All @@ -121,31 +121,31 @@ Object.entries({

// gen color hsl main file
buildPropsStylesheet({
filename: pfx + 'props.colors-hsl.css',
props: ColorsHSL.default},
filename: pfx + 'props.colors-hsl.css',
props: ColorsHSL.default},
{selector, prefix}
)

// gen color oklch files
buildPropsStylesheet({
filename: pfx + 'props.colors-oklch.css',
props: ColorsOKLCH},
filename: pfx + 'props.colors-oklch.css',
props: ColorsOKLCH},
{
selector: useWhere === 'true' ? `:where(*)` : '*',
selector: useWhere === 'true' ? `:where(*)` : '*',
prefix
}
)
buildPropsStylesheet({
filename: pfx + 'props.gray-oklch.css',
props: ColorsOKLCHgray},
filename: pfx + 'props.gray-oklch.css',
props: ColorsOKLCHgray},
{
selector: useWhere === 'true' ? `:where(*)` : '*',
selector: useWhere === 'true' ? `:where(*)` : '*',
prefix
}
)
buildPropsStylesheet({
filename: pfx + 'props.colors-oklch-hues.css',
props: ColorHues},
filename: pfx + 'props.colors-oklch-hues.css',
props: ColorHues},
{selector, prefix}
)

Expand All @@ -161,4 +161,4 @@ entry.write(`@import 'props.media.css';
Object.keys(mainbundle).forEach(filename => {
entry.write(`@import '${filename}';\n`)
})
entry.end()
entry.end()
4 changes: 3 additions & 1 deletion build/to-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SVG from '../src/props.svg.js'
import Zindex from '../src/props.zindex.js'
import MaskEdges from '../src/props.masks.edges.js'
import MaskCornerCuts from '../src/props.masks.corner-cuts.js'
import Palette from '../src/props.palette.js'

import {mapToObjectNotation} from './utils.js'

Expand All @@ -31,5 +32,6 @@ export const toObject = () => {
...Zindex,
...MaskEdges,
...MaskCornerCuts,
...Palette,
})
}
}
Loading