Skip to content

Commit 1a259ff

Browse files
committed
feat(app-webpack): improve framework config types
1 parent 5d63093 commit 1a259ff

File tree

1 file changed

+66
-5
lines changed

1 file changed

+66
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import {
2+
QuasarComponents,
3+
QuasarDirectives,
24
QuasarIconSets,
35
QuasarLanguageCodes,
4-
QuasarPluginOptions,
6+
QuasarPlugins,
57
QuasarUIConfiguration,
68
} from "quasar";
79

@@ -13,13 +15,72 @@ type SerializableConfiguration<T> = {
1315
};
1416

1517
interface QuasarFrameworkConfiguration {
18+
/**
19+
* @see - QuasarConfOptions tab in API cards throughout the docs
20+
*/
1621
config?: SerializableConfiguration<QuasarUIConfiguration>;
22+
/**
23+
* One of the Quasar IconSets
24+
*
25+
* @see https://v2.quasar.dev/options/quasar-icon-sets
26+
*
27+
* @example 'material-icons'
28+
*/
1729
iconSet?: QuasarIconSets;
30+
/**
31+
* One of the Quasar language packs
32+
*
33+
* @see https://v2.quasar.dev/options/quasar-language-packs
34+
*
35+
* @example 'en-US'
36+
* @example 'es'
37+
*/
1838
lang?: QuasarLanguageCodes;
39+
/**
40+
* Quasar CSS addons have breakpoint aware versions of flex and spacing classes
41+
*
42+
* @see https://quasar.dev/layout/grid/introduction-to-flexbox#flex-addons
43+
* @see https://quasar.dev/style/spacing#flex-addons
44+
*/
1945
cssAddon?: boolean;
20-
/** @default 'kebab' */
46+
47+
/**
48+
* Auto import - how to detect components in your vue files
49+
* "kebab": q-carousel q-page
50+
* "pascal": QCarousel QPage
51+
* "combined": q-carousel QPage
52+
*
53+
* @default 'kebab'
54+
*/
2155
autoImportComponentCase?: "kebab" | "pascal" | "combined";
22-
components?: (keyof QuasarPluginOptions["components"])[];
23-
directives?: (keyof QuasarPluginOptions["directives"])[];
24-
plugins?: (keyof QuasarPluginOptions["plugins"])[];
56+
57+
/**
58+
* Quasar will auto import components based on your usage.
59+
* But, in case you have a special case, you can manually specify Quasar components to be available everywhere.
60+
*
61+
* An example case would be having custom component definitions with plain string templates, inside .js or .ts files,
62+
* in which you are using Quasar components (e.g. q-avatar).
63+
*
64+
* Another example would be that dynamically rendering components depending on an API response or similar (e.g. in a CMS),
65+
* something like `<component :is="dynamicName">` where `dynamicName` is a string that matches a Quasar component name.
66+
*
67+
* @example ['QAvatar', 'QChip']
68+
*/
69+
components?: (keyof QuasarComponents)[];
70+
/**
71+
* Quasar will auto import directives based on your usage.
72+
* But, in case you have a special case, you can manually specify Quasar directives to be available everywhere.
73+
*
74+
* An example case would be having custom component definitions with plain string templates, inside .js or .ts files,
75+
* in which you are using Quasar directives (e.g. v-intersection).
76+
*
77+
* @example ['Intersection', 'Mutation']
78+
*/
79+
directives?: (keyof QuasarDirectives)[];
80+
/**
81+
* Quasar plugins to be installed. Specify the ones you are using in your app.
82+
*
83+
* @example ['Notify', 'Loading', 'Meta', 'AppFullscreen']
84+
*/
85+
plugins?: (keyof QuasarPlugins)[];
2586
}

0 commit comments

Comments
 (0)