@teambit/dev-files 1.0.309 → 1.0.311
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites tests="3" failures="0" errors="0" skipped="0">
|
3
|
-
<testsuite name="teambit.component/dev-files@1.0.
|
4
|
-
<testcase classname="dist/dev-files.spec.js" name="get all dev files of the docs aspect"
|
3
|
+
<testsuite name="teambit.component/dev-files@1.0.311" tests="3" failures="0" errors="0" skipped="0">
|
4
|
+
<testcase classname="dist/dev-files.spec.js" name="get all dev files of the docs aspect"/>
|
5
5
|
<testcase classname="dist/dev-files.spec.js" name="should get undefined as there are no files for aspect id"/>
|
6
6
|
<testcase classname="dist/dev-files.spec.js" name="should list all dev files"/>
|
7
7
|
</testsuite>
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["teambit.component/dev-files-preview"]=n():e["teambit.component/dev-files-preview"]=n()}(self,(()=>(()=>{"use strict";var e={49814:(e,n,t)=>{var o={id:"teambit.component/content/dev-files@1.95.9",homepage:"https://bit.dev/teambit/component/content/dev-files",exported:!0};Object.defineProperty(n,"__esModule",{value:!0}),n.default=u,s(t(41594));var r=t(5016),a=t(65682),i=["components"];function s(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},d.apply(this,arguments)}function p(e,n){if(null==e)return{};var t,o,r=l(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function l(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}s.__bit_component=o,d.__bit_component=o,p.__bit_component=o,l.__bit_component=o;var c={},m="wrapper";function u(e){var n=e.components,t=p(e,i);return(0,r.mdx)(m,d({},c,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("h1",null,"Dev Files"),(0,r.mdx)("p",null,"Dev files are component files used for development and not for production. Dev files are determined as such by the Dev Files Aspect."),(0,r.mdx)("p",null,"Categorizing files as dev files is especially useful in dependency resolution, as dependencies can be inferred to be of type ",(0,r.mdx)("inlineCode",{parentName:"p"},"devDependencies")," by looking at the type of files that use them (if 'package-a' is only used by the component's dev files, then it is a dev dependency of that component)."),(0,r.mdx)("p",null,"For example, the ",(0,r.mdx)("inlineCode",{parentName:"p"},"ui/card")," component has the following file structure:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"└── card\n ├── card.composition.tsx\n ├── card.docs.mdx\n ├── card.spec.tsx\n ├── card.tsx\n └── index.ts\n")),(0,r.mdx)("p",null,"To examine it:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"$ bit show ui/card\n\n┌───────────────────┬──────────────────────────────────────────────────────────┐\n│ id │ company.scope/ui/card │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ ... │ │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ files │ card.composition.tsx │\n│ │ card.docs.mdx │\n│ │ card.spec.tsx │\n│ │ card.stories.tsx │\n│ │ card.tsx │\n│ │ index.ts │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ dev files │ card.spec.tsx (teambit.defender/tester) │\n│ │ card.composition.tsx (teambit.compositions/compositions) │\n│ │ card.docs.mdx (teambit.docs/docs) │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ extensions │ ... │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ dependencies │ ... │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ dev dependencies │ @company/scope.envs.my-react@0.0.1----- (component) │\n│ │ @types/testing-library__jest-dom@5.9.5- (package) │\n│ │ @babel/runtime@7.12.18----------------- (package) │\n│ │ @types/jest@^26.0.0-------------------- (package) │\n│ │ @types/react-dom@^17.0.5--------------- (package) │\n│ │ @types/react@^17.0.8------------------- (package) │\n│ │ @types/node@12.20.4-------------------- (package) │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ peer dependencies │ ... │\n└───────────────────┴──────────────────────────────────────────────────────────┘\n")),(0,r.mdx)("p",null,"The component's compositions, documentation and test files are categorized as 'dev files'.\nTo the side of each listed dev file, you'll find the Aspect that registered it as such (via the Dev Files Aspect)."),(0,r.mdx)("p",null,"If, for example, ",(0,r.mdx)("inlineCode",{parentName:"p"},"@testing-library/react")," will be used by the test file, ",(0,r.mdx)("inlineCode",{parentName:"p"},"card.spec.tsx")," (and no other production file), it will be inferred as a dev dependency of that component."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-tsx"},"// card.spec.tsx\n\nimport React from 'react';\nimport { render } from '@testing-library/react';\nimport { BasicCard } from './card.composition';\n\nit('should render a Heading', () => {\n const { getByText } = render(<BasicCard />);\n const rendered = getByText('Self Host');\n expect(rendered).toBeTruthy();\n});\n")),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit show ui/card\n\n┌───────────────────┬──────────────────────────────────────────────────────────┐\n│ dev dependencies │ @company/scope.envs.my-react@0.0.1----- (component) │\n│ │ @types/testing-library__jest-dom@5.9.5- (package) │\n│ │ @babel/runtime@7.12.18----------------- (package) │\n│ │ @types/jest@^26.0.0-------------------- (package) │\n│ │ @types/react-dom@^17.0.5--------------- (package) │\n│ │ @types/react@^17.0.8------------------- (package) │\n│ │ @types/node@12.20.4-------------------- (package) │\n│ │ @testing-library/react@12.0.0---------- (package) │\n└───────────────────┴──────────────────────────────────────────────────────────┘\n")),(0,r.mdx)("h2",null,"Configuring Dev Files"),(0,r.mdx)("p",null,"Dev files are configured by setting glob patterns that match the files' names."),(0,r.mdx)("h3",null,"Setting Glob Patterns via ",(0,r.mdx)("inlineCode",{parentName:"h3"},"workspace.jsonc")),(0,r.mdx)("p",null,"Use the ",(0,r.mdx)("inlineCode",{parentName:"p"},"devFilePatterns")," property in ",(0,r.mdx)("inlineCode",{parentName:"p"},"teambit.component/dev-files")," to manually set a glob pattern for dev files."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.workspace/variants": {\n "{ui/**}": {\n "teambit.component/dev-files": {\n "devFilePatterns": ["**/*.story.+(js|ts|jsx|tsx)"]\n }\n }\n }\n}\n')),(0,r.mdx)("h3",null,"Setting Glob Patterns via the Dev Files API"),(0,r.mdx)("p",null,"Update your extension or create an new one to register glob patterns for dev files, using the Dev Files ",(0,r.mdx)("inlineCode",{parentName:"p"},"registerDevPattern")," API."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"bit create aspect extensions/my-dev-files\n")),(0,r.mdx)("h4",null,"registerDevPattern"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-ts"},"registerDevPattern: (pattern: string[]) : void\n")),(0,r.mdx)("p",null,"Use the ",(0,r.mdx)("inlineCode",{parentName:"p"},"registerDevPattern")," API to register an array of glob patterns."),(0,r.mdx)("p",null,"For example:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-ts"},"import { MainRuntime } from '@teambit/cli';\nimport { DevFilesAspect, DevFilesMain } from '@teambit/dev-files';\nimport { MyDevFilesAspect } from './my-dev-files.aspect';\n\nexport class MyDevFilesMain {\n constructor(private devFiles: DevFilesMain) {}\n\n static slots = [];\n\n static dependencies = [DevFilesAspect];\n\n static runtime = MainRuntime;\n\n static async provider([devFiles]: [DevFilesMain]) {\n devFiles.registerDevPattern(['**/*.my-dev.*']);\n\n return new MyDevFilesMain(devFiles);\n }\n}\n\nMyDevFilesAspect.addRuntime(MyDevFilesMain);\n")),(0,r.mdx)("p",null,"Configure the workspace config with that aspect to apply it on all components in the workspace:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-json"},'// workspace.jsonc\n{\n "company.scope/extensions/my-dev-files": {}\n}\n'))))}u.__bit_component=o,u.isMDXComponent=!0},25126:function(e,n,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.DevFiles=void 0;var r=t(49814);Object.defineProperty(n,"DevFiles",{enumerable:!0,get:function(){return o(r).default}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o(r).default}})},30358:(e,n,t)=>{var o={id:"teambit.component/dev-files@1.0.309",homepage:"https://bit.cloud/teambit/component/dev-files",exported:!0};function r(){const e=a(t(41594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0,r.__bit_component=o,a.__bit_component=o;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/dev-files.svg"}));i.__bit_component=o,n.Logo=i},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React},65682:e=>{e.exports=TeambitMdxUiMdxScopeContext}},n={};function t(o){var r=n[o];if(void 0!==r)return r.exports;var a=n[o]={exports:{}};return e[o].call(a.exports,a,a.exports,t),a.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{compositions:()=>v,compositions_metadata:()=>y,overview:()=>x});var r={};t.r(r),t.d(r,{default:()=>f});var a=t(30358),i=(t(41594),t(5016)),s=t(65682),d=t(25126),p=t.n(d),l=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},c.apply(null,arguments)}var m={},u="wrapper";function f(e){var n=e.components,t=function(e,n){if(null==e)return{};var t,o,r=function(e,n){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(n.indexOf(o)>=0)continue;t[o]=e[o]}return t}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l);return(0,i.mdx)(u,c({},m,t,{components:n,mdxType:"MDXLayout"}),(0,i.mdx)(s.MDXScopeProvider,{components:{DevFiles:p()},mdxType:"MDXScopeProvider"},(0,i.mdx)(p(),{mdxType:"DevFiles"})))}f.isMDXComponent=!0;const v=[a],x=[r],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return o})()));
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["teambit.component/dev-files-preview"]=n():e["teambit.component/dev-files-preview"]=n()}(self,(()=>(()=>{"use strict";var e={75149:(e,n,t)=>{var o={id:"teambit.component/content/dev-files@1.95.9",homepage:"https://bit.dev/teambit/component/content/dev-files",exported:!0};Object.defineProperty(n,"__esModule",{value:!0}),n.default=u,s(t(41594));var r=t(5016),a=t(65682),i=["components"];function s(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},d.apply(this,arguments)}function p(e,n){if(null==e)return{};var t,o,r=l(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function l(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}s.__bit_component=o,d.__bit_component=o,p.__bit_component=o,l.__bit_component=o;var c={},m="wrapper";function u(e){var n=e.components,t=p(e,i);return(0,r.mdx)(m,d({},c,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("h1",null,"Dev Files"),(0,r.mdx)("p",null,"Dev files are component files used for development and not for production. Dev files are determined as such by the Dev Files Aspect."),(0,r.mdx)("p",null,"Categorizing files as dev files is especially useful in dependency resolution, as dependencies can be inferred to be of type ",(0,r.mdx)("inlineCode",{parentName:"p"},"devDependencies")," by looking at the type of files that use them (if 'package-a' is only used by the component's dev files, then it is a dev dependency of that component)."),(0,r.mdx)("p",null,"For example, the ",(0,r.mdx)("inlineCode",{parentName:"p"},"ui/card")," component has the following file structure:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"└── card\n ├── card.composition.tsx\n ├── card.docs.mdx\n ├── card.spec.tsx\n ├── card.tsx\n └── index.ts\n")),(0,r.mdx)("p",null,"To examine it:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"$ bit show ui/card\n\n┌───────────────────┬──────────────────────────────────────────────────────────┐\n│ id │ company.scope/ui/card │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ ... │ │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ files │ card.composition.tsx │\n│ │ card.docs.mdx │\n│ │ card.spec.tsx │\n│ │ card.stories.tsx │\n│ │ card.tsx │\n│ │ index.ts │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ dev files │ card.spec.tsx (teambit.defender/tester) │\n│ │ card.composition.tsx (teambit.compositions/compositions) │\n│ │ card.docs.mdx (teambit.docs/docs) │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ extensions │ ... │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ dependencies │ ... │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ dev dependencies │ @company/scope.envs.my-react@0.0.1----- (component) │\n│ │ @types/testing-library__jest-dom@5.9.5- (package) │\n│ │ @babel/runtime@7.12.18----------------- (package) │\n│ │ @types/jest@^26.0.0-------------------- (package) │\n│ │ @types/react-dom@^17.0.5--------------- (package) │\n│ │ @types/react@^17.0.8------------------- (package) │\n│ │ @types/node@12.20.4-------------------- (package) │\n├───────────────────┼──────────────────────────────────────────────────────────┤\n│ peer dependencies │ ... │\n└───────────────────┴──────────────────────────────────────────────────────────┘\n")),(0,r.mdx)("p",null,"The component's compositions, documentation and test files are categorized as 'dev files'.\nTo the side of each listed dev file, you'll find the Aspect that registered it as such (via the Dev Files Aspect)."),(0,r.mdx)("p",null,"If, for example, ",(0,r.mdx)("inlineCode",{parentName:"p"},"@testing-library/react")," will be used by the test file, ",(0,r.mdx)("inlineCode",{parentName:"p"},"card.spec.tsx")," (and no other production file), it will be inferred as a dev dependency of that component."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-tsx"},"// card.spec.tsx\n\nimport React from 'react';\nimport { render } from '@testing-library/react';\nimport { BasicCard } from './card.composition';\n\nit('should render a Heading', () => {\n const { getByText } = render(<BasicCard />);\n const rendered = getByText('Self Host');\n expect(rendered).toBeTruthy();\n});\n")),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-bash"},"$ bit show ui/card\n\n┌───────────────────┬──────────────────────────────────────────────────────────┐\n│ dev dependencies │ @company/scope.envs.my-react@0.0.1----- (component) │\n│ │ @types/testing-library__jest-dom@5.9.5- (package) │\n│ │ @babel/runtime@7.12.18----------------- (package) │\n│ │ @types/jest@^26.0.0-------------------- (package) │\n│ │ @types/react-dom@^17.0.5--------------- (package) │\n│ │ @types/react@^17.0.8------------------- (package) │\n│ │ @types/node@12.20.4-------------------- (package) │\n│ │ @testing-library/react@12.0.0---------- (package) │\n└───────────────────┴──────────────────────────────────────────────────────────┘\n")),(0,r.mdx)("h2",null,"Configuring Dev Files"),(0,r.mdx)("p",null,"Dev files are configured by setting glob patterns that match the files' names."),(0,r.mdx)("h3",null,"Setting Glob Patterns via ",(0,r.mdx)("inlineCode",{parentName:"h3"},"workspace.jsonc")),(0,r.mdx)("p",null,"Use the ",(0,r.mdx)("inlineCode",{parentName:"p"},"devFilePatterns")," property in ",(0,r.mdx)("inlineCode",{parentName:"p"},"teambit.component/dev-files")," to manually set a glob pattern for dev files."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-json"},'{\n "teambit.workspace/variants": {\n "{ui/**}": {\n "teambit.component/dev-files": {\n "devFilePatterns": ["**/*.story.+(js|ts|jsx|tsx)"]\n }\n }\n }\n}\n')),(0,r.mdx)("h3",null,"Setting Glob Patterns via the Dev Files API"),(0,r.mdx)("p",null,"Update your extension or create an new one to register glob patterns for dev files, using the Dev Files ",(0,r.mdx)("inlineCode",{parentName:"p"},"registerDevPattern")," API."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"bit create aspect extensions/my-dev-files\n")),(0,r.mdx)("h4",null,"registerDevPattern"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-ts"},"registerDevPattern: (pattern: string[]) : void\n")),(0,r.mdx)("p",null,"Use the ",(0,r.mdx)("inlineCode",{parentName:"p"},"registerDevPattern")," API to register an array of glob patterns."),(0,r.mdx)("p",null,"For example:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-ts"},"import { MainRuntime } from '@teambit/cli';\nimport { DevFilesAspect, DevFilesMain } from '@teambit/dev-files';\nimport { MyDevFilesAspect } from './my-dev-files.aspect';\n\nexport class MyDevFilesMain {\n constructor(private devFiles: DevFilesMain) {}\n\n static slots = [];\n\n static dependencies = [DevFilesAspect];\n\n static runtime = MainRuntime;\n\n static async provider([devFiles]: [DevFilesMain]) {\n devFiles.registerDevPattern(['**/*.my-dev.*']);\n\n return new MyDevFilesMain(devFiles);\n }\n}\n\nMyDevFilesAspect.addRuntime(MyDevFilesMain);\n")),(0,r.mdx)("p",null,"Configure the workspace config with that aspect to apply it on all components in the workspace:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-json"},'// workspace.jsonc\n{\n "company.scope/extensions/my-dev-files": {}\n}\n'))))}u.__bit_component=o,u.isMDXComponent=!0},99433:function(e,n,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.DevFiles=void 0;var r=t(75149);Object.defineProperty(n,"DevFiles",{enumerable:!0,get:function(){return o(r).default}}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o(r).default}})},17176:(e,n,t)=>{var o={id:"teambit.component/dev-files@1.0.311",homepage:"https://bit.cloud/teambit/component/dev-files",exported:!0};function r(){const e=a(t(41594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0,r.__bit_component=o,a.__bit_component=o;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/dev-files.svg"}));i.__bit_component=o,n.Logo=i},5016:e=>{e.exports=MdxJsReact},41594:e=>{e.exports=React},65682:e=>{e.exports=TeambitMdxUiMdxScopeContext}},n={};function t(o){var r=n[o];if(void 0!==r)return r.exports;var a=n[o]={exports:{}};return e[o].call(a.exports,a,a.exports,t),a.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{compositions:()=>v,compositions_metadata:()=>y,overview:()=>x});var r={};t.r(r),t.d(r,{default:()=>f});var a=t(17176),i=(t(41594),t(5016)),s=t(65682),d=t(99433),p=t.n(d),l=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},c.apply(null,arguments)}var m={},u="wrapper";function f(e){var n=e.components,t=function(e,n){if(null==e)return{};var t,o,r=function(e,n){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(n.indexOf(o)>=0)continue;t[o]=e[o]}return t}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l);return(0,i.mdx)(u,c({},m,t,{components:n,mdxType:"MDXLayout"}),(0,i.mdx)(s.MDXScopeProvider,{components:{DevFiles:p()},mdxType:"MDXScopeProvider"},(0,i.mdx)(p(),{mdxType:"DevFiles"})))}f.isMDXComponent=!0;const v=[a],x=[r],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return o})()));
|
package/artifacts/schema.json
CHANGED
@@ -193,7 +193,8 @@
|
|
193
193
|
"character": 3
|
194
194
|
},
|
195
195
|
"raw": "/**\n * compute all dev patterns on a component.\n * computing of dev patterns is a merge of the configuration, the env (env.getDevPatterns(component)) and\n * the registering aspects (through registerDevPattern()).\n */",
|
196
|
-
"comment": "compute all dev patterns on a component.\ncomputing of dev patterns is a merge of the configuration, the env (env.getDevPatterns(component)) and\nthe registering aspects (through registerDevPattern())."
|
196
|
+
"comment": "compute all dev patterns on a component.\ncomputing of dev patterns is a merge of the configuration, the env (env.getDevPatterns(component)) and\nthe registering aspects (through registerDevPattern()).",
|
197
|
+
"tags": []
|
197
198
|
},
|
198
199
|
"signature": "(method) DevFilesMain.computeDevPatterns(component: Component): Promise<{\n config: any;\n} & {\n [id: string]: string[];\n} & {\n [id: string]: string[];\n}>",
|
199
200
|
"name": "computeDevPatterns",
|
@@ -336,7 +337,8 @@
|
|
336
337
|
"character": 3
|
337
338
|
},
|
338
339
|
"raw": "/**\n * get all dev files configured on a component.\n */",
|
339
|
-
"comment": "get all dev files configured on a component."
|
340
|
+
"comment": "get all dev files configured on a component.",
|
341
|
+
"tags": []
|
340
342
|
},
|
341
343
|
"signature": "(method) DevFilesMain.getDevPatterns(component: Component, aspectId?: string): string[]",
|
342
344
|
"name": "getDevPatterns",
|
@@ -420,7 +422,8 @@
|
|
420
422
|
"character": 3
|
421
423
|
},
|
422
424
|
"raw": "/**\n * determine whether a file of a component is a dev file.\n */",
|
423
|
-
"comment": "determine whether a file of a component is a dev file."
|
425
|
+
"comment": "determine whether a file of a component is a dev file.",
|
426
|
+
"tags": []
|
424
427
|
},
|
425
428
|
"signature": "(method) DevFilesMain.isDevFile(component: Component, filePath: string): boolean",
|
426
429
|
"name": "isDevFile",
|
@@ -562,7 +565,8 @@
|
|
562
565
|
"character": 3
|
563
566
|
},
|
564
567
|
"raw": "/**\n * get all dev patterns registered.\n * If you want to use this during onLoad event you might need to use computeDevFiles instead, since the component might not include this data yet\n */",
|
565
|
-
"comment": "get all dev patterns registered.\nIf you want to use this during onLoad event you might need to use computeDevFiles instead, since the component might not include this data yet"
|
568
|
+
"comment": "get all dev patterns registered.\nIf you want to use this during onLoad event you might need to use computeDevFiles instead, since the component might not include this data yet",
|
569
|
+
"tags": []
|
566
570
|
},
|
567
571
|
"signature": "(method) DevFilesMain.getDevFiles(component: Component): DevFiles",
|
568
572
|
"name": "getDevFiles",
|
@@ -683,7 +687,8 @@
|
|
683
687
|
"character": 3
|
684
688
|
},
|
685
689
|
"raw": "/**\n * compute all dev files of a component.\n */",
|
686
|
-
"comment": "compute all dev files of a component."
|
690
|
+
"comment": "compute all dev files of a component.",
|
691
|
+
"tags": []
|
687
692
|
},
|
688
693
|
"signature": "(method) DevFilesMain.computeDevFiles(component: Component): Promise<DevFiles>",
|
689
694
|
"name": "computeDevFiles",
|
@@ -1241,7 +1246,8 @@
|
|
1241
1246
|
"character": 1
|
1242
1247
|
},
|
1243
1248
|
"raw": "/**\n * dev pattern is a list of strings or a function that returns a list of strings. an example to a pattern can be \"[*.spec.ts]\"\n */",
|
1244
|
-
"comment": "dev pattern is a list of strings or a function that returns a list of strings. an example to a pattern can be \"[*.spec.ts]\""
|
1249
|
+
"comment": "dev pattern is a list of strings or a function that returns a list of strings. an example to a pattern can be \"[*.spec.ts]\"",
|
1250
|
+
"tags": []
|
1245
1251
|
},
|
1246
1252
|
"signature": "type DevPatterns = ((component: Component) => DevPattern) | DevPattern",
|
1247
1253
|
"name": "DevPatterns",
|
@@ -1504,7 +1510,8 @@
|
|
1504
1510
|
"character": 1
|
1505
1511
|
},
|
1506
1512
|
"raw": "/**\n * slot for dev file patterns.\n */",
|
1507
|
-
"comment": "slot for dev file patterns."
|
1513
|
+
"comment": "slot for dev file patterns.",
|
1514
|
+
"tags": []
|
1508
1515
|
},
|
1509
1516
|
"signature": "type DevPatternSlot = SlotRegistry<DevPatterns>",
|
1510
1517
|
"name": "DevPatternSlot",
|
@@ -1720,7 +1727,8 @@
|
|
1720
1727
|
"character": 3
|
1721
1728
|
},
|
1722
1729
|
"raw": "/**\n * compute all dev patterns on a component.\n * computing of dev patterns is a merge of the configuration, the env (env.getDevPatterns(component)) and\n * the registering aspects (through registerDevPattern()).\n */",
|
1723
|
-
"comment": "compute all dev patterns on a component.\ncomputing of dev patterns is a merge of the configuration, the env (env.getDevPatterns(component)) and\nthe registering aspects (through registerDevPattern())."
|
1730
|
+
"comment": "compute all dev patterns on a component.\ncomputing of dev patterns is a merge of the configuration, the env (env.getDevPatterns(component)) and\nthe registering aspects (through registerDevPattern()).",
|
1731
|
+
"tags": []
|
1724
1732
|
},
|
1725
1733
|
"signature": "(method) DevFilesMain.computeDevPatterns(component: Component): Promise<{\n config: any;\n} & {\n [id: string]: string[];\n} & {\n [id: string]: string[];\n}>",
|
1726
1734
|
"name": "computeDevPatterns",
|
@@ -1863,7 +1871,8 @@
|
|
1863
1871
|
"character": 3
|
1864
1872
|
},
|
1865
1873
|
"raw": "/**\n * get all dev files configured on a component.\n */",
|
1866
|
-
"comment": "get all dev files configured on a component."
|
1874
|
+
"comment": "get all dev files configured on a component.",
|
1875
|
+
"tags": []
|
1867
1876
|
},
|
1868
1877
|
"signature": "(method) DevFilesMain.getDevPatterns(component: Component, aspectId?: string): string[]",
|
1869
1878
|
"name": "getDevPatterns",
|
@@ -1947,7 +1956,8 @@
|
|
1947
1956
|
"character": 3
|
1948
1957
|
},
|
1949
1958
|
"raw": "/**\n * determine whether a file of a component is a dev file.\n */",
|
1950
|
-
"comment": "determine whether a file of a component is a dev file."
|
1959
|
+
"comment": "determine whether a file of a component is a dev file.",
|
1960
|
+
"tags": []
|
1951
1961
|
},
|
1952
1962
|
"signature": "(method) DevFilesMain.isDevFile(component: Component, filePath: string): boolean",
|
1953
1963
|
"name": "isDevFile",
|
@@ -2089,7 +2099,8 @@
|
|
2089
2099
|
"character": 3
|
2090
2100
|
},
|
2091
2101
|
"raw": "/**\n * get all dev patterns registered.\n * If you want to use this during onLoad event you might need to use computeDevFiles instead, since the component might not include this data yet\n */",
|
2092
|
-
"comment": "get all dev patterns registered.\nIf you want to use this during onLoad event you might need to use computeDevFiles instead, since the component might not include this data yet"
|
2102
|
+
"comment": "get all dev patterns registered.\nIf you want to use this during onLoad event you might need to use computeDevFiles instead, since the component might not include this data yet",
|
2103
|
+
"tags": []
|
2093
2104
|
},
|
2094
2105
|
"signature": "(method) DevFilesMain.getDevFiles(component: Component): DevFiles",
|
2095
2106
|
"name": "getDevFiles",
|
@@ -2210,7 +2221,8 @@
|
|
2210
2221
|
"character": 3
|
2211
2222
|
},
|
2212
2223
|
"raw": "/**\n * compute all dev files of a component.\n */",
|
2213
|
-
"comment": "compute all dev files of a component."
|
2224
|
+
"comment": "compute all dev files of a component.",
|
2225
|
+
"tags": []
|
2214
2226
|
},
|
2215
2227
|
"signature": "(method) DevFilesMain.computeDevFiles(component: Component): Promise<DevFiles>",
|
2216
2228
|
"name": "computeDevFiles",
|
@@ -2550,7 +2562,8 @@
|
|
2550
2562
|
"character": 3
|
2551
2563
|
},
|
2552
2564
|
"raw": "/**\n * Name of the dev pattern\n */",
|
2553
|
-
"comment": "Name of the dev pattern"
|
2565
|
+
"comment": "Name of the dev pattern",
|
2566
|
+
"tags": []
|
2554
2567
|
},
|
2555
2568
|
"signature": "(property) name: string",
|
2556
2569
|
"name": "name",
|
@@ -2580,7 +2593,8 @@
|
|
2580
2593
|
"character": 3
|
2581
2594
|
},
|
2582
2595
|
"raw": "/**\n * Glob pattern to select dev files\n */",
|
2583
|
-
"comment": "Glob pattern to select dev files"
|
2596
|
+
"comment": "Glob pattern to select dev files",
|
2597
|
+
"tags": []
|
2584
2598
|
},
|
2585
2599
|
"signature": "(property) pattern: string[]",
|
2586
2600
|
"name": "pattern",
|
@@ -2669,7 +2683,7 @@
|
|
2669
2683
|
"componentId": {
|
2670
2684
|
"scope": "teambit.component",
|
2671
2685
|
"name": "dev-files",
|
2672
|
-
"version": "1.0.
|
2686
|
+
"version": "1.0.311"
|
2673
2687
|
},
|
2674
2688
|
"taggedModuleExports": []
|
2675
2689
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_dev-files@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_dev-files@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_dev-files@1.0.311/dist/dev-files.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_dev-files@1.0.311/dist/dev-files.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/dev-files",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.311",
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/dev-files",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.component",
|
8
8
|
"name": "dev-files",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.311"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"graphql-tag": "2.12.1",
|
13
13
|
"lodash": "4.17.21",
|
14
14
|
"@teambit/harmony": "0.4.6",
|
15
|
-
"@teambit/component": "1.0.
|
16
|
-
"@teambit/graphql": "1.0.
|
17
|
-
"@teambit/cli": "0.0.
|
18
|
-
"@teambit/envs": "1.0.
|
19
|
-
"@teambit/scope": "1.0.
|
20
|
-
"@teambit/workspace": "1.0.
|
15
|
+
"@teambit/component": "1.0.311",
|
16
|
+
"@teambit/graphql": "1.0.311",
|
17
|
+
"@teambit/cli": "0.0.888",
|
18
|
+
"@teambit/envs": "1.0.311",
|
19
|
+
"@teambit/scope": "1.0.311",
|
20
|
+
"@teambit/workspace": "1.0.311"
|
21
21
|
},
|
22
22
|
"devDependencies": {
|
23
23
|
"@types/lodash": "4.14.165",
|