File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,6 +182,10 @@ export interface ConfigBase<Theme extends {} = {}> {
182182export interface Preset < Theme extends { } = { } > extends ConfigBase < Theme > {
183183 name : string
184184 enforce ?: 'pre' | 'post'
185+ /**
186+ * Preset options for other tools like IDE to consume
187+ */
188+ options ?: any
185189}
186190
187191export interface GeneratorOptions {
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const preset = (options?: AttributifyOptions): Preset => {
2222 name : '@unocss/preset-attributify' ,
2323 variants,
2424 extractors,
25+ options,
2526 }
2627}
2728
Original file line number Diff line number Diff line change @@ -38,18 +38,20 @@ async function searchForIcon(
3838 }
3939}
4040
41- export const preset = ( {
42- scale = 1 ,
43- mode = 'auto' ,
44- prefix = 'i-' ,
45- warn = false ,
46- collections = { } ,
47- extraProperties = { } ,
48- layer = 'icons' ,
49- } : IconsOptions = { } ) : Preset => {
41+ export const preset = ( options : IconsOptions = { } ) : Preset => {
42+ const {
43+ scale = 1 ,
44+ mode = 'auto' ,
45+ prefix = 'i-' ,
46+ warn = false ,
47+ collections = { } ,
48+ extraProperties = { } ,
49+ layer = 'icons' ,
50+ } = options
5051 return {
5152 name : '@unocss/preset-icons' ,
5253 enforce : 'pre' ,
54+ options,
5355 layers : {
5456 icons : - 10 ,
5557 } ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export const preset = (options: UnoOptions = {}): Preset<Theme> => ({
2828 shortcuts : [
2929 ...containerShortcuts ,
3030 ] ,
31+ options,
3132} )
3233
3334export default preset
You can’t perform that action at this time.
0 commit comments