@teambit/react 0.0.782 → 0.0.785
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.
- package/artifacts/__bit_junit.xml +2 -2
- package/artifacts/env-template/public/{857.bdfded1490d9efe637f8.js → 722.00ba2b570017d43e9353.js} +16 -16
- package/artifacts/env-template/public/assets-manifest.json +12 -12
- package/artifacts/env-template/public/{compositions.132ad56af83a59d06627.js → compositions.4929902d5c541eb1f62e.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.077ea2408336de8f238c.js → overview.80e5c2748f1986e2f2e7.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/peers.13afa9f20f2f6f8caef6.js +1 -0
- package/artifacts/env-template/public/{preview-root.c56b4d752d9774bccd8b.js → preview-root.91d7d0b1b20c51d1c4e1.js} +1 -1
- package/artifacts/env-template/public/static/css/722.6843020b.css +1 -0
- package/artifacts/preview/teambit_react_react-preview.js +1 -1
- package/{compositions-1657164425299.js → compositions-1657337177086.js} +0 -0
- package/dist/react.env.js.map +1 -1
- package/{overview-1657164425299.js → overview-1657337177086.js} +0 -0
- package/package-tar/teambit-react-0.0.785.tgz +0 -0
- package/package.json +32 -95
- package/{preview-1657164425299.js → preview-1657337177086.js} +2 -2
- package/artifacts/env-template/public/peers.6a6694db7f2fdcdd11a0.js +0 -1
- package/artifacts/env-template/public/static/css/857.c0eadd42.css +0 -1
- package/package-tar/teambit-react-0.0.782.tgz +0 -0
|
@@ -8,4 +8,4 @@ It enables you to quickly set up a dev environment that follows best practices f
|
|
|
8
8
|
}
|
|
9
9
|
`)),(0,_react2.mdx)("h2",null,"Creating Components"),(0,_react2.mdx)("p",null,"React env provides a set of component templates that can be used to speed-up and standardize your component development:"),(0,_react2.mdx)("p",null,"To list all available templates:"),(0,_react2.mdx)("pre",null,(0,_react2.mdx)("code",{parentName:"pre",className:"language-bash"},`bit templates
|
|
10
10
|
`)),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react")," a basic React UI component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-context")," a react context component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-hook")," a react hook component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"mdx-component")," an MDX component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-component-js")," a basic React component in JS."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-env")," boilerplate for a customized environment configuration.")),(0,_react2.mdx)("p",null,"Use any of these templates with the ",(0,_react2.mdx)("inlineCode",{parentName:"p"},"bit create")," command:"),(0,_react2.mdx)("pre",null,(0,_react2.mdx)("code",{parentName:"pre",className:"language-bash"},`bit create react ui/my-welcome
|
|
11
|
-
`)),(0,_react2.mdx)("h2",null,"Development services and configurations"),(0,_react2.mdx)("p",null,"The table below lists ",(0,_react2.mdx)("a",{parentName:"p",href:"/dev-services/dev-services-overview"},"dev services")," that are provided by the React env. Each service handles a specific component development operation. Each is implemented by the React env, using a specific set of configurations."),(0,_react2.mdx)("p",null,"To customize and extend the React env, ",(0,_react2.mdx)("a",{parentName:"p",href:"/envs/pre-configured-envs/react/extending-react#using-your-own-react-env-extension"},"create you own React env extension"),". You can replace the Aspects used by the env, or override their configurations (use the links provided in the 'customization' column)."),(0,_react2.mdx)("table",null,(0,_react2.mdx)("thead",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"thead"},(0,_react2.mdx)("th",{parentName:"tr",align:null},"Service"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Aspect"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Default config"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Customization"))),(0,_react2.mdx)("tbody",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/compiler-overview"},"Compiler")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript"},"TypeScript")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/typescript/tsconfig.json"},"tsconfig.json")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#typescript"},"TS compilation config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/configure-env-with-compiler"},"Replace compiler"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/tester/overview"},"Tester")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/jest"},"Jest")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/jest/jest.config.js"},"jest.config.js")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#jest"},"Jest config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/tester/configure-env-with-tester"},"Replace Tester"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/linter/overview"},"Linting")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/eslint"},"ESLint")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/eslint/eslintrc.ts"},"eslintrc.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#eslint"},"ESLint Config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/linter/configure-env-with-linter"},"Replace Linter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/formatter/overview"},"Formatter")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/prettier"},"Prettier")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/prettier/prettier.config.js"},"prettier.config.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#prettier"},"Prettier config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/formatter/configure-env-with-formatter"},"Replace Formatter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"DevServer"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.dev.ts"},"webpack.config.preview.dev.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling in the workspace)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/preview/overview"},"Preview")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null}),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/preview/register-custom-preview"},"Add preview"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/packages/packages-overview"},"Package")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"See the ",(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript/~code/typescript.main.runtime.ts"},"TypeScript Aspect")," config"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/packages/managing-package-json#set-configuration-from-an-env"},"Add Env package config")," ",(0,_react2.mdx)("br",null)," \u2022 TypeScript's package config")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"Bundler"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.ts"},"webpack.config.preview.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling during build)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-overview"},"Documentation")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/docs/index.tsx"},"Docs template")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-templates"},"Replace docs template"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Builder")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Build pipeline")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/builder/build-pipelines"},"Build pipelines"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/dependencies-overview"},"Dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/react.env.ts"},"Env-dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/configuring-dependencies#configuring-dependencies-from-an-env"},"Env dependencies"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/generator/generator-overview"},"Generator")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/templates/react-component.ts"},"React templates")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:""},"Add a component template"))))),(0,_react2.mdx)("h3",null,"Default React versions"),(0,_react2.mdx)("p",null,"By default, the React env sets the following dependency versions for components using it:"),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react-dom")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.8")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react-dom"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.5")))))}MDXContent.__bit_component=__bit_component,MDXContent.isMDXComponent=!0},64450:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.782",homepage:"https://bit.dev/teambit/react/react",exported:!0},_interopRequireDefault=__webpack_require__2(88244);Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.Logo=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__2(63804));return _react=function(){return data},data}_react.__bit_component=__bit_component;const Logo=()=>_react().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},_react().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/react.svg"}));Logo.__bit_component=__bit_component,exports2.Logo=Logo},85057:module2=>{"use strict";module2.exports=MdxJsReact},63804:module2=>{"use strict";module2.exports=React},58459:module2=>{"use strict";module2.exports=TeambitMdxUiMdxScopeContext}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module2=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module2,module2.exports,__webpack_require__),module2.exports}__webpack_require__.d=(exports2,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports2,key)&&Object.defineProperty(exports2,key,{enumerable:!0,get:definition[key]})},__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports2=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports2,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{compositions:()=>compositions,overview:()=>overview});var react_docs_namespaceObject={};__webpack_require__.r(react_docs_namespaceObject),__webpack_require__.d(react_docs_namespaceObject,{default:()=>MDXContent});var react_composition=__webpack_require__(64450),external_React_=__webpack_require__(63804),external_MdxJsReact_=__webpack_require__(85057),external_TeambitMdxUiMdxScopeContext_=__webpack_require__(58459),dist=__webpack_require__(55906),_excluded=["components"];function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded),key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&(!Object.prototype.propertyIsEnumerable.call(source,key)||(target[key]=source[key]))}return target}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,external_MdxJsReact_.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,external_MdxJsReact_.mdx)(external_TeambitMdxUiMdxScopeContext_.MDXScopeProvider,{components:{ReactOverview:dist.ZP},mdxType:"MDXScopeProvider"},(0,external_MdxJsReact_.mdx)(dist.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0;const compositions=[react_composition],overview=[react_docs_namespaceObject]})(),__webpack_exports__})()});
|
|
11
|
+
`)),(0,_react2.mdx)("h2",null,"Development services and configurations"),(0,_react2.mdx)("p",null,"The table below lists ",(0,_react2.mdx)("a",{parentName:"p",href:"/dev-services/dev-services-overview"},"dev services")," that are provided by the React env. Each service handles a specific component development operation. Each is implemented by the React env, using a specific set of configurations."),(0,_react2.mdx)("p",null,"To customize and extend the React env, ",(0,_react2.mdx)("a",{parentName:"p",href:"/envs/pre-configured-envs/react/extending-react#using-your-own-react-env-extension"},"create you own React env extension"),". You can replace the Aspects used by the env, or override their configurations (use the links provided in the 'customization' column)."),(0,_react2.mdx)("table",null,(0,_react2.mdx)("thead",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"thead"},(0,_react2.mdx)("th",{parentName:"tr",align:null},"Service"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Aspect"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Default config"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Customization"))),(0,_react2.mdx)("tbody",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/compiler-overview"},"Compiler")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript"},"TypeScript")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/typescript/tsconfig.json"},"tsconfig.json")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#typescript"},"TS compilation config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/configure-env-with-compiler"},"Replace compiler"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/tester/overview"},"Tester")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/jest"},"Jest")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/jest/jest.config.js"},"jest.config.js")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#jest"},"Jest config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/tester/configure-env-with-tester"},"Replace Tester"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/linter/overview"},"Linting")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/eslint"},"ESLint")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/eslint/eslintrc.ts"},"eslintrc.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#eslint"},"ESLint Config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/linter/configure-env-with-linter"},"Replace Linter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/formatter/overview"},"Formatter")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/prettier"},"Prettier")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/prettier/prettier.config.js"},"prettier.config.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#prettier"},"Prettier config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/formatter/configure-env-with-formatter"},"Replace Formatter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"DevServer"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.dev.ts"},"webpack.config.preview.dev.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling in the workspace)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/preview/overview"},"Preview")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null}),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/preview/register-custom-preview"},"Add preview"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/packages/packages-overview"},"Package")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"See the ",(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript/~code/typescript.main.runtime.ts"},"TypeScript Aspect")," config"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/packages/managing-package-json#set-configuration-from-an-env"},"Add Env package config")," ",(0,_react2.mdx)("br",null)," \u2022 TypeScript's package config")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"Bundler"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.ts"},"webpack.config.preview.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling during build)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-overview"},"Documentation")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/docs/index.tsx"},"Docs template")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-templates"},"Replace docs template"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Builder")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Build pipeline")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/builder/build-pipelines"},"Build pipelines"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/dependencies-overview"},"Dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/react.env.ts"},"Env-dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/configuring-dependencies#configuring-dependencies-from-an-env"},"Env dependencies"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/generator/generator-overview"},"Generator")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/templates/react-component.ts"},"React templates")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:""},"Add a component template"))))),(0,_react2.mdx)("h3",null,"Default React versions"),(0,_react2.mdx)("p",null,"By default, the React env sets the following dependency versions for components using it:"),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react-dom")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.8")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react-dom"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.5")))))}MDXContent.__bit_component=__bit_component,MDXContent.isMDXComponent=!0},24931:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.785",homepage:"https://bit.dev/teambit/react/react",exported:!0},_interopRequireDefault=__webpack_require__2(88244);Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.Logo=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__2(63804));return _react=function(){return data},data}_react.__bit_component=__bit_component;const Logo=()=>_react().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},_react().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/react.svg"}));Logo.__bit_component=__bit_component,exports2.Logo=Logo},85057:module2=>{"use strict";module2.exports=MdxJsReact},63804:module2=>{"use strict";module2.exports=React},58459:module2=>{"use strict";module2.exports=TeambitMdxUiMdxScopeContext}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module2=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module2,module2.exports,__webpack_require__),module2.exports}__webpack_require__.d=(exports2,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports2,key)&&Object.defineProperty(exports2,key,{enumerable:!0,get:definition[key]})},__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports2=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports2,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{compositions:()=>compositions,overview:()=>overview});var react_docs_namespaceObject={};__webpack_require__.r(react_docs_namespaceObject),__webpack_require__.d(react_docs_namespaceObject,{default:()=>MDXContent});var react_composition=__webpack_require__(24931),external_React_=__webpack_require__(63804),external_MdxJsReact_=__webpack_require__(85057),external_TeambitMdxUiMdxScopeContext_=__webpack_require__(58459),dist=__webpack_require__(55906),_excluded=["components"];function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded),key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&(!Object.prototype.propertyIsEnumerable.call(source,key)||(target[key]=source[key]))}return target}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,external_MdxJsReact_.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,external_MdxJsReact_.mdx)(external_TeambitMdxUiMdxScopeContext_.MDXScopeProvider,{components:{ReactOverview:dist.ZP},mdxType:"MDXScopeProvider"},(0,external_MdxJsReact_.mdx)(dist.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0;const compositions=[react_composition],overview=[react_docs_namespaceObject]})(),__webpack_exports__})()});
|
|
File without changes
|
package/dist/react.env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ReactEnvType","defaultTsConfig","require","buildTsConfig","eslintConfig","prettierConfig","ReactEnv","constructor","jestAspect","tsAspect","compiler","webpack","workspace","pkg","tester","config","eslint","prettier","dependencyResolver","logger","compilerAspectId","getTsConfig","targetTsConfig","merge","getBuildTsConfig","getCjsJestTester","jestConfigPath","jestModulePath","pathToSource","pathNormalizeToLinux","__dirname","replace","defaultConfig","join","createTester","resolve","getEsmJestTester","getTester","getTsCompilerOptions","mode","tsconfig","cloneDeep","compileJs","compileJsx","types","getTsCjsCompiler","transformers","tsModule","ts","tsCompileOptions","createCjsCompiler","getTsEsmCompiler","createEsmCompiler","getCompiler","getLinter","context","defaultTransformer","configMutator","addExtensionTypes","allTransformers","createLinter","pluginPath","getFormatter","createFormatter","getFileMap","components","local","reduce","index","component","state","filesystem","files","forEach","file","path","id","toString","homepage","fullName","ComponentUrl","toUrl","writeFileMap","fileMap","tmpdir","Math","random","slice","outputFileSync","JSON","stringify","getDevEnvId","ReactAspect","getSchemaExtractor","createSchemaExtractor","getDevServer","baseConfig","basePreviewConfigFactory","envDevConfig","envPreviewDevConfigFactory","componentDevConfig","componentPreviewDevConfigFactory","merged","createDevServer","getBundler","createComponentsWebpackBundler","development","baseProdConfig","basePreviewProdConfigFactory","componentProdConfig","componentPreviewProdConfigFactory","mergedTransformers","createWebpackBundler","createTemplateWebpackBundler","templateConfig","templateWebpackConfigFactory","createBundler","getPeerDependenciesList","getPeerDependenciesListFromEnv","getAdditionalHostDependencies","getDocsTemplate","getMounter","getPreviewConfig","strategyName","splitComponentBundle","getPackageJsonProps","getCjsPackageJsonProps","getEsmPackageJsonProps","getNpmIgnore","CAPSULE_ARTIFACTS_DIR","getDependencies","dependencies","react","devDependencies","peerDependencies","getBuildPipe","modifiers","tsModifier","getCompilerTask","module","task","getBuildPipeWithoutCompiler","pipeWithoutCompiler","filter","aspectId","getEsmCompilerTask","tsCompiler","createTask","getCjsCompilerTask","__getDescriptor","type"],"sources":["react.env.ts"],"sourcesContent":["import ts, { TsConfigSourceFile } from 'typescript';\nimport { tmpdir } from 'os';\nimport { Component } from '@teambit/component';\nimport { ComponentUrl } from '@teambit/component.modules.component-url';\nimport { BuildTask, CAPSULE_ARTIFACTS_DIR } from '@teambit/builder';\nimport { merge, cloneDeep } from 'lodash';\nimport { Bundler, BundlerContext, DevServer, DevServerContext } from '@teambit/bundler';\nimport { CompilerMain } from '@teambit/compiler';\nimport {\n BuilderEnv,\n CompilerEnv,\n DependenciesEnv,\n DevEnv,\n LinterEnv,\n PackageEnv,\n TesterEnv,\n FormatterEnv,\n PipeServiceModifier,\n PipeServiceModifiersMap,\n} from '@teambit/envs';\nimport { JestMain } from '@teambit/jest';\nimport { PackageJsonProps, PkgMain } from '@teambit/pkg';\nimport { Tester, TesterMain } from '@teambit/tester';\nimport { TsConfigTransformer, TypescriptMain } from '@teambit/typescript';\nimport type { TypeScriptCompilerOptions } from '@teambit/typescript';\nimport { WebpackConfigTransformer, WebpackMain } from '@teambit/webpack';\nimport { Workspace } from '@teambit/workspace';\nimport { ESLintMain, EslintConfigTransformer } from '@teambit/eslint';\nimport { PrettierConfigTransformer, PrettierMain } from '@teambit/prettier';\nimport { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { Linter, LinterContext } from '@teambit/linter';\nimport { Formatter, FormatterContext } from '@teambit/formatter';\nimport { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';\nimport type { ComponentMeta } from '@teambit/react.ui.highlighter.component-metadata.bit-component-meta';\nimport { SchemaExtractor } from '@teambit/schema';\nimport { join, resolve } from 'path';\nimport { outputFileSync } from 'fs-extra';\nimport { Logger } from '@teambit/logger';\nimport type { ReactMainConfig } from './react.main.runtime';\nimport { ReactAspect } from './react.aspect';\n// webpack configs for both components and envs\nimport basePreviewConfigFactory from './webpack/webpack.config.base';\nimport basePreviewProdConfigFactory from './webpack/webpack.config.base.prod';\n\n// webpack configs for envs only\n// import devPreviewConfigFactory from './webpack/webpack.config.preview.dev';\nimport envPreviewDevConfigFactory from './webpack/webpack.config.env.dev';\nimport { templateWebpackConfigFactory } from './webpack/webpack.config.env.template';\n\n// webpack configs for components only\nimport componentPreviewProdConfigFactory from './webpack/webpack.config.component.prod';\nimport componentPreviewDevConfigFactory from './webpack/webpack.config.component.dev';\n\nexport const ReactEnvType = 'react';\nconst defaultTsConfig = require('./typescript/tsconfig.json');\nconst buildTsConfig = require('./typescript/tsconfig.build.json');\nconst eslintConfig = require('./eslint/eslintrc');\nconst prettierConfig = require('./prettier/prettier.config.js');\n\n// TODO: move to be taken from the key mode of compiler context\ntype CompilerMode = 'build' | 'dev';\n\ntype GetBuildPipeModifiers = PipeServiceModifiersMap & {\n tsModifier?: PipeServiceModifier;\n};\n\n/**\n * a component environment built for [React](https://reactjs.org) .\n */\nexport class ReactEnv\n implements TesterEnv, CompilerEnv, LinterEnv, DevEnv, BuilderEnv, DependenciesEnv, PackageEnv, FormatterEnv\n{\n constructor(\n /**\n * jest extension\n */\n private jestAspect: JestMain,\n\n /**\n * typescript extension.\n */\n protected tsAspect: TypescriptMain,\n\n /**\n * compiler extension.\n */\n private compiler: CompilerMain,\n\n /**\n * webpack extension.\n */\n private webpack: WebpackMain,\n\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * pkg extension.\n */\n private pkg: PkgMain,\n\n /**\n * tester extension\n */\n private tester: TesterMain,\n\n private config: ReactMainConfig,\n\n private eslint: ESLintMain,\n\n private prettier: PrettierMain,\n\n private dependencyResolver: DependencyResolverMain,\n\n private logger: Logger,\n\n private compilerAspectId: string\n ) {}\n\n getTsConfig(targetTsConfig?: TsConfigSourceFile): TsConfigSourceFile {\n return targetTsConfig ? merge({}, defaultTsConfig, targetTsConfig) : defaultTsConfig;\n }\n\n getBuildTsConfig(targetTsConfig?: TsConfigSourceFile): TsConfigSourceFile {\n return targetTsConfig ? merge({}, buildTsConfig, targetTsConfig) : buildTsConfig;\n }\n\n /**\n * Get a jest tester instance with react config and cjs configs\n * @param jestConfigPath\n * @param jestModulePath\n * @returns\n */\n getCjsJestTester(jestConfigPath?: string, jestModulePath?: string): Tester {\n const pathToSource = pathNormalizeToLinux(__dirname).replace('/dist', '');\n const defaultConfig = join(pathToSource, './jest/jest.cjs.config.js');\n const config = jestConfigPath || defaultConfig;\n return this.jestAspect.createTester(config, jestModulePath || require.resolve('jest'));\n }\n\n /**\n * Get a jest tester instance with react config and esm configs\n * @param jestConfigPath\n * @param jestModulePath\n * @returns\n */\n getEsmJestTester(jestConfigPath?: string, jestModulePath?: string): Tester {\n const pathToSource = pathNormalizeToLinux(__dirname).replace('/dist', '');\n const defaultConfig = join(pathToSource, './jest/jest.esm.config.js');\n const config = jestConfigPath || defaultConfig;\n return this.jestAspect.createTester(config, jestModulePath || require.resolve('jest'));\n }\n\n /**\n * returns a component tester.\n */\n getTester(jestConfigPath: string, jestModulePath?: string): Tester {\n // return this.getEsmJestTester(jestConfigPath, jestModulePath);\n return this.getCjsJestTester(jestConfigPath, jestModulePath);\n }\n\n private getTsCompilerOptions(mode: CompilerMode = 'dev'): TypeScriptCompilerOptions {\n const tsconfig = mode === 'dev' ? cloneDeep(defaultTsConfig) : cloneDeep(buildTsConfig);\n const pathToSource = pathNormalizeToLinux(__dirname).replace('/dist/', '/src/');\n const compileJs = true;\n const compileJsx = true;\n return {\n tsconfig,\n // TODO: @david please remove this line and refactor to be something that makes sense.\n types: [resolve(pathToSource, './typescript/style.d.ts'), resolve(pathToSource, './typescript/asset.d.ts')],\n compileJs,\n compileJsx,\n };\n }\n\n /**\n * Get a compiler instance with react config and set it to cjs module\n * @param mode\n * @param transformers\n * @param tsModule\n * @returns\n */\n getTsCjsCompiler(mode: CompilerMode = 'dev', transformers: TsConfigTransformer[] = [], tsModule = ts) {\n const tsCompileOptions = this.getTsCompilerOptions(mode);\n return this.tsAspect.createCjsCompiler(tsCompileOptions, transformers, tsModule);\n }\n\n /**\n * Get a compiler instance with react config and set it to esm module\n * @param mode\n * @param transformers\n * @param tsModule\n * @returns\n */\n getTsEsmCompiler(mode: CompilerMode = 'dev', transformers: TsConfigTransformer[] = [], tsModule = ts) {\n const tsCompileOptions = this.getTsCompilerOptions(mode);\n return this.tsAspect.createEsmCompiler(tsCompileOptions, transformers, tsModule);\n }\n\n getCompiler(transformers: TsConfigTransformer[] = [], tsModule = ts) {\n // return this.getTsEsmCompiler('dev', transformers, tsModule);\n return this.getTsCjsCompiler('dev', transformers, tsModule);\n }\n\n /**\n * returns and configures the component linter.\n */\n getLinter(context: LinterContext, transformers: EslintConfigTransformer[] = []): Linter {\n const defaultTransformer: EslintConfigTransformer = (configMutator) => {\n configMutator.addExtensionTypes(['.md', '.mdx']);\n return configMutator;\n };\n\n const allTransformers = [defaultTransformer, ...transformers];\n\n return this.eslint.createLinter(\n context,\n {\n config: eslintConfig,\n // resolve all plugins from the react environment.\n pluginPath: __dirname,\n },\n allTransformers\n );\n }\n\n /**\n * returns and configures the component formatter.\n */\n getFormatter(context: FormatterContext, transformers: PrettierConfigTransformer[] = []): Formatter {\n return this.prettier.createFormatter(\n context,\n {\n config: prettierConfig,\n },\n transformers\n );\n }\n\n private getFileMap(components: Component[], local = false) {\n return components.reduce<{ [key: string]: ComponentMeta }>((index, component: Component) => {\n component.state.filesystem.files.forEach((file) => {\n index[file.path] = {\n id: component.id.toString(),\n homepage: local ? `/${component.id.fullName}` : ComponentUrl.toUrl(component.id),\n };\n });\n\n return index;\n }, {});\n }\n\n private writeFileMap(components: Component[], local?: boolean) {\n const fileMap = this.getFileMap(components, local);\n const path = join(tmpdir(), `${Math.random().toString(36).slice(2, 11)}.json`);\n outputFileSync(path, JSON.stringify(fileMap));\n return path;\n }\n\n /**\n * required for `bit start`\n */\n getDevEnvId(id?: string) {\n if (typeof id !== 'string') return ReactAspect.id;\n return id || ReactAspect.id;\n }\n\n /**\n * get a schema generator instance configured with the correct tsconfig.\n */\n getSchemaExtractor(tsconfig: TsConfigSourceFile): SchemaExtractor {\n return this.tsAspect.createSchemaExtractor(this.getTsConfig(tsconfig));\n }\n\n /**\n * returns and configures the React component dev server.\n * required for `bit start`\n */\n getDevServer(context: DevServerContext, transformers: WebpackConfigTransformer[] = []): DevServer {\n const baseConfig = basePreviewConfigFactory(false);\n const envDevConfig = envPreviewDevConfigFactory(context.id);\n const componentDevConfig = componentPreviewDevConfigFactory(this.workspace.path, context.id);\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const merged = configMutator.merge([baseConfig, envDevConfig, componentDevConfig]);\n return merged;\n };\n\n return this.webpack.createDevServer(context, [defaultTransformer, ...transformers]);\n }\n\n async getBundler(context: BundlerContext, transformers: WebpackConfigTransformer[] = []): Promise<Bundler> {\n return this.createComponentsWebpackBundler(context, transformers);\n }\n\n async createComponentsWebpackBundler(\n context: BundlerContext,\n transformers: WebpackConfigTransformer[] = []\n ): Promise<Bundler> {\n const baseConfig = basePreviewConfigFactory(!context.development);\n const baseProdConfig = basePreviewProdConfigFactory(context.development);\n const componentProdConfig = componentPreviewProdConfigFactory();\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const merged = configMutator.merge([baseConfig, baseProdConfig, componentProdConfig]);\n return merged;\n };\n const mergedTransformers = [defaultTransformer, ...transformers];\n return this.createWebpackBundler(context, mergedTransformers);\n }\n\n async createTemplateWebpackBundler(\n context: BundlerContext,\n transformers: WebpackConfigTransformer[] = []\n ): Promise<Bundler> {\n const baseConfig = basePreviewConfigFactory(!context.development);\n const baseProdConfig = basePreviewProdConfigFactory(context.development);\n const templateConfig = templateWebpackConfigFactory();\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const merged = configMutator.merge([baseConfig, baseProdConfig, templateConfig]);\n return merged;\n };\n const mergedTransformers = [defaultTransformer, ...transformers];\n return this.createWebpackBundler(context, mergedTransformers);\n }\n\n private async createWebpackBundler(\n context: BundlerContext,\n transformers: WebpackConfigTransformer[] = []\n ): Promise<Bundler> {\n return this.webpack.createBundler(context, transformers);\n }\n\n /**\n * Get the peers configured by the env on the components + the host deps configured by the env\n */\n getPeerDependenciesList() {\n return this.dependencyResolver.getPeerDependenciesListFromEnv(this);\n }\n\n getAdditionalHostDependencies(): string[] {\n return ['@teambit/mdx.ui.mdx-scope-context', '@mdx-js/react', 'react'];\n }\n\n /**\n * returns a path to a docs template.\n */\n getDocsTemplate() {\n return require.resolve('@teambit/react.ui.docs-app');\n }\n\n icon = 'https://static.bit.dev/extensions-icons/react.svg';\n\n /**\n * returns the path to the compositions template\n */\n getMounter() {\n return require.resolve('@teambit/react.ui.compositions-app');\n }\n\n getPreviewConfig() {\n return {\n strategyName: 'component',\n splitComponentBundle: true,\n };\n }\n\n /**\n * define the package json properties to add to each component.\n */\n getPackageJsonProps(): PackageJsonProps {\n // React compile by default to esm, so uses type module\n // return this.getEsmPackageJsonProps();\n return this.getCjsPackageJsonProps();\n }\n\n /**\n * Get the default package.json props for a cjs component\n * @returns\n */\n getCjsPackageJsonProps(): PackageJsonProps {\n return this.tsAspect.getCjsPackageJsonProps();\n }\n\n /**\n * Get the default package.json props for an esm component\n * @returns\n */\n getEsmPackageJsonProps(): PackageJsonProps {\n return this.tsAspect.getEsmPackageJsonProps();\n }\n\n getNpmIgnore() {\n // ignores only .ts files in the root directory, so d.ts files inside dists are unaffected.\n // without this change, the package has \"index.ts\" file in the root, causing typescript to parse it instead of the\n // d.ts files. (changing the \"types\" prop in the package.json file doesn't help).\n return [`${CAPSULE_ARTIFACTS_DIR}/`];\n }\n\n /**\n * adds dependencies to all configured components.\n */\n getDependencies() {\n return {\n dependencies: {\n react: '-',\n 'react-dom': '-',\n 'core-js': '^3.0.0',\n },\n // TODO: add this only if using ts\n devDependencies: {\n react: '-',\n 'react-dom': '-',\n '@types/mocha': '-',\n '@types/node': '12.20.4',\n '@types/react': '^17.0.8',\n '@types/react-dom': '^17.0.5',\n '@types/jest': '^26.0.0',\n // This is added as dev dep since our jest file transformer uses babel plugins that require this to be installed\n '@babel/runtime': '7.12.18',\n '@types/testing-library__jest-dom': '5.9.5',\n },\n peerDependencies: {\n react: '^16.8.0 || ^17.0.0',\n 'react-dom': '^16.8.0 || ^17.0.0',\n },\n };\n }\n\n /**\n * returns the component build pipeline.\n */\n getBuildPipe(modifiers: GetBuildPipeModifiers = {}): BuildTask[] {\n const transformers: TsConfigTransformer[] =\n (modifiers?.tsModifier?.transformers as any as TsConfigTransformer[]) || [];\n return [this.getCompilerTask(transformers, modifiers?.tsModifier?.module || ts), this.tester.task];\n }\n\n /**\n * Get the react build pipeline without the compilation task.\n * This help in cases you want to only replace the compilation task with something else\n * @returns\n */\n getBuildPipeWithoutCompiler(): BuildTask[] {\n const pipeWithoutCompiler = this.getBuildPipe().filter((task) => task.aspectId !== this.compilerAspectId);\n return pipeWithoutCompiler;\n }\n\n /**\n * Get a compiler task with react config and set to esm module\n * @param transformers\n * @param tsModule\n * @returns\n */\n getEsmCompilerTask(transformers: TsConfigTransformer[] = [], tsModule = ts) {\n const tsCompiler = this.getTsEsmCompiler('build', transformers, tsModule);\n return this.compiler.createTask('TSCompiler', tsCompiler);\n }\n\n /**\n * Get a compiler task with react config and set to cjs module\n * @param transformers\n * @param tsModule\n * @returns\n */\n getCjsCompilerTask(transformers: TsConfigTransformer[] = [], tsModule = ts) {\n const tsCompiler = this.getTsCjsCompiler('build', transformers, tsModule);\n return this.compiler.createTask('TSCompiler', tsCompiler);\n }\n\n private getCompilerTask(transformers: TsConfigTransformer[] = [], tsModule = ts) {\n return this.getCjsCompilerTask(transformers, tsModule);\n }\n\n async __getD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EAA2CC,QAAQ,GAAGC,qBAAtD,EAA0D;IAC/E,OAAO,KAAKoG,kBAAL,CAAwBtG,YAAxB,EAAsCC,QAAtC,CAAP;EACD;;EAEoB,MAAfsG,eAAe,GAAG;IACtB,OAAO;MACLC,IAAI,EAAEtJ;IADD,CAAP;EAGD;;AA1ZH"}
|
|
1
|
+
{"version":3,"names":["ReactEnvType","defaultTsConfig","require","buildTsConfig","eslintConfig","prettierConfig","ReactEnv","constructor","jestAspect","tsAspect","compiler","webpack","workspace","pkg","tester","config","eslint","prettier","dependencyResolver","logger","compilerAspectId","getTsConfig","targetTsConfig","merge","getBuildTsConfig","getCjsJestTester","jestConfigPath","jestModulePath","pathToSource","pathNormalizeToLinux","__dirname","replace","defaultConfig","join","createTester","resolve","getEsmJestTester","getTester","getTsCompilerOptions","mode","tsconfig","cloneDeep","compileJs","compileJsx","types","getTsCjsCompiler","transformers","tsModule","ts","tsCompileOptions","createCjsCompiler","getTsEsmCompiler","createEsmCompiler","getCompiler","getLinter","context","defaultTransformer","configMutator","addExtensionTypes","allTransformers","createLinter","pluginPath","getFormatter","createFormatter","getFileMap","components","local","reduce","index","component","state","filesystem","files","forEach","file","path","id","toString","homepage","fullName","ComponentUrl","toUrl","writeFileMap","fileMap","tmpdir","Math","random","slice","outputFileSync","JSON","stringify","getDevEnvId","ReactAspect","getSchemaExtractor","createSchemaExtractor","getDevServer","baseConfig","basePreviewConfigFactory","envDevConfig","envPreviewDevConfigFactory","componentDevConfig","componentPreviewDevConfigFactory","merged","createDevServer","getBundler","createComponentsWebpackBundler","development","baseProdConfig","basePreviewProdConfigFactory","componentProdConfig","componentPreviewProdConfigFactory","mergedTransformers","createWebpackBundler","createTemplateWebpackBundler","templateConfig","templateWebpackConfigFactory","createBundler","getPeerDependenciesList","getPeerDependenciesListFromEnv","getAdditionalHostDependencies","getDocsTemplate","getMounter","getPreviewConfig","strategyName","splitComponentBundle","getPackageJsonProps","getCjsPackageJsonProps","getEsmPackageJsonProps","getNpmIgnore","CAPSULE_ARTIFACTS_DIR","getDependencies","dependencies","react","devDependencies","peerDependencies","getBuildPipe","modifiers","tsModifier","getCompilerTask","module","task","getBuildPipeWithoutCompiler","pipeWithoutCompiler","filter","aspectId","getEsmCompilerTask","tsCompiler","createTask","getCjsCompilerTask","__getDescriptor","type"],"sources":["react.env.ts"],"sourcesContent":["import ts, { TsConfigSourceFile } from 'typescript';\nimport { tmpdir } from 'os';\nimport { Component } from '@teambit/component';\nimport { ComponentUrl } from '@teambit/component.modules.component-url';\nimport { BuildTask, CAPSULE_ARTIFACTS_DIR } from '@teambit/builder';\nimport { merge, cloneDeep } from 'lodash';\nimport { Bundler, BundlerContext, DevServer, DevServerContext } from '@teambit/bundler';\nimport { CompilerMain } from '@teambit/compiler';\nimport {\n BuilderEnv,\n CompilerEnv,\n DependenciesEnv,\n DevEnv,\n LinterEnv,\n PackageEnv,\n TesterEnv,\n FormatterEnv,\n PipeServiceModifier,\n PipeServiceModifiersMap,\n} from '@teambit/envs';\nimport { JestMain } from '@teambit/jest';\nimport { PackageJsonProps, PkgMain } from '@teambit/pkg';\nimport { Tester, TesterMain } from '@teambit/tester';\nimport { TsConfigTransformer, TypescriptMain } from '@teambit/typescript';\nimport type { TypeScriptCompilerOptions } from '@teambit/typescript';\nimport { WebpackConfigTransformer, WebpackMain } from '@teambit/webpack';\nimport { Workspace } from '@teambit/workspace';\nimport { ESLintMain, EslintConfigTransformer } from '@teambit/eslint';\nimport { PrettierConfigTransformer, PrettierMain } from '@teambit/prettier';\nimport { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { Linter, LinterContext } from '@teambit/linter';\nimport { Formatter, FormatterContext } from '@teambit/formatter';\nimport { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';\nimport type { ComponentMeta } from '@teambit/react.ui.highlighter.component-metadata.bit-component-meta';\nimport { SchemaExtractor } from '@teambit/schema';\nimport { join, resolve } from 'path';\nimport { outputFileSync } from 'fs-extra';\nimport { Logger } from '@teambit/logger';\n// ensure reactEnv depends on compositions-app\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { CompositionsApp } from '@teambit/react.ui.compositions-app';\n// ensure reactEnv depends on docs-app\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport DocsApps from '@teambit/react.ui.docs-app';\nimport type { ReactMainConfig } from './react.main.runtime';\nimport { ReactAspect } from './react.aspect';\n// webpack configs for both components and envs\nimport basePreviewConfigFactory from './webpack/webpack.config.base';\nimport basePreviewProdConfigFactory from './webpack/webpack.config.base.prod';\n\n// webpack configs for envs only\n// import devPreviewConfigFactory from './webpack/webpack.config.preview.dev';\nimport envPreviewDevConfigFactory from './webpack/webpack.config.env.dev';\nimport { templateWebpackConfigFactory } from './webpack/webpack.config.env.template';\n\n// webpack configs for components only\nimport componentPreviewProdConfigFactory from './webpack/webpack.config.component.prod';\nimport componentPreviewDevConfigFactory from './webpack/webpack.config.component.dev';\n\nexport const ReactEnvType = 'react';\nconst defaultTsConfig = require('./typescript/tsconfig.json');\nconst buildTsConfig = require('./typescript/tsconfig.build.json');\nconst eslintConfig = require('./eslint/eslintrc');\nconst prettierConfig = require('./prettier/prettier.config.js');\n\n// TODO: move to be taken from the key mode of compiler context\ntype CompilerMode = 'build' | 'dev';\n\ntype GetBuildPipeModifiers = PipeServiceModifiersMap & {\n tsModifier?: PipeServiceModifier;\n};\n\n/**\n * a component environment built for [React](https://reactjs.org) .\n */\nexport class ReactEnv\n implements TesterEnv, CompilerEnv, LinterEnv, DevEnv, BuilderEnv, DependenciesEnv, PackageEnv, FormatterEnv\n{\n constructor(\n /**\n * jest extension\n */\n private jestAspect: JestMain,\n\n /**\n * typescript extension.\n */\n protected tsAspect: TypescriptMain,\n\n /**\n * compiler extension.\n */\n private compiler: CompilerMain,\n\n /**\n * webpack extension.\n */\n private webpack: WebpackMain,\n\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * pkg extension.\n */\n private pkg: PkgMain,\n\n /**\n * tester extension\n */\n private tester: TesterMain,\n\n private config: ReactMainConfig,\n\n private eslint: ESLintMain,\n\n private prettier: PrettierMain,\n\n private dependencyResolver: DependencyResolverMain,\n\n private logger: Logger,\n\n private compilerAspectId: string\n ) {}\n\n getTsConfig(targetTsConfig?: TsConfigSourceFile): TsConfigSourceFile {\n return targetTsConfig ? merge({}, defaultTsConfig, targetTsConfig) : defaultTsConfig;\n }\n\n getBuildTsConfig(targetTsConfig?: TsConfigSourceFile): TsConfigSourceFile {\n return targetTsConfig ? merge({}, buildTsConfig, targetTsConfig) : buildTsConfig;\n }\n\n /**\n * Get a jest tester instance with react config and cjs configs\n * @param jestConfigPath\n * @param jestModulePath\n * @returns\n */\n getCjsJestTester(jestConfigPath?: string, jestModulePath?: string): Tester {\n const pathToSource = pathNormalizeToLinux(__dirname).replace('/dist', '');\n const defaultConfig = join(pathToSource, './jest/jest.cjs.config.js');\n const config = jestConfigPath || defaultConfig;\n return this.jestAspect.createTester(config, jestModulePath || require.resolve('jest'));\n }\n\n /**\n * Get a jest tester instance with react config and esm configs\n * @param jestConfigPath\n * @param jestModulePath\n * @returns\n */\n getEsmJestTester(jestConfigPath?: string, jestModulePath?: string): Tester {\n const pathToSource = pathNormalizeToLinux(__dirname).replace('/dist', '');\n const defaultConfig = join(pathToSource, './jest/jest.esm.config.js');\n const config = jestConfigPath || defaultConfig;\n return this.jestAspect.createTester(config, jestModulePath || require.resolve('jest'));\n }\n\n /**\n * returns a component tester.\n */\n getTester(jestConfigPath: string, jestModulePath?: string): Tester {\n // return this.getEsmJestTester(jestConfigPath, jestModulePath);\n return this.getCjsJestTester(jestConfigPath, jestModulePath);\n }\n\n private getTsCompilerOptions(mode: CompilerMode = 'dev'): TypeScriptCompilerOptions {\n const tsconfig = mode === 'dev' ? cloneDeep(defaultTsConfig) : cloneDeep(buildTsConfig);\n const pathToSource = pathNormalizeToLinux(__dirname).replace('/dist/', '/src/');\n const compileJs = true;\n const compileJsx = true;\n return {\n tsconfig,\n // TODO: @david please remove this line and refactor to be something that makes sense.\n types: [resolve(pathToSource, './typescript/style.d.ts'), resolve(pathToSource, './typescript/asset.d.ts')],\n compileJs,\n compileJsx,\n };\n }\n\n /**\n * Get a compiler instance with react config and set it to cjs module\n * @param mode\n * @param transformers\n * @param tsModule\n * @returns\n */\n getTsCjsCompiler(mode: CompilerMode = 'dev', transformers: TsConfigTransformer[] = [], tsModule = ts) {\n const tsCompileOptions = this.getTsCompilerOptions(mode);\n return this.tsAspect.createCjsCompiler(tsCompileOptions, transformers, tsModule);\n }\n\n /**\n * Get a compiler instance with react config and set it to esm module\n * @param mode\n * @param transformers\n * @param tsModule\n * @returns\n */\n getTsEsmCompiler(mode: CompilerMode = 'dev', transformers: TsConfigTransformer[] = [], tsModule = ts) {\n const tsCompileOptions = this.getTsCompilerOptions(mode);\n return this.tsAspect.createEsmCompiler(tsCompileOptions, transformers, tsModule);\n }\n\n getCompiler(transformers: TsConfigTransformer[] = [], tsModule = ts) {\n // return this.getTsEsmCompiler('dev', transformers, tsModule);\n return this.getTsCjsCompiler('dev', transformers, tsModule);\n }\n\n /**\n * returns and configures the component linter.\n */\n getLinter(context: LinterContext, transformers: EslintConfigTransformer[] = []): Linter {\n const defaultTransformer: EslintConfigTransformer = (configMutator) => {\n configMutator.addExtensionTypes(['.md', '.mdx']);\n return configMutator;\n };\n\n const allTransformers = [defaultTransformer, ...transformers];\n\n return this.eslint.createLinter(\n context,\n {\n config: eslintConfig,\n // resolve all plugins from the react environment.\n pluginPath: __dirname,\n },\n allTransformers\n );\n }\n\n /**\n * returns and configures the component formatter.\n */\n getFormatter(context: FormatterContext, transformers: PrettierConfigTransformer[] = []): Formatter {\n return this.prettier.createFormatter(\n context,\n {\n config: prettierConfig,\n },\n transformers\n );\n }\n\n private getFileMap(components: Component[], local = false) {\n return components.reduce<{ [key: string]: ComponentMeta }>((index, component: Component) => {\n component.state.filesystem.files.forEach((file) => {\n index[file.path] = {\n id: component.id.toString(),\n homepage: local ? `/${component.id.fullName}` : ComponentUrl.toUrl(component.id),\n };\n });\n\n return index;\n }, {});\n }\n\n private writeFileMap(components: Component[], local?: boolean) {\n const fileMap = this.getFileMap(components, local);\n const path = join(tmpdir(), `${Math.random().toString(36).slice(2, 11)}.json`);\n outputFileSync(path, JSON.stringify(fileMap));\n return path;\n }\n\n /**\n * required for `bit start`\n */\n getDevEnvId(id?: string) {\n if (typeof id !== 'string') return ReactAspect.id;\n return id || ReactAspect.id;\n }\n\n /**\n * get a schema generator instance configured with the correct tsconfig.\n */\n getSchemaExtractor(tsconfig: TsConfigSourceFile): SchemaExtractor {\n return this.tsAspect.createSchemaExtractor(this.getTsConfig(tsconfig));\n }\n\n /**\n * returns and configures the React component dev server.\n * required for `bit start`\n */\n getDevServer(context: DevServerContext, transformers: WebpackConfigTransformer[] = []): DevServer {\n const baseConfig = basePreviewConfigFactory(false);\n const envDevConfig = envPreviewDevConfigFactory(context.id);\n const componentDevConfig = componentPreviewDevConfigFactory(this.workspace.path, context.id);\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const merged = configMutator.merge([baseConfig, envDevConfig, componentDevConfig]);\n return merged;\n };\n\n return this.webpack.createDevServer(context, [defaultTransformer, ...transformers]);\n }\n\n async getBundler(context: BundlerContext, transformers: WebpackConfigTransformer[] = []): Promise<Bundler> {\n return this.createComponentsWebpackBundler(context, transformers);\n }\n\n async createComponentsWebpackBundler(\n context: BundlerContext,\n transformers: WebpackConfigTransformer[] = []\n ): Promise<Bundler> {\n const baseConfig = basePreviewConfigFactory(!context.development);\n const baseProdConfig = basePreviewProdConfigFactory(context.development);\n const componentProdConfig = componentPreviewProdConfigFactory();\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const merged = configMutator.merge([baseConfig, baseProdConfig, componentProdConfig]);\n return merged;\n };\n const mergedTransformers = [defaultTransformer, ...transformers];\n return this.createWebpackBundler(context, mergedTransformers);\n }\n\n async createTemplateWebpackBundler(\n context: BundlerContext,\n transformers: WebpackConfigTransformer[] = []\n ): Promise<Bundler> {\n const baseConfig = basePreviewConfigFactory(!context.development);\n const baseProdConfig = basePreviewProdConfigFactory(context.development);\n const templateConfig = templateWebpackConfigFactory();\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const merged = configMutator.merge([baseConfig, baseProdConfig, templateConfig]);\n return merged;\n };\n const mergedTransformers = [defaultTransformer, ...transformers];\n return this.createWebpackBundler(context, mergedTransformers);\n }\n\n private async createWebpackBundler(\n context: BundlerContext,\n transformers: WebpackConfigTransformer[] = []\n ): Promise<Bundler> {\n return this.webpack.createBundler(context, transformers);\n }\n\n /**\n * Get the peers configured by the env on the components + the host deps configured by the env\n */\n getPeerDependenciesList() {\n return this.dependencyResolver.getPeerDependenciesListFromEnv(this);\n }\n\n getAdditionalHostDependencies(): string[] {\n return ['@teambit/mdx.ui.mdx-scope-context', '@mdx-js/react', 'react'];\n }\n\n /**\n * returns a path to a docs template.\n */\n getDocsTemplate() {\n return require.resolve('@teambit/react.ui.docs-app');\n }\n\n icon = 'https://static.bit.dev/extensions-icons/react.svg';\n\n /**\n * returns the path to the compositions template\n */\n getMounter() {\n return require.resolve('@teambit/react.ui.compositions-app');\n }\n\n getPreviewConfig() {\n return {\n strategyName: 'component',\n splitComponentBundle: true,\n };\n }\n\n /**\n * define the package json properties to add to each component.\n */\n getPackageJsonProps(): PackageJsonProps {\n // React compile by default to esm, so uses type module\n // return this.getEsmPackageJsonProps();\n return this.getCjsPackageJsonProps();\n }\n\n /**\n * Get the default package.json props for a cjs component\n * @returns\n */\n getCjsPackageJsonProps(): PackageJsonProps {\n return this.tsAspect.getCjsPackageJsonProps();\n }\n\n /**\n * Get the default package.json props for an esm component\n * @returns\n */\n getEsmPackageJsonProps(): PackageJsonProps {\n return this.tsAspect.getEsmPackageJsonProps();\n }\n\n getNpmIgnore() {\n // ignores only .ts files in the root directory, so d.ts files inside dists are unaffected.\n // without this change, the package has \"index.ts\" file in the root, causing typescript to parse it instead of the\n // d.ts files. (changing the \"types\" prop in the package.json file doesn't help).\n return [`${CAPSULE_ARTIFACTS_DIR}/`];\n }\n\n /**\n * adds dependencies to all configured components.\n */\n getDependencies() {\n return {\n dependencies: {\n react: '-',\n 'react-dom': '-',\n 'core-js': '^3.0.0',\n },\n // TODO: add this only if using ts\n devDependencies: {\n react: '-',\n 'react-dom': '-',\n '@types/mocha': '-',\n '@types/node': '12.20.4',\n '@types/react': '^17.0.8',\n '@types/react-dom': '^17.0.5',\n '@types/jest': '^26.0.0',\n // This is added as dev dep since our jest file transformer uses babel plugins that require this to be installed\n '@babel/runtime': '7.12.18',\n '@types/testing-library__jest-dom': '5.9.5',\n },\n peerDependencies: {\n react: '^16.8.0 || ^17.0.0',\n 'react-dom': '^16.8.0 || ^17.0.0',\n },\n };\n }\n\n /**\n * returns the component build pipeline.\n */\n getBuildPipe(modifiers: GetBuildPipeModifiers = {}): BuildTask[] {\n const transformers: TsConfigTransformer[] =\n (modifiers?.tsModifier?.transformers as any as TsConfigTransformer[]) || [];\n return [this.getCompilerTask(transformers, modifiers?.tsModifier?.module || ts), this.tester.task];\n }\n\n /**\n * Get the react build pipeline without the compilation task.\n * This help in cases you want to only replace the compilation task with something else\n * @returns\n */\n getBuildPipeWithoutCompiler(): BuildTask[] {\n const pipeWithoutCompiler = this.getBuildPipe().filter((task) => task.aspectId !== this.compilerAspectId);\n return pipeWithoutCompiler;\n }\n\n /**\n * Get a compiler task with react config and set to esm module\n * @param transformers\n * @param tsModule\n * @returns\n */\n getEsmCompilerTask(transformers: TsConfigTransformer[] = [], tsModule = ts) {\n const tsCompiler = this.getTsEsmCompiler('build', transformers, tsModule);\n return this.compiler.createTask('TSCompiler', tsCompiler);\n }\n\n /**\n * Get a compiler task with react config and set to cjs module\n * @param transformers\n * @param tsModule\n * @returns\n */\n getCjsCompilerTask(transformers: TsConfigTransformer[] = [], tsModule = ts) {\n const tsCompiler = this.getTsCjsCompiler('build', transformers, tsModule);\n return this.compiler.createTask('TSCompiler', tsCompiler);\n }\n\n private getCompilerTask(transformers: TsConfigTransformer[] = [], tsModule = ts) {\n return this.getCjsCompilerTask(transformers, tsModule);\n }\n\n async __getDescriptor() {\n return {\n type: ReactEnvType,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AA2BA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AASA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAXA;AAIA;AACA;AAIA;AAIO,MAAMA,YAAY,GAAG,OAArB;;;AACP,MAAMC,eAAe,GAAGC,OAAO,CAAC,4BAAD,CAA/B;;AACA,MAAMC,aAAa,GAAGD,OAAO,CAAC,kCAAD,CAA7B;;AACA,MAAME,YAAY,GAAGF,OAAO,CAAC,mBAAD,CAA5B;;AACA,MAAMG,cAAc,GAAGH,OAAO,CAAC,+BAAD,CAA9B,C,CAEA;;;AAOA;AACA;AACA;AACO,MAAMI,QAAN,CAEP;EACEC,WAAW;EACT;AACJ;AACA;EACYC,UAJC;EAMT;AACJ;AACA;EACcC,QATD;EAWT;AACJ;AACA;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B,EAAuCD,UAAvC,CAAP;EACD;;EAEOR,eAAe,CAAC5F,YAAmC,GAAG,EAAvC,EAA2CC,QAAQ,GAAGC,qBAAtD,EAA0D;IAC/E,OAAO,KAAKoG,kBAAL,CAAwBtG,YAAxB,EAAsCC,QAAtC,CAAP;EACD;;EAEoB,MAAfsG,eAAe,GAAG;IACtB,OAAO;MACLC,IAAI,EAAEtJ;IADD,CAAP;EAGD;;AA1ZH"}
|
|
File without changes
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.785",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/react/react",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.react",
|
|
8
8
|
"name": "react",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.785"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
@@ -79,35 +79,37 @@
|
|
|
79
79
|
"@teambit/react.instructions.react.adding-tests": "0.0.6",
|
|
80
80
|
"@teambit/compositions.ui.hooks.use-composition": "0.0.163",
|
|
81
81
|
"@teambit/design.ui.tooltip": "0.0.352",
|
|
82
|
-
"@teambit/builder": "0.0.
|
|
83
|
-
"@teambit/bundler": "0.0.
|
|
84
|
-
"@teambit/compiler": "0.0.
|
|
82
|
+
"@teambit/builder": "0.0.785",
|
|
83
|
+
"@teambit/bundler": "0.0.785",
|
|
84
|
+
"@teambit/compiler": "0.0.785",
|
|
85
85
|
"@teambit/component.modules.component-url": "0.0.125",
|
|
86
|
-
"@teambit/component": "0.0.
|
|
87
|
-
"@teambit/dependency-resolver": "0.0.
|
|
88
|
-
"@teambit/envs": "0.0.
|
|
89
|
-
"@teambit/eslint": "0.0.
|
|
90
|
-
"@teambit/formatter": "0.0.
|
|
91
|
-
"@teambit/jest": "0.0.
|
|
92
|
-
"@teambit/linter": "0.0.
|
|
93
|
-
"@teambit/logger": "0.0.
|
|
94
|
-
"@teambit/pkg": "0.0.
|
|
95
|
-
"@teambit/prettier": "0.0.
|
|
86
|
+
"@teambit/component": "0.0.785",
|
|
87
|
+
"@teambit/dependency-resolver": "0.0.785",
|
|
88
|
+
"@teambit/envs": "0.0.785",
|
|
89
|
+
"@teambit/eslint": "0.0.785",
|
|
90
|
+
"@teambit/formatter": "0.0.336",
|
|
91
|
+
"@teambit/jest": "0.0.785",
|
|
92
|
+
"@teambit/linter": "0.0.785",
|
|
93
|
+
"@teambit/logger": "0.0.612",
|
|
94
|
+
"@teambit/pkg": "0.0.785",
|
|
95
|
+
"@teambit/prettier": "0.0.336",
|
|
96
|
+
"@teambit/react.ui.compositions-app": "0.0.1",
|
|
97
|
+
"@teambit/react.ui.docs-app": "0.0.179",
|
|
96
98
|
"@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.21",
|
|
97
|
-
"@teambit/schema": "0.0.
|
|
98
|
-
"@teambit/tester": "0.0.
|
|
99
|
-
"@teambit/typescript": "0.0.
|
|
100
|
-
"@teambit/webpack": "0.0.
|
|
101
|
-
"@teambit/workspace": "0.0.
|
|
102
|
-
"@teambit/application": "0.0.
|
|
103
|
-
"@teambit/cli": "0.0.
|
|
104
|
-
"@teambit/generator": "0.0.
|
|
105
|
-
"@teambit/graphql": "0.0.
|
|
106
|
-
"@teambit/preview": "0.0.
|
|
99
|
+
"@teambit/schema": "0.0.785",
|
|
100
|
+
"@teambit/tester": "0.0.785",
|
|
101
|
+
"@teambit/typescript": "0.0.785",
|
|
102
|
+
"@teambit/webpack": "0.0.785",
|
|
103
|
+
"@teambit/workspace": "0.0.785",
|
|
104
|
+
"@teambit/application": "0.0.427",
|
|
105
|
+
"@teambit/cli": "0.0.519",
|
|
106
|
+
"@teambit/generator": "0.0.785",
|
|
107
|
+
"@teambit/graphql": "0.0.785",
|
|
108
|
+
"@teambit/preview": "0.0.785",
|
|
107
109
|
"@teambit/react.ui.highlighter-provider": "0.0.189",
|
|
108
|
-
"@teambit/compositions": "0.0.
|
|
109
|
-
"@teambit/ui": "0.0.
|
|
110
|
-
"@teambit/react.eslint-config-bit-react": "0.0.
|
|
110
|
+
"@teambit/compositions": "0.0.785",
|
|
111
|
+
"@teambit/ui": "0.0.785",
|
|
112
|
+
"@teambit/react.eslint-config-bit-react": "0.0.593",
|
|
111
113
|
"@teambit/mdx.modules.mdx-loader": "0.0.490",
|
|
112
114
|
"@teambit/react.babel.bit-react-transformer": "0.0.501",
|
|
113
115
|
"@teambit/webpack.modules.generate-style-loaders": "0.0.103",
|
|
@@ -115,7 +117,7 @@
|
|
|
115
117
|
"@teambit/component-id": "0.0.402",
|
|
116
118
|
"@teambit/toolbox.network.get-port": "0.0.113",
|
|
117
119
|
"@teambit/react.modules.prerenderer-puppeteer": "0.0.2",
|
|
118
|
-
"@teambit/config": "0.0.
|
|
120
|
+
"@teambit/config": "0.0.532"
|
|
119
121
|
},
|
|
120
122
|
"devDependencies": {
|
|
121
123
|
"@types/react": "^17.0.8",
|
|
@@ -134,76 +136,11 @@
|
|
|
134
136
|
"@teambit/react.content.react-overview": "1.95.0"
|
|
135
137
|
},
|
|
136
138
|
"peerDependencies": {
|
|
137
|
-
"@teambit/legacy": "1.0.
|
|
139
|
+
"@teambit/legacy": "1.0.300",
|
|
138
140
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
139
141
|
"react": "^16.8.0 || ^17.0.0"
|
|
140
142
|
},
|
|
141
143
|
"license": "Apache-2.0",
|
|
142
|
-
"bit": {
|
|
143
|
-
"bindingPrefix": "@teambit",
|
|
144
|
-
"env": {},
|
|
145
|
-
"overrides": {
|
|
146
|
-
"dependencies": {
|
|
147
|
-
"react-refresh": "0.10.0",
|
|
148
|
-
"@babel/runtime": "^7.12.18",
|
|
149
|
-
"@teambit/legacy": "-",
|
|
150
|
-
"less-loader": "10.0.0",
|
|
151
|
-
"less": "^4.1.1",
|
|
152
|
-
"sass-loader": "12.1.0",
|
|
153
|
-
"sanitize.css": "12.0.1",
|
|
154
|
-
"postcss-flexbugs-fixes": "5.0.2",
|
|
155
|
-
"postcss-preset-env": "6.7.0",
|
|
156
|
-
"postcss-normalize": "10.0.0",
|
|
157
|
-
"postcss-loader": "6.1.1",
|
|
158
|
-
"postcss": "8.2.9",
|
|
159
|
-
"css-loader": "6.2.0",
|
|
160
|
-
"style-loader": "^2.0.0",
|
|
161
|
-
"babel-preset-react-app": "^10.0.0",
|
|
162
|
-
"babel-loader": "8.2.2",
|
|
163
|
-
"babel-plugin-named-asset-import": "0.3.7",
|
|
164
|
-
"jest-watch-typeahead": "1.0.0",
|
|
165
|
-
"identity-obj-proxy": "3.0.0",
|
|
166
|
-
"jest-environment-jsdom": "27.5.1",
|
|
167
|
-
"@mdx-js/react": "1.6.22",
|
|
168
|
-
"resolve-url-loader": "3.1.2",
|
|
169
|
-
"react-app-polyfill": "1.0.6",
|
|
170
|
-
"new-url-loader": "0.1.1",
|
|
171
|
-
"eslint-plugin-mdx": "1.13.0",
|
|
172
|
-
"eslint-plugin-jsx-a11y": "6.4.1",
|
|
173
|
-
"eslint-plugin-react": "7.22.0",
|
|
174
|
-
"eslint-plugin-react-hooks": "4.2.0",
|
|
175
|
-
"eslint-plugin-import": "2.22.1",
|
|
176
|
-
"eslint-plugin-jest": "24.1.5",
|
|
177
|
-
"esbuild": "0.14.28",
|
|
178
|
-
"@typescript-eslint/eslint-plugin": "4.30.0",
|
|
179
|
-
"@typescript-eslint/parser": "4.30.0",
|
|
180
|
-
"@babel/preset-react": "7.13.13",
|
|
181
|
-
"@babel/preset-env": "7.12.17",
|
|
182
|
-
"@babel/helper-plugin-test-runner": "7.16.7",
|
|
183
|
-
"@svgr/webpack": "5.5.0",
|
|
184
|
-
"react-dom": "-",
|
|
185
|
-
"react": "-",
|
|
186
|
-
"core-js": "^3.0.0"
|
|
187
|
-
},
|
|
188
|
-
"devDependencies": {
|
|
189
|
-
"@types/react-dom": "^17.0.5",
|
|
190
|
-
"@types/react": "^17.0.8",
|
|
191
|
-
"@types/postcss-normalize": "9.0.1",
|
|
192
|
-
"@types/node": "12.20.4",
|
|
193
|
-
"@types/mocha": "9.1.0",
|
|
194
|
-
"@teambit/legacy": "-",
|
|
195
|
-
"react-dom": "-",
|
|
196
|
-
"react": "-",
|
|
197
|
-
"@types/testing-library__jest-dom": "5.9.5",
|
|
198
|
-
"@types/jest": "^26.0.0"
|
|
199
|
-
},
|
|
200
|
-
"peerDependencies": {
|
|
201
|
-
"@teambit/legacy": "1.0.299",
|
|
202
|
-
"react-dom": "^16.8.0 || ^17.0.0",
|
|
203
|
-
"react": "^16.8.0 || ^17.0.0"
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
144
|
"private": false,
|
|
208
145
|
"engines": {
|
|
209
146
|
"node": ">=12.22.0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.785/dist/react.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.785/dist/react.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var __webpack_modules__={7497:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__2)=>{var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache,react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache,react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(67294),react_dom__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(73935),_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(38168),_mdx_js_react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(3905);const globalObj=window;guard("React",react__WEBPACK_IMPORTED_MODULE_0___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_0__,2))),guard("ReactDom",react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_1__,2))),guard("TeambitMdxUiMdxScopeContext",_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__),guard("MdxJsReact",_mdx_js_react__WEBPACK_IMPORTED_MODULE_3__),globalObj.React=react__WEBPACK_IMPORTED_MODULE_0___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_0__,2)),globalObj.ReactDom=react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_1___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_1__,2)),globalObj.TeambitMdxUiMdxScopeContext=_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__,globalObj.MdxJsReact=_mdx_js_react__WEBPACK_IMPORTED_MODULE_3__;function guard(property,expected){var existing=globalObj[property];if(existing===expected&&expected!==void 0)console.warn('[expose-peers] "'+property+'" already exists in global scope, but with correct value');else if(existing!==void 0)throw new Error('[expose-peers] "'+property+'" already exists in the global scope, cannot overwrite')}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(priority&!1||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();r!==void 0&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,leafPrototypes;__webpack_require__.t=function(value,mode){if(mode&1&&(value=this(value)),mode&8||typeof value=="object"&&value&&(mode&4&&value.__esModule||mode&16&&typeof value.then=="function"))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=mode&2&&value;typeof current=="object"&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.hmd=module=>(module=Object.create(module),module.children||(module.children=[]),Object.defineProperty(module,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+module.id)}}),module),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),(()=>{var installedChunks={703:0};__webpack_require__.O.j=chunkId=>installedChunks[chunkId]===0;var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var[chunkIds,moreModules,runtime]=data,moduleId,chunkId,i=0;if(chunkIds.some(id=>installedChunks[id]!==0)){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkIds[i]]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})();var __webpack_exports__=__webpack_require__.O(void 0,[244],()=>__webpack_require__(7497));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();
|