@teambit/react 0.0.829 → 0.0.832
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/{872.b11b670649f0667f850f.js → 2.1d148b33f2c9a13411f7.js} +2 -2
- package/artifacts/env-template/public/assets-manifest.json +12 -12
- package/artifacts/env-template/public/{compositions.37cd024a5612d0f82580.js → compositions.b301ddee36c0ea3f1fe0.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.469f089b31bff02a39a6.js → overview.a675c688b59565a1a4bb.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{peers.9940578b32bdb461180e.js → peers.31f10e07e19421071b60.js} +1 -1
- package/artifacts/env-template/public/{preview-root.f137aea145bc8db015d5.js → preview-root.cb6cfd6f2dcf7f07f6c6.js} +1 -1
- package/artifacts/env-template/public/static/css/{872.bd6f7c48.css → 2.bd6f7c48.css} +0 -0
- package/artifacts/preview/teambit_react_react-preview.js +1 -1
- package/{compositions-1661609046303.js → compositions-1661916601653.js} +0 -0
- package/dist/templates/react-workspace-app/index.js +33 -12
- package/dist/templates/react-workspace-app/index.js.map +1 -1
- package/dist/templates/workspace-common/constants.d.ts +1 -0
- package/dist/templates/workspace-common/constants.js +10 -0
- package/dist/templates/workspace-common/constants.js.map +1 -0
- package/dist/templates/workspace-common/files/workspace-config.d.ts +1 -1
- package/dist/templates/workspace-common/files/workspace-config.js +19 -3
- package/dist/templates/workspace-common/files/workspace-config.js.map +1 -1
- package/dist/templates/workspace-common/generate-files.d.ts +1 -1
- package/dist/templates/workspace-common/generate-files.js +2 -2
- package/dist/templates/workspace-common/generate-files.js.map +1 -1
- package/{overview-1661609046303.js → overview-1661916601653.js} +0 -0
- package/package-tar/teambit-react-0.0.832.tgz +0 -0
- package/package.json +48 -50
- package/{preview-1661609046303.js → preview-1661916601653.js} +2 -2
- package/templates/react-workspace-app/index.ts +12 -6
- package/templates/workspace-common/constants.ts +1 -0
- package/templates/workspace-common/files/workspace-config.ts +8 -3
- package/templates/workspace-common/generate-files.ts +5 -2
- package/package-tar/teambit-react-0.0.829.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["generateFiles","context","relativePath","content","workspaceConfig","gitIgnore","launchJson","readme","eslintConfig","tsConfig","prettierConfig","assetTypes","styleTypes"],"sources":["generate-files.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { workspaceConfig } from './files/workspace-config';\nimport { readme } from './files/readme-file';\nimport { gitIgnore } from './files/git-ignore';\nimport { assetTypes } from './files/types/asset';\nimport { styleTypes } from './files/types/style';\nimport { eslintConfig } from './files/eslint-config';\nimport { tsConfig } from './files/ts-config';\nimport { prettierConfig } from './files/prettier-config';\nimport { launchJson } from './files/launch-json';\n\ntype GeneratedFile = {\n relativePath: string;\n content: string;\n};\n\nexport async function generateFiles(context: WorkspaceContext): Promise<GeneratedFile[]> {\n return [\n {\n relativePath: 'workspace.jsonc',\n content: await workspaceConfig(context),\n },\n {\n relativePath: `.gitignore`,\n content: gitIgnore(),\n },\n {\n relativePath: '.vscode/launch.json',\n content: launchJson(context),\n },\n {\n relativePath: `README.md`,\n content: readme(),\n },\n {\n relativePath: `.eslintrc.js`,\n content: eslintConfig,\n },\n {\n relativePath: `tsconfig.json`,\n content: tsConfig,\n },\n {\n relativePath: `.prettierrc.js`,\n content: prettierConfig,\n },\n {\n relativePath: `types/asset.d.ts`,\n content: assetTypes,\n },\n {\n relativePath: `types/style.d.ts`,\n content: styleTypes,\n },\n ];\n}\n"],"mappings":";;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,eAAeA,aAAf,
|
|
1
|
+
{"version":3,"names":["generateFiles","context","extraConfig","relativePath","content","workspaceConfig","gitIgnore","launchJson","readme","eslintConfig","tsConfig","prettierConfig","assetTypes","styleTypes"],"sources":["generate-files.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { workspaceConfig } from './files/workspace-config';\nimport { readme } from './files/readme-file';\nimport { gitIgnore } from './files/git-ignore';\nimport { assetTypes } from './files/types/asset';\nimport { styleTypes } from './files/types/style';\nimport { eslintConfig } from './files/eslint-config';\nimport { tsConfig } from './files/ts-config';\nimport { prettierConfig } from './files/prettier-config';\nimport { launchJson } from './files/launch-json';\n\ntype GeneratedFile = {\n relativePath: string;\n content: string;\n};\n\nexport async function generateFiles(\n context: WorkspaceContext,\n extraConfig?: Record<string, any>\n): Promise<GeneratedFile[]> {\n return [\n {\n relativePath: 'workspace.jsonc',\n content: await workspaceConfig(context, extraConfig),\n },\n {\n relativePath: `.gitignore`,\n content: gitIgnore(),\n },\n {\n relativePath: '.vscode/launch.json',\n content: launchJson(context),\n },\n {\n relativePath: `README.md`,\n content: readme(),\n },\n {\n relativePath: `.eslintrc.js`,\n content: eslintConfig,\n },\n {\n relativePath: `tsconfig.json`,\n content: tsConfig,\n },\n {\n relativePath: `.prettierrc.js`,\n content: prettierConfig,\n },\n {\n relativePath: `types/asset.d.ts`,\n content: assetTypes,\n },\n {\n relativePath: `types/style.d.ts`,\n content: styleTypes,\n },\n ];\n}\n"],"mappings":";;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,eAAeA,aAAf,CACLC,OADK,EAELC,WAFK,EAGqB;EAC1B,OAAO,CACL;IACEC,YAAY,EAAE,iBADhB;IAEEC,OAAO,EAAE,MAAM,IAAAC,kCAAA,EAAgBJ,OAAhB,EAAyBC,WAAzB;EAFjB,CADK,EAKL;IACEC,YAAY,EAAG,YADjB;IAEEC,OAAO,EAAE,IAAAE,sBAAA;EAFX,CALK,EASL;IACEH,YAAY,EAAE,qBADhB;IAEEC,OAAO,EAAE,IAAAG,wBAAA,EAAWN,OAAX;EAFX,CATK,EAaL;IACEE,YAAY,EAAG,WADjB;IAEEC,OAAO,EAAE,IAAAI,oBAAA;EAFX,CAbK,EAiBL;IACEL,YAAY,EAAG,cADjB;IAEEC,OAAO,EAAEK;EAFX,CAjBK,EAqBL;IACEN,YAAY,EAAG,eADjB;IAEEC,OAAO,EAAEM;EAFX,CArBK,EAyBL;IACEP,YAAY,EAAG,gBADjB;IAEEC,OAAO,EAAEO;EAFX,CAzBK,EA6BL;IACER,YAAY,EAAG,kBADjB;IAEEC,OAAO,EAAEQ;EAFX,CA7BK,EAiCL;IACET,YAAY,EAAG,kBADjB;IAEEC,OAAO,EAAES;EAFX,CAjCK,CAAP;AAsCD"}
|
|
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.832",
|
|
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.832"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@babel/plugin-transform-modules-commonjs": "7.12.13",
|
|
38
38
|
"@babel/preset-env": "7.12.17",
|
|
39
39
|
"camelcase": "6.2.0",
|
|
40
|
+
"comment-json": "3.0.3",
|
|
40
41
|
"react-error-overlay": "6.0.9",
|
|
41
42
|
"strip-ansi": "6.0.0",
|
|
42
43
|
"prerender-spa-plugin-next": "4.2.0",
|
|
43
44
|
"express": "4.17.1",
|
|
44
45
|
"url-join": "4.0.1",
|
|
45
|
-
"comment-json": "3.0.3",
|
|
46
46
|
"react-refresh": "0.10.0",
|
|
47
47
|
"@babel/runtime": "^7.12.18",
|
|
48
48
|
"less-loader": "10.0.0",
|
|
@@ -82,49 +82,49 @@
|
|
|
82
82
|
"@teambit/react.instructions.react.adding-compositions": "0.0.6",
|
|
83
83
|
"@teambit/react.instructions.react.adding-tests": "0.0.6",
|
|
84
84
|
"@teambit/react.rendering.ssr": "0.0.3",
|
|
85
|
-
"@teambit/
|
|
86
|
-
"@teambit/
|
|
87
|
-
"@teambit/
|
|
88
|
-
"@teambit/
|
|
89
|
-
"@teambit/
|
|
90
|
-
"@teambit/component
|
|
91
|
-
"@teambit/
|
|
92
|
-
"@teambit/
|
|
93
|
-
"@teambit/
|
|
94
|
-
"@teambit/
|
|
95
|
-
"@teambit/
|
|
96
|
-
"@teambit/
|
|
97
|
-
"@teambit/
|
|
98
|
-
"@teambit/
|
|
99
|
-
"@teambit/
|
|
100
|
-
"@teambit/
|
|
101
|
-
"@teambit/
|
|
102
|
-
"@teambit/
|
|
103
|
-
"@teambit/
|
|
104
|
-
"@teambit/
|
|
105
|
-
"@teambit/
|
|
106
|
-
"@teambit/
|
|
107
|
-
"@teambit/
|
|
108
|
-
"@teambit/
|
|
109
|
-
"@teambit/
|
|
110
|
-
"@teambit/
|
|
111
|
-
"@teambit/
|
|
112
|
-
"@teambit/
|
|
113
|
-
"@teambit/
|
|
114
|
-
"@teambit/
|
|
115
|
-
"@teambit/
|
|
116
|
-
"@teambit/
|
|
117
|
-
"@teambit/
|
|
118
|
-
"@teambit/
|
|
119
|
-
"@teambit/
|
|
120
|
-
"@teambit/
|
|
121
|
-
"@teambit/
|
|
122
|
-
"@teambit/component-
|
|
123
|
-
"@teambit/
|
|
124
|
-
"@teambit/
|
|
125
|
-
"@teambit/
|
|
126
|
-
"@teambit/
|
|
127
|
-
"@teambit/
|
|
85
|
+
"@teambit/design.ui.tooltip": "0.0.353",
|
|
86
|
+
"@teambit/builder": "0.0.832",
|
|
87
|
+
"@teambit/bundler": "0.0.832",
|
|
88
|
+
"@teambit/compiler": "0.0.832",
|
|
89
|
+
"@teambit/component.modules.component-url": "0.0.129",
|
|
90
|
+
"@teambit/component": "0.0.832",
|
|
91
|
+
"@teambit/dependency-resolver": "0.0.832",
|
|
92
|
+
"@teambit/envs": "0.0.832",
|
|
93
|
+
"@teambit/eslint": "0.0.832",
|
|
94
|
+
"@teambit/formatter": "0.0.383",
|
|
95
|
+
"@teambit/jest": "0.0.832",
|
|
96
|
+
"@teambit/linter": "0.0.832",
|
|
97
|
+
"@teambit/logger": "0.0.650",
|
|
98
|
+
"@teambit/pkg": "0.0.832",
|
|
99
|
+
"@teambit/prettier": "0.0.383",
|
|
100
|
+
"@teambit/schema": "0.0.832",
|
|
101
|
+
"@teambit/tester": "0.0.832",
|
|
102
|
+
"@teambit/typescript": "0.0.832",
|
|
103
|
+
"@teambit/webpack": "0.0.832",
|
|
104
|
+
"@teambit/workspace": "0.0.832",
|
|
105
|
+
"@teambit/application": "0.0.474",
|
|
106
|
+
"@teambit/cli": "0.0.557",
|
|
107
|
+
"@teambit/generator": "0.0.832",
|
|
108
|
+
"@teambit/graphql": "0.0.832",
|
|
109
|
+
"@teambit/preview": "0.0.832",
|
|
110
|
+
"@teambit/compositions": "0.0.832",
|
|
111
|
+
"@teambit/ui": "0.0.832",
|
|
112
|
+
"@teambit/webpack.modules.generate-style-loaders": "0.0.104",
|
|
113
|
+
"@teambit/webpack.modules.style-regexps": "0.0.133",
|
|
114
|
+
"@teambit/component-id": "0.0.406",
|
|
115
|
+
"@teambit/bit-error": "0.0.395",
|
|
116
|
+
"@teambit/toolbox.network.get-port": "0.0.114",
|
|
117
|
+
"@teambit/ui-foundation.ui.pages.static-error": "0.0.76",
|
|
118
|
+
"@teambit/config": "0.0.570",
|
|
119
|
+
"@teambit/compositions.ui.hooks.use-composition": "0.0.164",
|
|
120
|
+
"@teambit/react.ui.compositions-app": "0.0.3",
|
|
121
|
+
"@teambit/react.ui.docs-app": "0.0.185",
|
|
122
|
+
"@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.22",
|
|
123
|
+
"@teambit/react.ui.highlighter-provider": "0.0.191",
|
|
124
|
+
"@teambit/react.eslint-config-bit-react": "0.0.631",
|
|
125
|
+
"@teambit/mdx.modules.mdx-loader": "0.0.493",
|
|
126
|
+
"@teambit/react.babel.bit-react-transformer": "0.0.505",
|
|
127
|
+
"@teambit/react.modules.prerenderer-puppeteer": "0.0.3"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
130
|
"@types/react": "^17.0.8",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"@teambit/react.content.react-overview": "1.95.0"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|
|
149
|
-
"@teambit/legacy": "1.0.
|
|
149
|
+
"@teambit/legacy": "1.0.340",
|
|
150
150
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
151
151
|
"react": "^16.8.0 || ^17.0.0"
|
|
152
152
|
},
|
|
@@ -168,8 +168,6 @@
|
|
|
168
168
|
"react",
|
|
169
169
|
"react-components",
|
|
170
170
|
"angular",
|
|
171
|
-
"angular-components"
|
|
172
|
-
"vue",
|
|
173
|
-
"vue-components"
|
|
171
|
+
"angular-components"
|
|
174
172
|
]
|
|
175
173
|
}
|
|
@@ -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.832/dist/react.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.832/dist/react.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
|
|
2
|
+
import { parse } from 'comment-json';
|
|
2
3
|
import { generateFiles as generateCommonFiles } from '../workspace-common';
|
|
4
|
+
import { DEFAULT_SCOPE_NAME } from '../workspace-common/constants';
|
|
3
5
|
|
|
4
6
|
export const reactWorkspaceAppTemplate: WorkspaceTemplate = {
|
|
5
7
|
name: 'react-app',
|
|
6
8
|
description: 'EXPERIMENTAL. react workspace for an app',
|
|
7
9
|
hidden: true,
|
|
10
|
+
appName: 'my-app',
|
|
8
11
|
generateFiles: async (context: WorkspaceContext) => {
|
|
9
|
-
|
|
12
|
+
const scope = context.defaultScope || DEFAULT_SCOPE_NAME;
|
|
13
|
+
const extensions = {
|
|
14
|
+
[`${scope}/apps/my-app`]: parse(`{}`),
|
|
15
|
+
};
|
|
16
|
+
return generateCommonFiles(context, extensions);
|
|
10
17
|
},
|
|
11
18
|
fork: () => {
|
|
12
19
|
return [
|
|
13
|
-
{ id: 'teambit.react/templates/apps/my-app',
|
|
14
|
-
{ id: 'teambit.react/templates/envs/my-react',
|
|
15
|
-
{ id: 'teambit.react/templates/themes/theme',
|
|
16
|
-
{ id: 'teambit.react/templates/
|
|
17
|
-
{ id: 'teambit.react/templates/ui/heading', path: 'ui/heading' },
|
|
20
|
+
{ id: 'teambit.react/templates/apps/my-app', targetName: 'apps/my-app' },
|
|
21
|
+
// { id: 'teambit.react/templates/envs/my-react', targetName: 'envs/my-react' }, // TODO: uncomment when ready
|
|
22
|
+
{ id: 'teambit.react/templates/themes/theme', targetName: 'themes/theme' },
|
|
23
|
+
{ id: 'teambit.react/templates/pages/home', targetName: 'pages/home' },
|
|
18
24
|
];
|
|
19
25
|
},
|
|
20
26
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DEFAULT_SCOPE_NAME = 'my-org.my-scope';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { WorkspaceContext } from '@teambit/generator';
|
|
2
2
|
import { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@teambit/config';
|
|
3
3
|
import { parse, assign } from 'comment-json';
|
|
4
|
+
import { DEFAULT_SCOPE_NAME } from '../constants';
|
|
4
5
|
|
|
5
|
-
export async function workspaceConfig({ name, defaultScope }: WorkspaceContext) {
|
|
6
|
-
const scope = defaultScope ||
|
|
6
|
+
export async function workspaceConfig({ name, defaultScope }: WorkspaceContext, extraConfig?: Record<string, any>) {
|
|
7
|
+
const scope = defaultScope || DEFAULT_SCOPE_NAME;
|
|
7
8
|
const configParsed = await getWorkspaceConfigTemplateParsed();
|
|
8
9
|
configParsed['teambit.workspace/workspace'].name = name;
|
|
9
10
|
configParsed['teambit.workspace/workspace'].defaultScope = scope;
|
|
@@ -30,7 +31,11 @@ export async function workspaceConfig({ name, defaultScope }: WorkspaceContext)
|
|
|
30
31
|
'teambit.workspace/variants': parse(`{}`),
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
let configMerged = assign(configParsed, variants);
|
|
35
|
+
|
|
36
|
+
if (extraConfig) {
|
|
37
|
+
configMerged = assign(configMerged, extraConfig);
|
|
38
|
+
}
|
|
34
39
|
|
|
35
40
|
return stringifyWorkspaceConfig(configMerged);
|
|
36
41
|
}
|
|
@@ -14,11 +14,14 @@ type GeneratedFile = {
|
|
|
14
14
|
content: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export async function generateFiles(
|
|
17
|
+
export async function generateFiles(
|
|
18
|
+
context: WorkspaceContext,
|
|
19
|
+
extraConfig?: Record<string, any>
|
|
20
|
+
): Promise<GeneratedFile[]> {
|
|
18
21
|
return [
|
|
19
22
|
{
|
|
20
23
|
relativePath: 'workspace.jsonc',
|
|
21
|
-
content: await workspaceConfig(context),
|
|
24
|
+
content: await workspaceConfig(context, extraConfig),
|
|
22
25
|
},
|
|
23
26
|
{
|
|
24
27
|
relativePath: `.gitignore`,
|
|
Binary file
|