MCPcopy
hub / github.com/BuilderIO/mitosis / createFileSet

Function createFileSet

packages/core/src/generators/qwik/component.ts:37–64  ·  view source on GitHub ↗
(options: QwikOptions = {})

Source from the content-addressed store, hash-verified

35}
36
37export function createFileSet(options: QwikOptions = {}): FileSet {
38 const opts: Required<QwikOptions> = {
39 qwikLib: '@builder.io/qwik',
40 qrlPrefix: './',
41 output: 'ts',
42 minify: false,
43 jsx: true,
44 ...options,
45 };
46 const extension = (opts.output == 'mjs' ? 'js' : opts.output) + (opts.jsx ? 'x' : '');
47 const srcOptions: SrcBuilderOptions = {
48 isPretty: !opts.minify,
49 isModule: opts.output != 'cjs',
50 isTypeScript: opts.output == 'ts',
51 isJSX: opts.jsx,
52 isBuilder: true,
53 };
54 const fileSet = {
55 high: new File('high.' + extension, srcOptions, opts.qwikLib, opts.qrlPrefix),
56 med: new File('med.' + extension, srcOptions, opts.qwikLib, opts.qrlPrefix),
57 low: new File('low.' + extension, srcOptions, opts.qwikLib, opts.qrlPrefix),
58 };
59 Object.defineProperty(fileSet, 'CommonStyles', {
60 enumerable: false,
61 value: { styles: new Map<string, CssStyles>() as any, symbolName: null },
62 });
63 return fileSet;
64}
65
66function getCommonStyles(fileSet: FileSet): {
67 styles: Map<string, CssStyles>;

Callers 1

qwik.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected