@teambit/compilation.aspect-docs.multi-compiler 0.0.0-2c59decb3ee13abf8a270cdb0b3140588609152b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export { default as MultiCompiler } from './multi-compiler.mdx';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default as MultiCompiler } from './multi-compiler.mdx';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const MultiCompilerDocs: () => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
3
+ import { MDXLayout } from '@teambit/mdx.ui.mdx-layout';
4
+ import { MultiCompiler } from './index';
5
+ export const MultiCompilerDocs = () => (_jsx(ThemeCompositions, { children: _jsx(MDXLayout, { children: _jsx(MultiCompiler, {}) }) }));
6
+ //# sourceMappingURL=multi-compiler.composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi-compiler.composition.js","sourceRoot":"","sources":["../multi-compiler.composition.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,CACrC,KAAC,iBAAiB,cAChB,KAAC,SAAS,cACR,KAAC,aAAa,KAAG,GACP,GACM,CACrB,CAAC"}
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: 'Docs for MultiCompiler aspect'
3
+ labels: ['docs', 'aspect', 'extensions']
4
+ ---
5
+
6
+ import { MultiCompiler } from './index';
7
+
8
+ ## Static Content Page in MDX
9
+
10
+ Docs for MultiCompiler aspect
11
+
12
+ ### Component usage
13
+
14
+ Use your component in any mdx file:
15
+
16
+ ```js
17
+ import { MultiCompiler } from '@teambit/aspect-docs.multi-compiler';
18
+
19
+ <MultiCompiler />;
20
+ ```
21
+
22
+ ### Render with theme and MDX providers
23
+
24
+ ```js
25
+ import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
26
+ import { MDXLayout } from '@teambit/ui.mdx-layout';
27
+ import { MultiCompiler } from '@teambit/aspect-docs.multi-compiler';
28
+
29
+ <ThemeCompositions>
30
+ <MDXLayout>
31
+ <MultiCompiler />
32
+ </MDXLayout>
33
+ </ThemeCompositions>;
34
+ ```
@@ -0,0 +1,52 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ MDXContent.isMDXComponent = true;
8
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { useMDXComponents as _provideComponents } from "@mdx-js/react";
10
+ function _createMdxContent(props) {
11
+ var _components = _objectSpread(_objectSpread({
12
+ code: "code",
13
+ li: "li",
14
+ p: "p",
15
+ pre: "pre",
16
+ ul: "ul"
17
+ }, _provideComponents()), props.components);
18
+ return _jsxs(_Fragment, {
19
+ children: [_jsxs(_components.p, {
20
+ children: ["The multi-compiler aspect allows the configuration of multiple compilers on a component. This determines which compiler to apply on a component file using the ", _jsx(_components.code, {
21
+ children: "isFileSupported()"
22
+ }), " compiler API."]
23
+ }), "\n", _jsxs(_components.ul, {
24
+ children: ["\n", _jsxs(_components.li, {
25
+ children: [_jsx(_components.code, {
26
+ children: "createCompiler(compilers: Compiler[], options: CompilerOptions)"
27
+ }), " API to support the creation a Multi-compiler instance which can be used in the Env API (the ", _jsx(_components.code, {
28
+ children: "overrideCompiler"
29
+ }), " and ", _jsx(_components.code, {
30
+ children: "getCompiler"
31
+ }), " APIs)."]
32
+ }), "\n", _jsx(_components.li, {
33
+ children: "Supports the creation of a multi-compiler build tasks."
34
+ }), "\n"]
35
+ }), "\n", _jsx(_components.pre, {
36
+ children: _jsx(_components.code, {
37
+ className: "language-ts",
38
+ children: "// create a multi compiler instance.\nconst compiler = multiCompiler.createCompiler([createBabelCompiler(), createTsCompiler()]);\n\n// create a multi-compiler build task.\ncompiler.createTask('MultiCompiler', compiler);\n"
39
+ })
40
+ })]
41
+ });
42
+ }
43
+ export default function MDXContent() {
44
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
45
+ var _provideComponents$pr = _objectSpread(_objectSpread({}, _provideComponents()), props.components),
46
+ MDXLayout = _provideComponents$pr.wrapper;
47
+ return MDXLayout ? _jsx(MDXLayout, _objectSpread(_objectSpread({}, props), {}, {
48
+ children: _jsx(_createMdxContent, _objectSpread({}, props))
49
+ })) : _createMdxContent(props);
50
+ }
51
+
52
+ //# sourceMappingURL=multi-compiler.mdx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MDXContent","isMDXComponent","Fragment","_Fragment","jsx","_jsx","jsxs","_jsxs","useMDXComponents","_provideComponents","_createMdxContent","props","_components","_objectSpread","code","li","p","pre","ul","components","children","className","arguments","length","undefined","_provideComponents$pr","MDXLayout","wrapper"],"sourceRoot":"/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_aspect-docs_multi-compiler@2c59decb3ee13abf8a270cdb0b3140588609152b","sources":["multi-compiler.mdx.js"],"sourcesContent":["MDXContent.isMDXComponent = true;\nimport {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \"react/jsx-runtime\";\nimport {useMDXComponents as _provideComponents} from \"@mdx-js/react\";\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n pre: \"pre\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"The multi-compiler aspect allows the configuration of multiple compilers on a component. This determines which compiler to apply on a component file using the \", _jsx(_components.code, {\n children: \"isFileSupported()\"\n }), \" compiler API.\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"createCompiler(compilers: Compiler[], options: CompilerOptions)\"\n }), \" API to support the creation a Multi-compiler instance which can be used in the Env API (the \", _jsx(_components.code, {\n children: \"overrideCompiler\"\n }), \" and \", _jsx(_components.code, {\n children: \"getCompiler\"\n }), \" APIs).\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Supports the creation of a multi-compiler build tasks.\"\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-ts\",\n children: \"// create a multi compiler instance.\\nconst compiler = multiCompiler.createCompiler([createBabelCompiler(), createTsCompiler()]);\\n\\n// create a multi-compiler build task.\\ncompiler.createTask('MultiCompiler', compiler);\\n\"\n })\n })]\n });\n}\nexport default function MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\n"],"mappings":";;;;;;AAAAA,UAAU,CAACC,cAAc,GAAG,IAAI;AAChC,SAAQC,QAAQ,IAAIC,SAAS,EAAEC,GAAG,IAAIC,IAAI,EAAEC,IAAI,IAAIC,KAAK,QAAO,mBAAmB;AACnF,SAAQC,gBAAgB,IAAIC,kBAAkB,QAAO,eAAe;AACpE,SAASC,iBAAiBA,CAACC,KAAK,EAAE;EAChC,IAAMC,WAAW,GAAAC,aAAA,CAAAA,aAAA;IACfC,IAAI,EAAE,MAAM;IACZC,EAAE,EAAE,IAAI;IACRC,CAAC,EAAE,GAAG;IACNC,GAAG,EAAE,KAAK;IACVC,EAAE,EAAE;EAAI,GACLT,kBAAkB,CAAC,CAAC,GACpBE,KAAK,CAACQ,UAAU,CACpB;EACD,OAAOZ,KAAK,CAACJ,SAAS,EAAE;IACtBiB,QAAQ,EAAE,CAACb,KAAK,CAACK,WAAW,CAACI,CAAC,EAAE;MAC9BI,QAAQ,EAAE,CAAC,iKAAiK,EAAEf,IAAI,CAACO,WAAW,CAACE,IAAI,EAAE;QACnMM,QAAQ,EAAE;MACZ,CAAC,CAAC,EAAE,gBAAgB;IACtB,CAAC,CAAC,EAAE,IAAI,EAAEb,KAAK,CAACK,WAAW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B,CAACC,KAAK,CAAC;AAC/B","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_aspect-docs_multi-compiler@2c59decb3ee13abf8a270cdb0b3140588609152b/dist/multi-compiler.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_aspect-docs_multi-compiler@2c59decb3ee13abf8a270cdb0b3140588609152b/dist/multi-compiler.docs.mdx';
3
+
4
+ export const compositions = [compositions_0];
5
+ export const overview = [overview_0];
6
+
7
+ export const compositions_metadata = {"compositions":[{"displayName":"Multi compiler docs","identifier":"MultiCompilerDocs"}]};
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as MultiCompiler } from './multi-compiler.mdx';
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
3
+ import { MDXLayout } from '@teambit/mdx.ui.mdx-layout';
4
+ import { MultiCompiler } from './index';
5
+
6
+ export const MultiCompilerDocs = () => (
7
+ <ThemeCompositions>
8
+ <MDXLayout>
9
+ <MultiCompiler />
10
+ </MDXLayout>
11
+ </ThemeCompositions>
12
+ );
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: 'Docs for MultiCompiler aspect'
3
+ labels: ['docs', 'aspect', 'extensions']
4
+ ---
5
+
6
+ import { MultiCompiler } from './index';
7
+
8
+ ## Static Content Page in MDX
9
+
10
+ Docs for MultiCompiler aspect
11
+
12
+ ### Component usage
13
+
14
+ Use your component in any mdx file:
15
+
16
+ ```js
17
+ import { MultiCompiler } from '@teambit/aspect-docs.multi-compiler';
18
+
19
+ <MultiCompiler />;
20
+ ```
21
+
22
+ ### Render with theme and MDX providers
23
+
24
+ ```js
25
+ import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
26
+ import { MDXLayout } from '@teambit/ui.mdx-layout';
27
+ import { MultiCompiler } from '@teambit/aspect-docs.multi-compiler';
28
+
29
+ <ThemeCompositions>
30
+ <MDXLayout>
31
+ <MultiCompiler />
32
+ </MDXLayout>
33
+ </ThemeCompositions>;
34
+ ```
@@ -0,0 +1,12 @@
1
+ The multi-compiler aspect allows the configuration of multiple compilers on a component. This determines which compiler to apply on a component file using the `isFileSupported()` compiler API.
2
+
3
+ - `createCompiler(compilers: Compiler[], options: CompilerOptions)` API to support the creation a Multi-compiler instance which can be used in the Env API (the `overrideCompiler` and `getCompiler` APIs).
4
+ - Supports the creation of a multi-compiler build tasks.
5
+
6
+ ```ts
7
+ // create a multi compiler instance.
8
+ const compiler = multiCompiler.createCompiler([createBabelCompiler(), createTsCompiler()]);
9
+
10
+ // create a multi-compiler build task.
11
+ compiler.createTask('MultiCompiler', compiler);
12
+ ```
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@teambit/compilation.aspect-docs.multi-compiler",
3
+ "version": "0.0.0-2c59decb3ee13abf8a270cdb0b3140588609152b",
4
+ "homepage": "https://bit.cloud/teambit/compilation/aspect-docs/multi-compiler",
5
+ "main": "dist/index.js",
6
+ "componentId": {
7
+ "scope": "teambit.compilation",
8
+ "name": "aspect-docs/multi-compiler",
9
+ "version": "2c59decb3ee13abf8a270cdb0b3140588609152b"
10
+ },
11
+ "dependencies": {},
12
+ "devDependencies": {
13
+ "@types/mocha": "9.1.0",
14
+ "@types/jest": "^29.2.2",
15
+ "@types/testing-library__jest-dom": "^5.9.5",
16
+ "@teambit/mdx.mdx-env": "3.1.0"
17
+ },
18
+ "peerDependencies": {
19
+ "react": "^17.0.0 || ^18.0.0",
20
+ "@teambit/mdx.ui.mdx-layout": "^1.0.14",
21
+ "@teambit/documenter.theme.theme-compositions": "^4.1.5"
22
+ },
23
+ "license": "Apache-2.0",
24
+ "optionalDependencies": {},
25
+ "peerDependenciesMeta": {},
26
+ "private": false,
27
+ "engines": {
28
+ "node": ">=12.22.0"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/teambit/bit"
33
+ },
34
+ "keywords": [
35
+ "bit",
36
+ "components",
37
+ "collaboration",
38
+ "web",
39
+ "react",
40
+ "react-components",
41
+ "angular",
42
+ "angular-components"
43
+ ]
44
+ }
@@ -0,0 +1,43 @@
1
+ declare module '*.png' {
2
+ const value: any;
3
+ export = value;
4
+ }
5
+ declare module '*.svg' {
6
+ import type { FunctionComponent, SVGProps } from 'react';
7
+
8
+ export const ReactComponent: FunctionComponent<
9
+ SVGProps<SVGSVGElement> & { title?: string }
10
+ >;
11
+ const src: string;
12
+ export default src;
13
+ }
14
+
15
+ // @TODO Gilad
16
+ declare module '*.jpg' {
17
+ const value: any;
18
+ export = value;
19
+ }
20
+ declare module '*.jpeg' {
21
+ const value: any;
22
+ export = value;
23
+ }
24
+ declare module '*.gif' {
25
+ const value: any;
26
+ export = value;
27
+ }
28
+ declare module '*.bmp' {
29
+ const value: any;
30
+ export = value;
31
+ }
32
+ declare module '*.otf' {
33
+ const value: any;
34
+ export = value;
35
+ }
36
+ declare module '*.woff' {
37
+ const value: any;
38
+ export = value;
39
+ }
40
+ declare module '*.woff2' {
41
+ const value: any;
42
+ export = value;
43
+ }
@@ -0,0 +1,42 @@
1
+ declare module '*.module.css' {
2
+ const classes: { readonly [key: string]: string };
3
+ export default classes;
4
+ }
5
+ declare module '*.module.scss' {
6
+ const classes: { readonly [key: string]: string };
7
+ export default classes;
8
+ }
9
+ declare module '*.module.sass' {
10
+ const classes: { readonly [key: string]: string };
11
+ export default classes;
12
+ }
13
+
14
+ declare module '*.module.less' {
15
+ const classes: { readonly [key: string]: string };
16
+ export default classes;
17
+ }
18
+
19
+ declare module '*.less' {
20
+ const classes: { readonly [key: string]: string };
21
+ export default classes;
22
+ }
23
+
24
+ declare module '*.css' {
25
+ const classes: { readonly [key: string]: string };
26
+ export default classes;
27
+ }
28
+
29
+ declare module '*.sass' {
30
+ const classes: { readonly [key: string]: string };
31
+ export default classes;
32
+ }
33
+
34
+ declare module '*.scss' {
35
+ const classes: { readonly [key: string]: string };
36
+ export default classes;
37
+ }
38
+
39
+ declare module '*.mdx' {
40
+ const component: any;
41
+ export default component;
42
+ }