@teambit/react 0.0.1144 → 0.0.1145

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.
Files changed (117) hide show
  1. package/artifacts/env-template/public/{468.568f9c38778c002236e3.js → 182.410a89f71ee95a3ff99b.js} +2 -2
  2. package/artifacts/env-template/public/{924.16fa8b49ffdf39939225.js → 924.02ee0292af3d0a49b9b3.js} +2 -2
  3. package/artifacts/env-template/public/assets-manifest.json +12 -12
  4. package/artifacts/env-template/public/{compositions.f04bf415b74833aa108d.js → compositions.20fe0f3ddee7cca3c6d3.js} +1 -1
  5. package/artifacts/env-template/public/compositions.html +1 -1
  6. package/artifacts/env-template/public/{overview.4a7c36b78e1d59b63875.js → overview.06b1918799167bcfab11.js} +1 -1
  7. package/artifacts/env-template/public/overview.html +1 -1
  8. package/artifacts/env-template/public/{peers.60e216aa2783cf1ed4f3.js → peers.5769331da1f38fc00702.js} +1 -1
  9. package/artifacts/env-template/public/{preview-root.fa8ad55acdd88d61b0ec.js → preview-root.53a6e63c0ef099b3ef97.js} +1 -1
  10. package/dist/{preview-1693279117198.js → preview-1693474270980.js} +2 -2
  11. package/dist/react.main.runtime.js +0 -1
  12. package/dist/react.main.runtime.js.map +1 -1
  13. package/dist/react.templates.d.ts +1 -2
  14. package/dist/react.templates.js +1 -66
  15. package/dist/react.templates.js.map +1 -1
  16. package/dist/templates/react-component/index.js +1 -0
  17. package/dist/templates/react-component/index.js.map +1 -1
  18. package/dist/templates/react-component-js/index.js +1 -0
  19. package/dist/templates/react-component-js/index.js.map +1 -1
  20. package/dist/templates/react-context/index.js +1 -0
  21. package/dist/templates/react-context/index.js.map +1 -1
  22. package/dist/templates/react-env/index.js +1 -0
  23. package/dist/templates/react-env/index.js.map +1 -1
  24. package/dist/templates/react-hook/index.js +1 -0
  25. package/dist/templates/react-hook/index.js.map +1 -1
  26. package/package.json +31 -33
  27. package/templates/react-component/index.ts +1 -0
  28. package/templates/react-component-js/index.ts +1 -1
  29. package/templates/react-context/index.ts +1 -1
  30. package/templates/react-env/index.ts +1 -0
  31. package/templates/react-hook/index.ts +1 -1
  32. package/dist/templates/react-workspace/index.d.ts +0 -2
  33. package/dist/templates/react-workspace/index.js +0 -41
  34. package/dist/templates/react-workspace/index.js.map +0 -1
  35. package/dist/templates/react-workspace-analytics/index.d.ts +0 -2
  36. package/dist/templates/react-workspace-analytics/index.js +0 -47
  37. package/dist/templates/react-workspace-analytics/index.js.map +0 -1
  38. package/dist/templates/react-workspace-app/index.d.ts +0 -2
  39. package/dist/templates/react-workspace-app/index.js +0 -58
  40. package/dist/templates/react-workspace-app/index.js.map +0 -1
  41. package/dist/templates/react-workspace-blog/index.d.ts +0 -2
  42. package/dist/templates/react-workspace-blog/index.js +0 -39
  43. package/dist/templates/react-workspace-blog/index.js.map +0 -1
  44. package/dist/templates/react-workspace-data-fetching/index.d.ts +0 -2
  45. package/dist/templates/react-workspace-data-fetching/index.js +0 -47
  46. package/dist/templates/react-workspace-data-fetching/index.js.map +0 -1
  47. package/dist/templates/react-workspace-deprecated/index.d.ts +0 -2
  48. package/dist/templates/react-workspace-deprecated/index.js +0 -48
  49. package/dist/templates/react-workspace-deprecated/index.js.map +0 -1
  50. package/dist/templates/react-workspace-design-system/index.d.ts +0 -2
  51. package/dist/templates/react-workspace-design-system/index.js +0 -55
  52. package/dist/templates/react-workspace-design-system/index.js.map +0 -1
  53. package/dist/templates/react-workspace-lib/index.d.ts +0 -2
  54. package/dist/templates/react-workspace-lib/index.js +0 -52
  55. package/dist/templates/react-workspace-lib/index.js.map +0 -1
  56. package/dist/templates/react-workspace-wiki/index.d.ts +0 -2
  57. package/dist/templates/react-workspace-wiki/index.js +0 -47
  58. package/dist/templates/react-workspace-wiki/index.js.map +0 -1
  59. package/dist/templates/workspace-common/constants.d.ts +0 -1
  60. package/dist/templates/workspace-common/constants.js +0 -10
  61. package/dist/templates/workspace-common/constants.js.map +0 -1
  62. package/dist/templates/workspace-common/files/eslint-config.d.ts +0 -1
  63. package/dist/templates/workspace-common/files/eslint-config.js +0 -15
  64. package/dist/templates/workspace-common/files/eslint-config.js.map +0 -1
  65. package/dist/templates/workspace-common/files/git-ignore.d.ts +0 -1
  66. package/dist/templates/workspace-common/files/git-ignore.js +0 -121
  67. package/dist/templates/workspace-common/files/git-ignore.js.map +0 -1
  68. package/dist/templates/workspace-common/files/launch-json.d.ts +0 -2
  69. package/dist/templates/workspace-common/files/launch-json.js +0 -39
  70. package/dist/templates/workspace-common/files/launch-json.js.map +0 -1
  71. package/dist/templates/workspace-common/files/prettier-config.d.ts +0 -1
  72. package/dist/templates/workspace-common/files/prettier-config.js +0 -14
  73. package/dist/templates/workspace-common/files/prettier-config.js.map +0 -1
  74. package/dist/templates/workspace-common/files/readme-file.d.ts +0 -1
  75. package/dist/templates/workspace-common/files/readme-file.js +0 -44
  76. package/dist/templates/workspace-common/files/readme-file.js.map +0 -1
  77. package/dist/templates/workspace-common/files/ts-config.d.ts +0 -1
  78. package/dist/templates/workspace-common/files/ts-config.js +0 -19
  79. package/dist/templates/workspace-common/files/ts-config.js.map +0 -1
  80. package/dist/templates/workspace-common/files/types/asset.d.ts +0 -1
  81. package/dist/templates/workspace-common/files/types/asset.js +0 -37
  82. package/dist/templates/workspace-common/files/types/asset.js.map +0 -1
  83. package/dist/templates/workspace-common/files/types/style.d.ts +0 -1
  84. package/dist/templates/workspace-common/files/types/style.js +0 -52
  85. package/dist/templates/workspace-common/files/types/style.js.map +0 -1
  86. package/dist/templates/workspace-common/files/workspace-config.d.ts +0 -2
  87. package/dist/templates/workspace-common/files/workspace-config.js +0 -65
  88. package/dist/templates/workspace-common/files/workspace-config.js.map +0 -1
  89. package/dist/templates/workspace-common/generate-files.d.ts +0 -7
  90. package/dist/templates/workspace-common/generate-files.js +0 -102
  91. package/dist/templates/workspace-common/generate-files.js.map +0 -1
  92. package/dist/templates/workspace-common/index.d.ts +0 -1
  93. package/dist/templates/workspace-common/index.js +0 -20
  94. package/dist/templates/workspace-common/index.js.map +0 -1
  95. package/templates/react-workspace/index.ts +0 -27
  96. package/templates/react-workspace-analytics/index.ts +0 -31
  97. package/templates/react-workspace-app/index.ts +0 -26
  98. package/templates/react-workspace-blog/index.ts +0 -25
  99. package/templates/react-workspace-data-fetching/index.ts +0 -35
  100. package/templates/react-workspace-deprecated/index.ts +0 -28
  101. package/templates/react-workspace-design-system/index.ts +0 -37
  102. package/templates/react-workspace-lib/index.ts +0 -21
  103. package/templates/react-workspace-wiki/index.ts +0 -27
  104. package/templates/workspace-common/constants.ts +0 -1
  105. package/templates/workspace-common/files/eslint-config.ts +0 -6
  106. package/templates/workspace-common/files/git-ignore.ts +0 -113
  107. package/templates/workspace-common/files/launch-json.ts +0 -30
  108. package/templates/workspace-common/files/prettier-config.ts +0 -5
  109. package/templates/workspace-common/files/readme-file.ts +0 -36
  110. package/templates/workspace-common/files/ts-config.ts +0 -10
  111. package/templates/workspace-common/files/types/asset.ts +0 -28
  112. package/templates/workspace-common/files/types/style.ts +0 -43
  113. package/templates/workspace-common/files/workspace-config.ts +0 -41
  114. package/templates/workspace-common/generate-files.ts +0 -59
  115. package/templates/workspace-common/index.ts +0 -1
  116. /package/{compositions-1693279117198.js → compositions-1693474270980.js} +0 -0
  117. /package/{overview-1693279117198.js → overview-1693474270980.js} +0 -0
@@ -1,65 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.promise.js");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.workspaceConfig = workspaceConfig;
8
- function _config() {
9
- const data = require("@teambit/config");
10
- _config = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- function _commentJson() {
16
- const data = require("comment-json");
17
- _commentJson = function () {
18
- return data;
19
- };
20
- return data;
21
- }
22
- function _constants() {
23
- const data = require("../constants");
24
- _constants = function () {
25
- return data;
26
- };
27
- return data;
28
- }
29
- async function workspaceConfig({
30
- name,
31
- defaultScope
32
- }, extraConfig) {
33
- const scope = defaultScope || _constants().DEFAULT_SCOPE_NAME;
34
- const configParsed = await (0, _config().getWorkspaceConfigTemplateParsed)();
35
- configParsed['teambit.workspace/workspace'].name = name;
36
- configParsed['teambit.workspace/workspace'].defaultScope = scope;
37
- configParsed['teambit.dependencies/dependency-resolver'].packageManager = 'teambit.dependencies/pnpm';
38
- configParsed['teambit.dependencies/dependency-resolver'].policy = {
39
- dependencies: {
40
- '@teambit/eslint-config-bit-react': '~0.0.367',
41
- '@typescript-eslint/eslint-plugin': '5.35.1',
42
- 'eslint-import-resolver-node': '0.3.6',
43
- 'eslint-plugin-import': '2.22.1',
44
- 'eslint-plugin-jest': '24.4.0',
45
- 'eslint-plugin-jsx-a11y': '6.4.1',
46
- 'eslint-plugin-mdx': '1.15.0',
47
- 'eslint-plugin-react': '7.25.1'
48
- },
49
- peerDependencies: {
50
- '@testing-library/react': '^12.1.5',
51
- react: '17.0.2',
52
- 'react-dom': '17.0.2'
53
- }
54
- };
55
- const variants = {
56
- 'teambit.workspace/variants': (0, _commentJson().parse)(`{}`)
57
- };
58
- let configMerged = (0, _commentJson().assign)(configParsed, variants);
59
- if (extraConfig) {
60
- configMerged = (0, _commentJson().assign)(configMerged, extraConfig);
61
- }
62
- return (0, _config().stringifyWorkspaceConfig)(configMerged);
63
- }
64
-
65
- //# sourceMappingURL=workspace-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_config","data","require","_commentJson","_constants","workspaceConfig","name","defaultScope","extraConfig","scope","DEFAULT_SCOPE_NAME","configParsed","getWorkspaceConfigTemplateParsed","packageManager","policy","dependencies","peerDependencies","react","variants","parse","configMerged","assign","stringifyWorkspaceConfig"],"sources":["workspace-config.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@teambit/config';\nimport { parse, assign } from 'comment-json';\nimport { DEFAULT_SCOPE_NAME } from '../constants';\n\nexport async function workspaceConfig({ name, defaultScope }: WorkspaceContext, extraConfig?: Record<string, any>) {\n const scope = defaultScope || DEFAULT_SCOPE_NAME;\n const configParsed = await getWorkspaceConfigTemplateParsed();\n configParsed['teambit.workspace/workspace'].name = name;\n configParsed['teambit.workspace/workspace'].defaultScope = scope;\n configParsed['teambit.dependencies/dependency-resolver'].packageManager = 'teambit.dependencies/pnpm';\n configParsed['teambit.dependencies/dependency-resolver'].policy = {\n dependencies: {\n '@teambit/eslint-config-bit-react': '~0.0.367',\n '@typescript-eslint/eslint-plugin': '5.35.1',\n 'eslint-import-resolver-node': '0.3.6',\n 'eslint-plugin-import': '2.22.1',\n 'eslint-plugin-jest': '24.4.0',\n 'eslint-plugin-jsx-a11y': '6.4.1',\n 'eslint-plugin-mdx': '1.15.0',\n 'eslint-plugin-react': '7.25.1',\n },\n peerDependencies: {\n '@testing-library/react': '^12.1.5',\n react: '17.0.2',\n 'react-dom': '17.0.2',\n },\n };\n\n const variants = {\n 'teambit.workspace/variants': parse(`{}`),\n };\n\n let configMerged = assign(configParsed, variants);\n\n if (extraConfig) {\n configMerged = assign(configMerged, extraConfig);\n }\n\n return stringifyWorkspaceConfig(configMerged);\n}\n"],"mappings":";;;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,eAAeI,eAAeA,CAAC;EAAEC,IAAI;EAAEC;AAA+B,CAAC,EAAEC,WAAiC,EAAE;EACjH,MAAMC,KAAK,GAAGF,YAAY,IAAIG,+BAAkB;EAChD,MAAMC,YAAY,GAAG,MAAM,IAAAC,0CAAgC,EAAC,CAAC;EAC7DD,YAAY,CAAC,6BAA6B,CAAC,CAACL,IAAI,GAAGA,IAAI;EACvDK,YAAY,CAAC,6BAA6B,CAAC,CAACJ,YAAY,GAAGE,KAAK;EAChEE,YAAY,CAAC,0CAA0C,CAAC,CAACE,cAAc,GAAG,2BAA2B;EACrGF,YAAY,CAAC,0CAA0C,CAAC,CAACG,MAAM,GAAG;IAChEC,YAAY,EAAE;MACZ,kCAAkC,EAAE,UAAU;MAC9C,kCAAkC,EAAE,QAAQ;MAC5C,6BAA6B,EAAE,OAAO;MACtC,sBAAsB,EAAE,QAAQ;MAChC,oBAAoB,EAAE,QAAQ;MAC9B,wBAAwB,EAAE,OAAO;MACjC,mBAAmB,EAAE,QAAQ;MAC7B,qBAAqB,EAAE;IACzB,CAAC;IACDC,gBAAgB,EAAE;MAChB,wBAAwB,EAAE,SAAS;MACnCC,KAAK,EAAE,QAAQ;MACf,WAAW,EAAE;IACf;EACF,CAAC;EAED,MAAMC,QAAQ,GAAG;IACf,4BAA4B,EAAE,IAAAC,oBAAK,EAAE,IAAG;EAC1C,CAAC;EAED,IAAIC,YAAY,GAAG,IAAAC,qBAAM,EAACV,YAAY,EAAEO,QAAQ,CAAC;EAEjD,IAAIV,WAAW,EAAE;IACfY,YAAY,GAAG,IAAAC,qBAAM,EAACD,YAAY,EAAEZ,WAAW,CAAC;EAClD;EAEA,OAAO,IAAAc,kCAAwB,EAACF,YAAY,CAAC;AAC/C"}
@@ -1,7 +0,0 @@
1
- import { WorkspaceContext } from '@teambit/generator';
2
- declare type GeneratedFile = {
3
- relativePath: string;
4
- content: string;
5
- };
6
- export declare function generateFiles(context: WorkspaceContext, extraConfig?: Record<string, any>): Promise<GeneratedFile[]>;
7
- export {};
@@ -1,102 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.promise.js");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.generateFiles = generateFiles;
8
- function _workspaceConfig() {
9
- const data = require("./files/workspace-config");
10
- _workspaceConfig = function () {
11
- return data;
12
- };
13
- return data;
14
- }
15
- function _readmeFile() {
16
- const data = require("./files/readme-file");
17
- _readmeFile = function () {
18
- return data;
19
- };
20
- return data;
21
- }
22
- function _gitIgnore() {
23
- const data = require("./files/git-ignore");
24
- _gitIgnore = function () {
25
- return data;
26
- };
27
- return data;
28
- }
29
- function _asset() {
30
- const data = require("./files/types/asset");
31
- _asset = function () {
32
- return data;
33
- };
34
- return data;
35
- }
36
- function _style() {
37
- const data = require("./files/types/style");
38
- _style = function () {
39
- return data;
40
- };
41
- return data;
42
- }
43
- function _eslintConfig() {
44
- const data = require("./files/eslint-config");
45
- _eslintConfig = function () {
46
- return data;
47
- };
48
- return data;
49
- }
50
- function _tsConfig() {
51
- const data = require("./files/ts-config");
52
- _tsConfig = function () {
53
- return data;
54
- };
55
- return data;
56
- }
57
- function _prettierConfig() {
58
- const data = require("./files/prettier-config");
59
- _prettierConfig = function () {
60
- return data;
61
- };
62
- return data;
63
- }
64
- function _launchJson() {
65
- const data = require("./files/launch-json");
66
- _launchJson = function () {
67
- return data;
68
- };
69
- return data;
70
- }
71
- async function generateFiles(context, extraConfig) {
72
- return [{
73
- relativePath: 'workspace.jsonc',
74
- content: await (0, _workspaceConfig().workspaceConfig)(context, extraConfig)
75
- }, {
76
- relativePath: `.gitignore`,
77
- content: (0, _gitIgnore().gitIgnore)()
78
- }, {
79
- relativePath: '.vscode/launch.json',
80
- content: (0, _launchJson().launchJson)(context)
81
- }, {
82
- relativePath: `README.md`,
83
- content: (0, _readmeFile().readme)()
84
- }, {
85
- relativePath: `.eslintrc.js`,
86
- content: _eslintConfig().eslintConfig
87
- }, {
88
- relativePath: `tsconfig.json`,
89
- content: _tsConfig().tsConfig
90
- }, {
91
- relativePath: `.prettierrc.js`,
92
- content: _prettierConfig().prettierConfig
93
- }, {
94
- relativePath: `types/asset.d.ts`,
95
- content: _asset().assetTypes
96
- }, {
97
- relativePath: `types/style.d.ts`,
98
- content: _style().styleTypes
99
- }];
100
- }
101
-
102
- //# sourceMappingURL=generate-files.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_workspaceConfig","data","require","_readmeFile","_gitIgnore","_asset","_style","_eslintConfig","_tsConfig","_prettierConfig","_launchJson","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,SAAAA,iBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,gBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,cAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,aAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,gBAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,eAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,YAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,WAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAOO,eAAeU,aAAaA,CACjCC,OAAyB,EACzBC,WAAiC,EACP;EAC1B,OAAO,CACL;IACEC,YAAY,EAAE,iBAAiB;IAC/BC,OAAO,EAAE,MAAM,IAAAC,kCAAe,EAACJ,OAAO,EAAEC,WAAW;EACrD,CAAC,EACD;IACEC,YAAY,EAAG,YAAW;IAC1BC,OAAO,EAAE,IAAAE,sBAAS,EAAC;EACrB,CAAC,EACD;IACEH,YAAY,EAAE,qBAAqB;IACnCC,OAAO,EAAE,IAAAG,wBAAU,EAACN,OAAO;EAC7B,CAAC,EACD;IACEE,YAAY,EAAG,WAAU;IACzBC,OAAO,EAAE,IAAAI,oBAAM,EAAC;EAClB,CAAC,EACD;IACEL,YAAY,EAAG,cAAa;IAC5BC,OAAO,EAAEK;EACX,CAAC,EACD;IACEN,YAAY,EAAG,eAAc;IAC7BC,OAAO,EAAEM;EACX,CAAC,EACD;IACEP,YAAY,EAAG,gBAAe;IAC9BC,OAAO,EAAEO;EACX,CAAC,EACD;IACER,YAAY,EAAG,kBAAiB;IAChCC,OAAO,EAAEQ;EACX,CAAC,EACD;IACET,YAAY,EAAG,kBAAiB;IAChCC,OAAO,EAAES;EACX,CAAC,CACF;AACH"}
@@ -1 +0,0 @@
1
- export { generateFiles } from './generate-files';
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "generateFiles", {
7
- enumerable: true,
8
- get: function () {
9
- return _generateFiles().generateFiles;
10
- }
11
- });
12
- function _generateFiles() {
13
- const data = require("./generate-files");
14
- _generateFiles = function () {
15
- return data;
16
- };
17
- return data;
18
- }
19
-
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_generateFiles","data","require"],"sources":["index.ts"],"sourcesContent":["export { generateFiles } from './generate-files';\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
@@ -1,27 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { generateFiles as generateCommonFiles } from '../workspace-common';
3
-
4
- export const reactWorkspaceTemplate: WorkspaceTemplate = {
5
- name: 'react',
6
- description: 'React workspace with demo components',
7
- generateFiles: async (context: WorkspaceContext) => {
8
- return generateCommonFiles(context);
9
- },
10
- fork: () => {
11
- return [
12
- // {
13
- // id: 'teambit.react/templates/envs/my-react',
14
- // targetName: 'envs/my-react',
15
- // path: 'demo/envs/my-react',
16
- // },
17
- // { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },
18
- // { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },
19
- // { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },
20
- // {
21
- // id: 'teambit.react/templates/pages/welcome',
22
- // targetName: 'pages/welcome',
23
- // path: 'demo/pages/welcome',
24
- // },
25
- ];
26
- },
27
- };
@@ -1,31 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { generateFiles as generateCommonFiles } from '../workspace-common';
3
-
4
- export const reactWorkspaceAnalyticsTemplate: WorkspaceTemplate = {
5
- name: 'react-analytics',
6
- description: 'React workspace with components for an Analytics Application',
7
- generateFiles: async (context: WorkspaceContext) => {
8
- return generateCommonFiles(context);
9
- },
10
- fork: () => {
11
- return [
12
- {
13
- id: 'teambit.analytics/examples/dashboard',
14
- targetName: 'examples/dashboard',
15
- path: 'examples/dashboard',
16
- },
17
- { id: 'teambit.analytics/examples/new-users', targetName: 'examples/new-users', path: 'examples/new-users' },
18
- { id: 'teambit.analytics/examples/revenues', targetName: 'examples/revenues', path: 'examples/revenues' },
19
- {
20
- id: 'teambit.analytics/examples/top-frameworks',
21
- targetName: 'examples/top-frameworks',
22
- path: 'examples/top-frameworks',
23
- },
24
- {
25
- id: 'teambit.analytics/examples/top-members',
26
- targetName: 'examples/top-members',
27
- path: 'examples/top-members',
28
- },
29
- ];
30
- },
31
- };
@@ -1,26 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { parse } from 'comment-json';
3
- import { generateFiles as generateCommonFiles } from '../workspace-common';
4
- import { DEFAULT_SCOPE_NAME } from '../workspace-common/constants';
5
-
6
- export const reactWorkspaceAppTemplate: WorkspaceTemplate = {
7
- name: 'react-app',
8
- description: 'EXPERIMENTAL. react workspace for an app',
9
- hidden: true,
10
- appName: 'my-app',
11
- generateFiles: async (context: WorkspaceContext) => {
12
- const scope = context.defaultScope || DEFAULT_SCOPE_NAME;
13
- const extensions = {
14
- [`${scope}/apps/my-app`]: parse(`{}`),
15
- };
16
- return generateCommonFiles(context, extensions);
17
- },
18
- fork: () => {
19
- return [
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' },
24
- ];
25
- },
26
- };
@@ -1,25 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { generateFiles as generateCommonFiles } from '../workspace-common';
3
-
4
- export const reactWorkspaceBlogTemplate: WorkspaceTemplate = {
5
- name: 'react-blog',
6
- description: 'React workspace with components for a Blog',
7
- generateFiles: async (context: WorkspaceContext) => {
8
- return generateCommonFiles(context);
9
- },
10
- fork: () => {
11
- return [
12
- {
13
- id: 'teambit.blog/starter/starter-blog',
14
- targetName: 'starter/starter-blog',
15
- path: 'starter/starter-blog',
16
- },
17
- { id: 'teambit.blog/blog', targetName: 'blog', path: 'blog' },
18
- {
19
- id: 'teambit.blog/starter/blog-posts/post-one',
20
- targetName: 'blog-posts/post-one',
21
- path: 'blog-posts/post-one',
22
- },
23
- ];
24
- },
25
- };
@@ -1,35 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { generateFiles as generateCommonFiles } from '../workspace-common';
3
-
4
- export const reactWorkspaceDataFetchingTemplate: WorkspaceTemplate = {
5
- name: 'react-data-fetching',
6
- description: 'React workspace with components to show data fetching',
7
- generateFiles: async (context: WorkspaceContext) => {
8
- return generateCommonFiles(context);
9
- },
10
- fork: () => {
11
- return [
12
- {
13
- id: 'learn-bit-react.data-fetching/pages/books-page',
14
- targetName: 'pages/books-page',
15
- path: 'pages/books-page',
16
- },
17
- {
18
- id: 'learn-bit-react.data-fetching/ui/hooks/use-books',
19
- targetName: 'ui/hooks/use-books',
20
- path: 'ui/hooks/use-books',
21
- },
22
- { id: 'learn-bit-react.data-fetching/ui/book', targetName: 'ui/book', path: 'ui/book' },
23
- {
24
- id: 'learn-bit-react.data-fetching/ui/book-list',
25
- targetName: 'ui/book-list',
26
- path: 'ui/book-list',
27
- },
28
- {
29
- id: 'learn-bit-react.data-fetching/models/book',
30
- targetName: 'models/book',
31
- path: 'models/book',
32
- },
33
- ];
34
- },
35
- };
@@ -1,28 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { generateFiles as generateCommonFiles } from '../workspace-common';
3
-
4
- export const deprecatedReactWorkspaceTemplate: WorkspaceTemplate = {
5
- name: 'react-workspace',
6
- description: 'React workspace with demo components',
7
- hidden: true,
8
- generateFiles: async (context: WorkspaceContext) => {
9
- return generateCommonFiles(context);
10
- },
11
- fork: () => {
12
- return [
13
- {
14
- id: 'teambit.react/templates/envs/my-react',
15
- targetName: 'envs/my-react',
16
- path: 'demo/envs/my-react',
17
- },
18
- { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },
19
- { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },
20
- { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },
21
- {
22
- id: 'teambit.react/templates/pages/welcome',
23
- targetName: 'pages/welcome',
24
- path: 'demo/pages/welcome',
25
- },
26
- ];
27
- },
28
- };
@@ -1,37 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { generateFiles as generateCommonFiles } from '../workspace-common';
3
-
4
- export const reactWorkspaceDesignSystemTemplate: WorkspaceTemplate = {
5
- name: 'react-design-system',
6
- description: 'React workspace with components for a Design System',
7
- generateFiles: async (context: WorkspaceContext) => {
8
- return generateCommonFiles(context);
9
- },
10
- fork: () => {
11
- return [
12
- {
13
- id: 'teambit.design/examples/sample-app',
14
- targetName: 'app/sample-app',
15
- path: 'app/sample-app',
16
- },
17
- { id: 'teambit.design/ui/cards/card', targetName: 'ui/cards/card', path: 'ui/cards/card' },
18
- { id: 'teambit.design/ui/heading', targetName: 'ui/heading', path: 'ui/heading' },
19
- { id: 'teambit.design/themes/theme-toggler', targetName: 'themes/theme-toggler', path: 'themes/theme-toggler' },
20
- {
21
- id: 'teambit.design/themes/base-theme',
22
- targetName: 'themes/base-theme',
23
- path: 'themes/base-theme',
24
- },
25
- {
26
- id: 'teambit.design/themes/light-theme',
27
- targetName: 'themes/light-theme',
28
- path: 'themes/light-theme',
29
- },
30
- {
31
- id: 'teambit.design/themes/dark-theme',
32
- targetName: 'themes/dark-theme',
33
- path: 'themes/dark-theme',
34
- },
35
- ];
36
- },
37
- };
@@ -1,21 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { generateFiles as generateCommonFiles } from '../workspace-common';
3
-
4
- export const reactWorkspaceLibTemplate: WorkspaceTemplate = {
5
- name: 'react-lib',
6
- description: 'EXPERIMENTAL. react workspace for a component library',
7
- hidden: true,
8
- generateFiles: async (context: WorkspaceContext) => {
9
- return generateCommonFiles(context);
10
- },
11
- fork: () => {
12
- return [
13
- { id: 'teambit.react/templates/envs/my-react', targetName: 'envs/my-react', path: 'demo/envs/my-react' },
14
- { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },
15
- { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },
16
- { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },
17
- { id: 'teambit.react/templates/styles/colors', targetName: 'styles/colors', path: 'demo/styles/colors' },
18
- { id: 'teambit.react/templates/themes/theme', targetName: 'themes/theme', path: 'demo/themes/theme' },
19
- ];
20
- },
21
- };
@@ -1,27 +0,0 @@
1
- import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';
2
- import { generateFiles as generateCommonFiles } from '../workspace-common';
3
-
4
- export const reactWorkspaceWikiTemplate: WorkspaceTemplate = {
5
- name: 'react-wiki',
6
- description: 'React workspace with components for a Wiki',
7
- generateFiles: async (context: WorkspaceContext) => {
8
- return generateCommonFiles(context);
9
- },
10
- fork: () => {
11
- return [
12
- {
13
- id: 'teambit.wiki/apps/wiki',
14
- targetName: 'apps/wiki',
15
- path: 'apps/wiki',
16
- },
17
- { id: 'teambit.wiki/sections/wiki', targetName: 'sections/wiki', path: 'sections/wiki' },
18
- { id: 'teambit.wiki/blocks/header', targetName: 'blocks/header', path: 'blocks/header' },
19
- { id: 'teambit.wiki/blocks/footer', targetName: 'blocks/footer', path: 'blocks/footer' },
20
- {
21
- id: 'teambit.wiki/content/welcome',
22
- targetName: 'content/welcome',
23
- path: 'content/welcome',
24
- },
25
- ];
26
- },
27
- };
@@ -1 +0,0 @@
1
- export const DEFAULT_SCOPE_NAME = 'my-org.my-scope';
@@ -1,6 +0,0 @@
1
- export const eslintConfig = `module.exports = {
2
- extends: ['@teambit/eslint-config-bit-react'],
3
- parserOptions: {
4
- project: './tsconfig.json'
5
- },
6
- }`;
@@ -1,113 +0,0 @@
1
- export function gitIgnore() {
2
- return `# Bit
3
- .bit
4
- public
5
-
6
- # Logs
7
- logs
8
- *.log
9
- npm-debug.log*
10
- yarn-debug.log*
11
- yarn-error.log*
12
- lerna-debug.log*
13
-
14
- # Diagnostic reports (https://nodejs.org/api/report.html)
15
- report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
16
-
17
- # Runtime data
18
- pids
19
- *.pid
20
- *.seed
21
- *.pid.lock
22
-
23
- # Directory for instrumented libs generated by jscoverage/JSCover
24
- lib-cov
25
-
26
- # Coverage directory used by tools like istanbul
27
- coverage
28
- *.lcov
29
-
30
- # nyc test coverage
31
- .nyc_output
32
-
33
- # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
34
- .grunt
35
-
36
- # Bower dependency directory (https://bower.io/)
37
- bower_components
38
-
39
- # node-waf configuration
40
- .lock-wscript
41
-
42
- # Compiled binary addons (https://nodejs.org/api/addons.html)
43
- build/Release
44
-
45
- # Dependency directories
46
- node_modules/
47
- jspm_packages/
48
-
49
- # TypeScript v1 declaration files
50
- typings/
51
-
52
- # TypeScript cache
53
- *.tsbuildinfo
54
-
55
- # Optional npm cache directory
56
- .npm
57
-
58
- # Optional eslint cache
59
- .eslintcache
60
-
61
- # Microbundle cache
62
- .rpt2_cache/
63
- .rts2_cache_cjs/
64
- .rts2_cache_es/
65
- .rts2_cache_umd/
66
-
67
- # Optional REPL history
68
- .node_repl_history
69
-
70
- # Output of 'npm pack'
71
- *.tgz
72
-
73
- # Yarn Integrity file
74
- .yarn-integrity
75
-
76
- # dotenv environment variables file
77
- .env
78
- .env.test
79
-
80
- # parcel-bundler cache (https://parceljs.org/)
81
- .cache
82
-
83
- # Next.js build output
84
- .next
85
-
86
- # Nuxt.js build / generate output
87
- .nuxt
88
- dist
89
-
90
- # Gatsby files
91
- .cache/
92
-
93
- # vuepress build output
94
- .vuepress/dist
95
-
96
- # Serverless directories
97
- .serverless/
98
-
99
- # FuseBox cache
100
- .fusebox/
101
-
102
- # DynamoDB Local files
103
- .dynamodb/
104
-
105
- # TernJS port file
106
- .tern-port
107
-
108
- .history
109
-
110
- .DS_Store
111
-
112
- `;
113
- }
@@ -1,30 +0,0 @@
1
- import { WorkspaceContext } from '@teambit/generator';
2
-
3
- export function launchJson({ defaultScope }: WorkspaceContext) {
4
- const scopedRegistry = defaultScope ? `@${defaultScope.split('.')[0]}` : '@my-org';
5
- return `{
6
- // Use IntelliSense to learn about possible attributes.
7
- // Hover to view descriptions of existing attributes.
8
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
9
- "version": "0.2.0",
10
- "configurations": [
11
- {
12
- "type": "node",
13
- "request": "launch",
14
- "name": "test",
15
- "program": "\${workspaceFolder}/node_modules/@teambit/bit/dist/app.js",
16
- "args": ["test"],
17
- "resolveSourceMapLocations": [
18
- "\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js"
19
- ],
20
- "outFiles": [
21
- "\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js"
22
- ],
23
- "console": "integratedTerminal",
24
- "sourceMaps": true,
25
- "internalConsoleOptions": "neverOpen",
26
- "cwd": "\${workspaceFolder}"
27
- }
28
- ]
29
- }`;
30
- }
@@ -1,5 +0,0 @@
1
- export const prettierConfig = `const baseConfig = require("@teambit/react/prettier/prettier.config");
2
- module.exports = {
3
- ...baseConfig,
4
- };
5
- `;