@teambit/node 1.0.40 → 1.0.42

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 (162) hide show
  1. package/artifacts/env-template/public/{29.945e5ad7423216520f6d.js → 29.ddc7bc194190fac98e8b.js} +20 -20
  2. package/artifacts/env-template/public/{238.64be32cc6d4bc396b35e.js → 293.4bce474b96c9eb955917.js} +4 -4
  3. package/artifacts/env-template/public/assets-manifest.json +14 -14
  4. package/artifacts/env-template/public/{compositions.fd774b98e59910148ac6.js → compositions.87d6238bc3f9ad09db15.js} +1 -1
  5. package/artifacts/env-template/public/compositions.html +1 -1
  6. package/artifacts/env-template/public/{overview.2edc07f05db427fa3bdf.js → overview.4bebd06a33f1cc723194.js} +1 -1
  7. package/artifacts/env-template/public/overview.html +1 -1
  8. package/artifacts/env-template/public/{peers.92afb126be0c753a3492.js → peers.f9dd17dc213c6e0d0102.js} +1 -1
  9. package/artifacts/env-template/public/{preview-root.983463c786334e1fbaf1.js → preview-root.3b62d04b3a7f234bd8ca.js} +1 -1
  10. package/artifacts/env-template/public/static/css/{29.a9958296.css → 29.1c2448c7.css} +1 -1
  11. package/dist/node.aspect.js +2 -4
  12. package/dist/node.aspect.js.map +1 -1
  13. package/dist/node.env.js +1 -2
  14. package/dist/node.env.js.map +1 -1
  15. package/dist/node.main.runtime.d.ts +6 -3
  16. package/dist/node.main.runtime.js +21 -25
  17. package/dist/node.main.runtime.js.map +1 -1
  18. package/dist/node.templates.d.ts +3 -0
  19. package/dist/node.templates.js +33 -0
  20. package/dist/node.templates.js.map +1 -0
  21. package/dist/node.ui.runtime.js +1 -2
  22. package/dist/node.ui.runtime.js.map +1 -1
  23. package/dist/{preview-1698930721010.js → preview-1699364645970.js} +2 -2
  24. package/package.json +23 -20
  25. package/dist/templates/entity/index.d.ts +0 -0
  26. package/dist/templates/entity/index.js +0 -3
  27. package/dist/templates/entity/index.js.map +0 -1
  28. package/dist/templates/express-app/files/app-root.d.ts +0 -5
  29. package/dist/templates/express-app/files/app-root.js +0 -39
  30. package/dist/templates/express-app/files/app-root.js.map +0 -1
  31. package/dist/templates/express-app/files/composition.d.ts +0 -5
  32. package/dist/templates/express-app/files/composition.js +0 -20
  33. package/dist/templates/express-app/files/composition.js.map +0 -1
  34. package/dist/templates/express-app/files/doc.d.ts +0 -5
  35. package/dist/templates/express-app/files/doc.js +0 -35
  36. package/dist/templates/express-app/files/doc.js.map +0 -1
  37. package/dist/templates/express-app/files/get-port.d.ts +0 -4
  38. package/dist/templates/express-app/files/get-port.js +0 -21
  39. package/dist/templates/express-app/files/get-port.js.map +0 -1
  40. package/dist/templates/express-app/files/index.d.ts +0 -6
  41. package/dist/templates/express-app/files/index.js +0 -17
  42. package/dist/templates/express-app/files/index.js.map +0 -1
  43. package/dist/templates/express-app/files/mock-route.d.ts +0 -4
  44. package/dist/templates/express-app/files/mock-route.js +0 -23
  45. package/dist/templates/express-app/files/mock-route.js.map +0 -1
  46. package/dist/templates/express-app/files/node-app.d.ts +0 -5
  47. package/dist/templates/express-app/files/node-app.js +0 -23
  48. package/dist/templates/express-app/files/node-app.js.map +0 -1
  49. package/dist/templates/express-app/files/route.d.ts +0 -4
  50. package/dist/templates/express-app/files/route.js +0 -29
  51. package/dist/templates/express-app/files/route.js.map +0 -1
  52. package/dist/templates/express-app/files/test.d.ts +0 -5
  53. package/dist/templates/express-app/files/test.js +0 -19
  54. package/dist/templates/express-app/files/test.js.map +0 -1
  55. package/dist/templates/express-app/index.d.ts +0 -2
  56. package/dist/templates/express-app/index.js +0 -79
  57. package/dist/templates/express-app/index.js.map +0 -1
  58. package/dist/templates/express-route/files/composition.d.ts +0 -5
  59. package/dist/templates/express-route/files/composition.js +0 -20
  60. package/dist/templates/express-route/files/composition.js.map +0 -1
  61. package/dist/templates/express-route/files/doc.d.ts +0 -5
  62. package/dist/templates/express-route/files/doc.js +0 -24
  63. package/dist/templates/express-route/files/doc.js.map +0 -1
  64. package/dist/templates/express-route/files/index.d.ts +0 -6
  65. package/dist/templates/express-route/files/index.js +0 -16
  66. package/dist/templates/express-route/files/index.js.map +0 -1
  67. package/dist/templates/express-route/files/main.d.ts +0 -5
  68. package/dist/templates/express-route/files/main.js +0 -21
  69. package/dist/templates/express-route/files/main.js.map +0 -1
  70. package/dist/templates/express-route/files/test.d.ts +0 -5
  71. package/dist/templates/express-route/files/test.js +0 -19
  72. package/dist/templates/express-route/files/test.js.map +0 -1
  73. package/dist/templates/express-route/index.d.ts +0 -2
  74. package/dist/templates/express-route/index.js +0 -51
  75. package/dist/templates/express-route/index.js.map +0 -1
  76. package/dist/templates/node/files/composition.d.ts +0 -5
  77. package/dist/templates/node/files/composition.js +0 -20
  78. package/dist/templates/node/files/composition.js.map +0 -1
  79. package/dist/templates/node/files/doc.d.ts +0 -5
  80. package/dist/templates/node/files/doc.js +0 -24
  81. package/dist/templates/node/files/doc.js.map +0 -1
  82. package/dist/templates/node/files/index.d.ts +0 -6
  83. package/dist/templates/node/files/index.js +0 -16
  84. package/dist/templates/node/files/index.js.map +0 -1
  85. package/dist/templates/node/files/main.d.ts +0 -5
  86. package/dist/templates/node/files/main.js +0 -17
  87. package/dist/templates/node/files/main.js.map +0 -1
  88. package/dist/templates/node/files/test.d.ts +0 -5
  89. package/dist/templates/node/files/test.js +0 -19
  90. package/dist/templates/node/files/test.js.map +0 -1
  91. package/dist/templates/node/index.d.ts +0 -2
  92. package/dist/templates/node/index.js +0 -58
  93. package/dist/templates/node/index.js.map +0 -1
  94. package/dist/templates/node-env/files/aspect.d.ts +0 -2
  95. package/dist/templates/node-env/files/aspect.js +0 -19
  96. package/dist/templates/node-env/files/aspect.js.map +0 -1
  97. package/dist/templates/node-env/files/doc.d.ts +0 -2
  98. package/dist/templates/node-env/files/doc.js +0 -187
  99. package/dist/templates/node-env/files/doc.js.map +0 -1
  100. package/dist/templates/node-env/files/index.d.ts +0 -2
  101. package/dist/templates/node-env/files/index.js +0 -19
  102. package/dist/templates/node-env/files/index.js.map +0 -1
  103. package/dist/templates/node-env/files/jest.config.d.ts +0 -1
  104. package/dist/templates/node-env/files/jest.config.js +0 -29
  105. package/dist/templates/node-env/files/jest.config.js.map +0 -1
  106. package/dist/templates/node-env/files/main.runtime.d.ts +0 -2
  107. package/dist/templates/node-env/files/main.runtime.js +0 -104
  108. package/dist/templates/node-env/files/main.runtime.js.map +0 -1
  109. package/dist/templates/node-env/files/preview.runtime.d.ts +0 -2
  110. package/dist/templates/node-env/files/preview.runtime.js +0 -37
  111. package/dist/templates/node-env/files/preview.runtime.js.map +0 -1
  112. package/dist/templates/node-env/files/typescript/styles.d.ts +0 -1
  113. package/dist/templates/node-env/files/typescript/styles.js +0 -15
  114. package/dist/templates/node-env/files/typescript/styles.js.map +0 -1
  115. package/dist/templates/node-env/files/typescript/ts-transformer.d.ts +0 -1
  116. package/dist/templates/node-env/files/typescript/ts-transformer.js +0 -58
  117. package/dist/templates/node-env/files/typescript/ts-transformer.js.map +0 -1
  118. package/dist/templates/node-env/files/typescript/typescript.config.d.ts +0 -1
  119. package/dist/templates/node-env/files/typescript/typescript.config.js +0 -29
  120. package/dist/templates/node-env/files/typescript/typescript.config.js.map +0 -1
  121. package/dist/templates/node-env/files/webpack.config.d.ts +0 -1
  122. package/dist/templates/node-env/files/webpack.config.js +0 -56
  123. package/dist/templates/node-env/files/webpack.config.js.map +0 -1
  124. package/dist/templates/node-env/index.d.ts +0 -2
  125. package/dist/templates/node-env/index.js +0 -124
  126. package/dist/templates/node-env/index.js.map +0 -1
  127. package/templates/entity/index.ts +0 -0
  128. package/templates/express-app/files/app-root.ts +0 -33
  129. package/templates/express-app/files/composition.ts +0 -14
  130. package/templates/express-app/files/doc.ts +0 -26
  131. package/templates/express-app/files/get-port.ts +0 -13
  132. package/templates/express-app/files/index.ts +0 -11
  133. package/templates/express-app/files/mock-route.ts +0 -15
  134. package/templates/express-app/files/node-app.ts +0 -17
  135. package/templates/express-app/files/route.ts +0 -21
  136. package/templates/express-app/files/test.ts +0 -13
  137. package/templates/express-app/index.ts +0 -35
  138. package/templates/express-route/files/composition.ts +0 -14
  139. package/templates/express-route/files/doc.ts +0 -18
  140. package/templates/express-route/files/index.ts +0 -10
  141. package/templates/express-route/files/main.ts +0 -15
  142. package/templates/express-route/files/test.ts +0 -13
  143. package/templates/express-route/index.ts +0 -27
  144. package/templates/node/files/composition.ts +0 -14
  145. package/templates/node/files/doc.ts +0 -18
  146. package/templates/node/files/index.ts +0 -10
  147. package/templates/node/files/main.ts +0 -11
  148. package/templates/node/files/test.ts +0 -13
  149. package/templates/node/index.ts +0 -21
  150. package/templates/node-env/files/aspect.ts +0 -10
  151. package/templates/node-env/files/doc.ts +0 -178
  152. package/templates/node-env/files/index.ts +0 -10
  153. package/templates/node-env/files/jest.config.ts +0 -21
  154. package/templates/node-env/files/main.runtime.ts +0 -95
  155. package/templates/node-env/files/preview.runtime.ts +0 -27
  156. package/templates/node-env/files/typescript/styles.ts +0 -7
  157. package/templates/node-env/files/typescript/ts-transformer.ts +0 -50
  158. package/templates/node-env/files/typescript/typescript.config.ts +0 -21
  159. package/templates/node-env/files/webpack.config.ts +0 -48
  160. package/templates/node-env/index.ts +0 -68
  161. /package/{compositions-1698930721010.js → compositions-1699364645970.js} +0 -0
  162. /package/{overview-1698930721010.js → overview-1699364645970.js} +0 -0
@@ -1,187 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.docFile = docFile;
7
- function docFile({
8
- name,
9
- componentId
10
- }) {
11
- return `---
12
- description: 'A standard Node component development environment'
13
- labels: ['node', 'typescript', 'env', 'extension']
14
- ---
15
-
16
- ## Overview
17
-
18
- A customized version which extends the default Node component development environment created by teambit.
19
-
20
- This environment can be applied to all your components or a set of components via the command \`bit env set <pattern or component_id> ${componentId}\`, or under the variants of your \`workspace.json\` file.
21
- That means they will use your custom environment instead of the default environment. Environment components are just like any other Bit components in that they can be
22
- exported and then shared and used in various projects which makes it easier to create standards when working with many teams.
23
-
24
- ### Usage instructions
25
-
26
- #### Recommended usage:
27
-
28
- Run the command \`bit env set <"pattern" or component_id> ${componentId}\` where the pattern is a glob pattern to select multiple components. This will put the env
29
- config in your component's entry in the \`.bitmap\` file.
30
-
31
- :::Note - this will override any variants policy that tries to set an env for this component in the workspace.jsonc
32
- :::
33
-
34
- #### Alternative Usage
35
- Under the **variant** section of your \`workspace.json\` file choose which components you want to have the custom environment set. You can find the id of the extension in the \`${name}.aspect.ts\` file.
36
-
37
- \`\`\`json
38
- {
39
- "teambit.workspace/variants": {
40
- "{ui/**}, {pages/**}": {
41
- "${componentId}": {}
42
- }
43
- }
44
- }
45
- \`\`\`
46
-
47
- This usage may be deprecated in future in favour of the recommended usage above
48
-
49
- ## Runtime Configurations
50
-
51
- Extend the \`main.runtime\` file when you want to add custom configurations at runtime.
52
-
53
- ### Compilation
54
-
55
- By default, Component compilation is done with the TypeScript compiler. Target format is \`ES2015\` which
56
- supports execution from both NodeJS and browser runtimes for server-side rendering. You can modify the \`tsconfig.json\` file to add your own compiler options which will then be merged with the default configs set by teambit.
57
-
58
- Example:
59
-
60
- \`\`\`json
61
- {
62
- "compilerOptions": {
63
- "target": "es2017",
64
- "module": "es2015",
65
- "moduleResolution": "node",
66
- "lib": ["es2017", "dom"],
67
- "experimentalDecorators": true,
68
- "esModuleInterop": true,
69
- "outDir": "dist",
70
- "sourceMap": true,
71
- "emitDecoratorMetadata": true,
72
- "allowJs": true,
73
- "baseUrl": ".",
74
- "jsx": "react"
75
- }
76
- }
77
- \`\`\`
78
-
79
- ### Testing
80
-
81
- Component testing is done through [Jest](https://jestjs.io/) with the default \`teambit.react/react\` environment. You can modify the \`jestconfig.js\` file to add your own configurations which will then be merged with the default configs set by teambit.
82
-
83
- Example:
84
-
85
- To Override the Jest config to ignore transpiling from specific folders add this to the \`jestconfig.js\` file:
86
-
87
- \`\`\`js
88
- const reactJestConfig = require('@teambit/react/jest/jest.config');
89
- module.exports = {
90
- ...reactJestConfig,
91
- transformIgnorePatterns: ['/node_modules/(?!(prop-types|@teambit))']
92
- };
93
- \`\`\`
94
-
95
- ### Webpack
96
-
97
- Bit uses webpack 5 to bundle components. You can modify the \`webpack.config.js\` file to add your own configurations which will then be merged with the default configs set by teambit.
98
-
99
- Example:
100
-
101
- \`\`\`ts
102
- module.exports = {
103
- module: {
104
- // add your custom rules here
105
- rules: []
106
- }
107
- };
108
- \`\`\`
109
-
110
- ### ESLint
111
-
112
- Bit uses ESLint to lint your components. You can add your own rules in the \`${name}.main.runtime\` file.
113
-
114
- Example:
115
-
116
- \`\`\`ts
117
- react.useEslint({
118
- transformers: [
119
- (config) => {
120
- config.setRule('no-console', ['error']);
121
- // add more rules here
122
- return config;
123
- }
124
- ]
125
- }),
126
- \`\`\`
127
-
128
- To use ESLint:
129
-
130
- \`\`\`bash
131
- bit lint
132
- bit lint --fix
133
- \`\`\`
134
-
135
- ### Formatting
136
-
137
- Bit uses Prettier to format your components. You can add your own rules in the \`${name}.main.runtime\` file.
138
-
139
- Example:
140
-
141
- \`\`\`ts
142
- react.usePrettier({
143
- transformers: [
144
- (config) => {
145
- config.setKey('tabWidth', 2);
146
- // add more rules here
147
- return config;
148
- }
149
- ]
150
- }),
151
- \`\`\`
152
-
153
- To use Prettier:
154
-
155
- \`\`\`bash
156
- bit format --check
157
- bit format
158
- \`\`\`
159
-
160
- ### Dependencies
161
-
162
- Override the default dependencies in the \`${name}.main.runtime\` file to include react types of a different version for example.
163
-
164
- \`\`\`ts
165
- react.overrideDependencies({
166
- devDependencies: {
167
- '@types/react': '17.0.3'
168
- }
169
- });
170
- \`\`\`
171
-
172
- ## Preview Configurations
173
-
174
- Extend the \`${name}.preview.runtime\` file when you want to add your own customizations only for previewing in the Bit UI.
175
-
176
- ### Adding a Theme
177
-
178
- A custom theme has been added to the env which wraps all the composition files with the required theme so they can be developed with the correct themeing rather than the browsers default. This is added only in the preview runtime and not in the main runtime meaning it is only applied to compositions and not when consuming components. Adding a theme when consuming should be done at App level as you component may be consumed in various apps and have different themes applied depending on where it is consumed.
179
-
180
- Example:
181
-
182
- \`\`\`ts
183
- react.registerProvider([ThemeCompositions]);
184
- `;
185
- }
186
-
187
- //# sourceMappingURL=doc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["docFile","name","componentId"],"sources":["doc.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function docFile({ name, componentId }: ComponentContext) {\n return `---\ndescription: 'A standard Node component development environment'\nlabels: ['node', 'typescript', 'env', 'extension']\n---\n\n## Overview\n\nA customized version which extends the default Node component development environment created by teambit.\n\nThis environment can be applied to all your components or a set of components via the command \\`bit env set <pattern or component_id> ${componentId}\\`, or under the variants of your \\`workspace.json\\` file.\nThat means they will use your custom environment instead of the default environment. Environment components are just like any other Bit components in that they can be\nexported and then shared and used in various projects which makes it easier to create standards when working with many teams.\n\n### Usage instructions\n\n#### Recommended usage:\n\nRun the command \\`bit env set <\"pattern\" or component_id> ${componentId}\\` where the pattern is a glob pattern to select multiple components. This will put the env\nconfig in your component's entry in the \\`.bitmap\\` file.\n\n:::Note - this will override any variants policy that tries to set an env for this component in the workspace.jsonc\n:::\n\n#### Alternative Usage\nUnder the **variant** section of your \\`workspace.json\\` file choose which components you want to have the custom environment set. You can find the id of the extension in the \\`${name}.aspect.ts\\` file.\n\n\\`\\`\\`json\n{\n \"teambit.workspace/variants\": {\n \"{ui/**}, {pages/**}\": {\n \"${componentId}\": {}\n }\n }\n}\n\\`\\`\\`\n\nThis usage may be deprecated in future in favour of the recommended usage above\n\n## Runtime Configurations\n\nExtend the \\`main.runtime\\` file when you want to add custom configurations at runtime.\n\n### Compilation\n\nBy default, Component compilation is done with the TypeScript compiler. Target format is \\`ES2015\\` which\nsupports execution from both NodeJS and browser runtimes for server-side rendering. You can modify the \\`tsconfig.json\\` file to add your own compiler options which will then be merged with the default configs set by teambit.\n\nExample:\n\n\\`\\`\\`json\n{\n \"compilerOptions\": {\n \"target\": \"es2017\",\n \"module\": \"es2015\",\n \"moduleResolution\": \"node\",\n \"lib\": [\"es2017\", \"dom\"],\n \"experimentalDecorators\": true,\n \"esModuleInterop\": true,\n \"outDir\": \"dist\",\n \"sourceMap\": true,\n \"emitDecoratorMetadata\": true,\n \"allowJs\": true,\n \"baseUrl\": \".\",\n \"jsx\": \"react\"\n }\n}\n\\`\\`\\`\n\n### Testing\n\nComponent testing is done through [Jest](https://jestjs.io/) with the default \\`teambit.react/react\\` environment. You can modify the \\`jestconfig.js\\` file to add your own configurations which will then be merged with the default configs set by teambit.\n\nExample:\n\nTo Override the Jest config to ignore transpiling from specific folders add this to the \\`jestconfig.js\\` file:\n\n\\`\\`\\`js\nconst reactJestConfig = require('@teambit/react/jest/jest.config');\nmodule.exports = {\n ...reactJestConfig,\n transformIgnorePatterns: ['/node_modules/(?!(prop-types|@teambit))']\n};\n\\`\\`\\`\n\n### Webpack\n\nBit uses webpack 5 to bundle components. You can modify the \\`webpack.config.js\\` file to add your own configurations which will then be merged with the default configs set by teambit.\n\nExample:\n\n\\`\\`\\`ts\nmodule.exports = {\n module: {\n // add your custom rules here\n rules: []\n }\n};\n\\`\\`\\`\n\n### ESLint\n\nBit uses ESLint to lint your components. You can add your own rules in the \\`${name}.main.runtime\\` file.\n\nExample:\n\n\\`\\`\\`ts\nreact.useEslint({\n transformers: [\n (config) => {\n config.setRule('no-console', ['error']);\n // add more rules here\n return config;\n }\n ]\n}),\n\\`\\`\\`\n\nTo use ESLint:\n\n\\`\\`\\`bash\nbit lint\nbit lint --fix\n\\`\\`\\`\n\n### Formatting\n\nBit uses Prettier to format your components. You can add your own rules in the \\`${name}.main.runtime\\` file.\n\nExample:\n\n\\`\\`\\`ts\nreact.usePrettier({\n transformers: [\n (config) => {\n config.setKey('tabWidth', 2);\n // add more rules here\n return config;\n }\n ]\n}),\n\\`\\`\\`\n\nTo use Prettier:\n\n\\`\\`\\`bash\nbit format --check\nbit format\n\\`\\`\\`\n\n### Dependencies\n\nOverride the default dependencies in the \\`${name}.main.runtime\\` file to include react types of a different version for example.\n\n\\`\\`\\`ts\nreact.overrideDependencies({\n devDependencies: {\n '@types/react': '17.0.3'\n }\n});\n\\`\\`\\`\n\n## Preview Configurations\n\nExtend the \\`${name}.preview.runtime\\` file when you want to add your own customizations only for previewing in the Bit UI.\n\n### Adding a Theme\n\nA custom theme has been added to the env which wraps all the composition files with the required theme so they can be developed with the correct themeing rather than the browsers default. This is added only in the preview runtime and not in the main runtime meaning it is only applied to compositions and not when consuming components. Adding a theme when consuming should be done at App level as you component may be consumed in various apps and have different themes applied depending on where it is consumed.\n\nExample:\n\n\\`\\`\\`ts\nreact.registerProvider([ThemeCompositions]);\n`;\n}\n"],"mappings":";;;;;;AAEO,SAASA,OAAOA,CAAC;EAAEC,IAAI;EAAEC;AAA8B,CAAC,EAAE;EAC/D,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wIAAwIA,WAAY;AACpJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4DA,WAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,mLAAmLD,IAAK;AACxL;AACA;AACA;AACA;AACA;AACA,SAASC,WAAY;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+ED,IAAK;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmFA,IAAK;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6CA,IAAK;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeA,IAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD"}
@@ -1,2 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare function indexFile({ namePascalCase: Name, name }: ComponentContext): string;
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.indexFile = indexFile;
7
- function indexFile({
8
- namePascalCase: Name,
9
- name
10
- }) {
11
- return `import { ${Name}Aspect } from './${name}.aspect';
12
-
13
- export type { ${Name}Main } from './${name}.main.runtime';
14
- export default ${Name}Aspect;
15
- export { ${Name}Aspect };
16
- `;
17
- }
18
-
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["indexFile","namePascalCase","Name","name"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function indexFile({ namePascalCase: Name, name }: ComponentContext) {\n return `import { ${Name}Aspect } from './${name}.aspect';\n\nexport type { ${Name}Main } from './${name}.main.runtime';\nexport default ${Name}Aspect;\nexport { ${Name}Aspect };\n`;\n}\n"],"mappings":";;;;;;AAEO,SAASA,SAASA,CAAC;EAAEC,cAAc,EAAEC,IAAI;EAAEC;AAAuB,CAAC,EAAE;EAC1E,OAAQ,YAAWD,IAAK,oBAAmBC,IAAK;AAClD;AACA,gBAAgBD,IAAK,kBAAiBC,IAAK;AAC3C,iBAAiBD,IAAK;AACtB,WAAWA,IAAK;AAChB,CAAC;AACD"}
@@ -1 +0,0 @@
1
- export declare function jestConfigFile(): string;
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.jestConfigFile = jestConfigFile;
7
- function jestConfigFile() {
8
- return `
9
- // Override the Jest config to ignore transpiling from specific folders
10
- // See the base Jest config: https://bit.cloud/teambit/react/react/~code/jest/jest.config.js
11
-
12
- // const reactJestConfig = require('@teambit/react/jest/jest.config');
13
- // uncomment the line below and install the package if you want to use this function
14
- // const {
15
- // generateNodeModulesPattern,
16
- // } = require('@teambit/dependencies.modules.packages-excluder');
17
- // const packagesToExclude = ['@my-org', 'my-package-name'];
18
-
19
- // module.exports = {
20
- // ...reactJestConfig,
21
- // transformIgnorePatterns: [
22
- // '^.+\\.module\\.(css|sass|scss)$',
23
- // generateNodeModulesPattern({ packages: packagesToExclude }),
24
- // ],
25
- // };
26
- `;
27
- }
28
-
29
- //# sourceMappingURL=jest.config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["jestConfigFile"],"sources":["jest.config.ts"],"sourcesContent":["export function jestConfigFile() {\n return `\n // Override the Jest config to ignore transpiling from specific folders\n // See the base Jest config: https://bit.cloud/teambit/react/react/~code/jest/jest.config.js\n\n // const reactJestConfig = require('@teambit/react/jest/jest.config');\n // uncomment the line below and install the package if you want to use this function\n // const {\n // generateNodeModulesPattern,\n // } = require('@teambit/dependencies.modules.packages-excluder');\n // const packagesToExclude = ['@my-org', 'my-package-name'];\n\n // module.exports = {\n // ...reactJestConfig,\n // transformIgnorePatterns: [\n // '^.+\\\\.module\\\\.(css|sass|scss)$',\n // generateNodeModulesPattern({ packages: packagesToExclude }),\n // ],\n // };\n `;\n}\n"],"mappings":";;;;;;AAAO,SAASA,cAAcA,CAAA,EAAG;EAC/B,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH"}
@@ -1,2 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare function mainRuntimeFile({ namePascalCase: Name, name }: ComponentContext): string;
@@ -1,104 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.mainRuntimeFile = mainRuntimeFile;
7
- function mainRuntimeFile({
8
- namePascalCase: Name,
9
- name
10
- }) {
11
- return `import { MainRuntime } from '@teambit/cli';
12
- import { NodeAspect, NodeMain } from '@teambit/node'
13
- import { EnvsAspect, EnvsMain } from '@teambit/envs';
14
- import type { UseTypescriptModifiers, UseWebpackModifiers } from '@teambit/react';
15
- import { ${Name}Aspect } from './${name}.aspect';
16
- //import {
17
- // previewConfigTransformer,
18
- // devServerConfigTransformer
19
- //} from './webpack/webpack-transformers';
20
- //import {
21
- // devConfigTransformer,
22
- // buildConfigTransformer,
23
- //} from "./typescript/ts-transformer";
24
-
25
- export class ${Name}Main {
26
- static slots = [];
27
-
28
- static dependencies = [NodeAspect, EnvsAspect];
29
-
30
- static runtime = MainRuntime;
31
-
32
- static async provider([node, envs]: [NodeMain, EnvsMain]) {
33
-
34
- //const webpackModifiers: UseWebpackModifiers = {
35
- // previewConfig: [previewConfigTransformer],
36
- // devServerConfig: [devServerConfigTransformer],
37
- //};
38
-
39
- //const tsModifiers: UseTypescriptModifiers = {
40
- // devConfig: [devConfigTransformer],
41
- // buildConfig: [buildConfigTransformer],
42
- //};
43
-
44
- const ${Name}Env = node.compose([
45
- /**
46
- * Uncomment to override the config files for TypeScript, Webpack or Jest
47
- * Your config gets merged with the defaults
48
- */
49
-
50
- // node.useTypescript(tsModifiers), // note: this cannot be used in conjunction with node.overrideCompiler
51
- // node.useWebpack(webpackModifiers),
52
- // node.overrideJestConfig(require.resolve('./jest/jest.config')),
53
-
54
- /**
55
- * override the ESLint default config here then check your files for lint errors
56
- * @example
57
- * bit lint
58
- * bit lint --fix
59
- */
60
- node.useEslint({
61
- transformers: [
62
- (config) => {
63
- config.setRule('no-console', ['error']);
64
- return config;
65
- }
66
- ]
67
- }),
68
-
69
- /**
70
- * override the Prettier default config here the check your formatting
71
- * @example
72
- * bit format --check
73
- * bit format
74
- */
75
- node.usePrettier({
76
- transformers: [
77
- (config) => {
78
- config.setKey('tabWidth', 2);
79
- return config;
80
- }
81
- ]
82
- }),
83
-
84
- /**
85
- * override dependencies here
86
- * @example
87
- * Uncomment types to include version 17.0.3 of the types package
88
- */
89
- node.overrideDependencies({
90
- devDependencies: {
91
- // '@types/node': '16.11.7'
92
- }
93
- })
94
- ]);
95
- envs.registerEnv(${Name}Env);
96
- return new ${Name}Main();
97
- }
98
- }
99
-
100
- ${Name}Aspect.addRuntime(${Name}Main);
101
- `;
102
- }
103
-
104
- //# sourceMappingURL=main.runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["mainRuntimeFile","namePascalCase","Name","name"],"sources":["main.runtime.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function mainRuntimeFile({ namePascalCase: Name, name }: ComponentContext) {\n return `import { MainRuntime } from '@teambit/cli';\nimport { NodeAspect, NodeMain } from '@teambit/node'\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport type { UseTypescriptModifiers, UseWebpackModifiers } from '@teambit/react';\nimport { ${Name}Aspect } from './${name}.aspect';\n//import {\n// previewConfigTransformer,\n// devServerConfigTransformer\n//} from './webpack/webpack-transformers';\n//import {\n// devConfigTransformer,\n// buildConfigTransformer,\n//} from \"./typescript/ts-transformer\";\n\nexport class ${Name}Main {\n static slots = [];\n\n static dependencies = [NodeAspect, EnvsAspect];\n\n static runtime = MainRuntime;\n\n static async provider([node, envs]: [NodeMain, EnvsMain]) {\n\n //const webpackModifiers: UseWebpackModifiers = {\n // previewConfig: [previewConfigTransformer],\n // devServerConfig: [devServerConfigTransformer],\n //};\n\n //const tsModifiers: UseTypescriptModifiers = {\n // devConfig: [devConfigTransformer],\n // buildConfig: [buildConfigTransformer],\n //};\n\n const ${Name}Env = node.compose([\n /**\n * Uncomment to override the config files for TypeScript, Webpack or Jest\n * Your config gets merged with the defaults\n */\n\n // node.useTypescript(tsModifiers), // note: this cannot be used in conjunction with node.overrideCompiler\n // node.useWebpack(webpackModifiers),\n // node.overrideJestConfig(require.resolve('./jest/jest.config')),\n\n /**\n * override the ESLint default config here then check your files for lint errors\n * @example\n * bit lint\n * bit lint --fix\n */\n node.useEslint({\n transformers: [\n (config) => {\n config.setRule('no-console', ['error']);\n return config;\n }\n ]\n }),\n\n /**\n * override the Prettier default config here the check your formatting\n * @example\n * bit format --check\n * bit format\n */\n node.usePrettier({\n transformers: [\n (config) => {\n config.setKey('tabWidth', 2);\n return config;\n }\n ]\n }),\n\n /**\n * override dependencies here\n * @example\n * Uncomment types to include version 17.0.3 of the types package\n */\n node.overrideDependencies({\n devDependencies: {\n // '@types/node': '16.11.7'\n }\n })\n ]);\n envs.registerEnv(${Name}Env);\n return new ${Name}Main();\n }\n}\n\n${Name}Aspect.addRuntime(${Name}Main);\n`;\n}\n"],"mappings":";;;;;;AAEO,SAASA,eAAeA,CAAC;EAAEC,cAAc,EAAEC,IAAI;EAAEC;AAAuB,CAAC,EAAE;EAChF,OAAQ;AACV;AACA;AACA;AACA,WAAWD,IAAK,oBAAmBC,IAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeD,IAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAYA,IAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuBA,IAAK;AAC5B,iBAAiBA,IAAK;AACtB;AACA;AACA;AACA,EAAEA,IAAK,qBAAoBA,IAAK;AAChC,CAAC;AACD"}
@@ -1,2 +0,0 @@
1
- import { ComponentContext } from '@teambit/generator';
2
- export declare function previewRuntimeFile({ namePascalCase: Name, nameCamelCase: nameCamel, name }: ComponentContext): string;
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.previewRuntimeFile = previewRuntimeFile;
7
- function previewRuntimeFile({
8
- namePascalCase: Name,
9
- nameCamelCase: nameCamel,
10
- name
11
- }) {
12
- return `import { PreviewRuntime } from '@teambit/preview';
13
- import { ReactAspect, ReactPreview } from '@teambit/react'; // the node env uses the react env's preview feature
14
- // uncomment the line below and install the theme if you want to use our theme or create your own and import it here
15
- // import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
16
-
17
- import { ${Name}Aspect } from './${name}.aspect';
18
-
19
- export class ${Name}PreviewMain {
20
- static runtime = PreviewRuntime;
21
-
22
- static dependencies = [ReactAspect];
23
-
24
- static async provider([react]: [ReactPreview]) {
25
- const ${nameCamel}PreviewMain = new ${Name}PreviewMain();
26
- // uncomment the line below to register a new provider to wrap all compositions using this environment with a custom theme.
27
- // react.registerProvider([ThemeCompositions]);
28
-
29
- return ${nameCamel}PreviewMain;
30
- }
31
- }
32
-
33
- ${Name}Aspect.addRuntime(${Name}PreviewMain);
34
- `;
35
- }
36
-
37
- //# sourceMappingURL=preview.runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["previewRuntimeFile","namePascalCase","Name","nameCamelCase","nameCamel","name"],"sources":["preview.runtime.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function previewRuntimeFile({ namePascalCase: Name, nameCamelCase: nameCamel, name }: ComponentContext) {\n return `import { PreviewRuntime } from '@teambit/preview';\nimport { ReactAspect, ReactPreview } from '@teambit/react'; // the node env uses the react env's preview feature\n// uncomment the line below and install the theme if you want to use our theme or create your own and import it here\n// import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';\n\nimport { ${Name}Aspect } from './${name}.aspect';\n\nexport class ${Name}PreviewMain {\n static runtime = PreviewRuntime;\n\n static dependencies = [ReactAspect];\n\n static async provider([react]: [ReactPreview]) {\n const ${nameCamel}PreviewMain = new ${Name}PreviewMain();\n // uncomment the line below to register a new provider to wrap all compositions using this environment with a custom theme.\n // react.registerProvider([ThemeCompositions]);\n\n return ${nameCamel}PreviewMain;\n }\n}\n\n${Name}Aspect.addRuntime(${Name}PreviewMain);\n`;\n}\n"],"mappings":";;;;;;AAEO,SAASA,kBAAkBA,CAAC;EAAEC,cAAc,EAAEC,IAAI;EAAEC,aAAa,EAAEC,SAAS;EAAEC;AAAuB,CAAC,EAAE;EAC7G,OAAQ;AACV;AACA;AACA;AACA;AACA,WAAWH,IAAK,oBAAmBG,IAAK;AACxC;AACA,eAAeH,IAAK;AACpB;AACA;AACA;AACA;AACA;AACA,YAAYE,SAAU,qBAAoBF,IAAK;AAC/C;AACA;AACA;AACA,aAAaE,SAAU;AACvB;AACA;AACA;AACA,EAAEF,IAAK,qBAAoBA,IAAK;AAChC,CAAC;AACD"}
@@ -1 +0,0 @@
1
- export declare function globalStylesFile(): string;
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.globalStylesFile = globalStylesFile;
7
- function globalStylesFile() {
8
- return `
9
- /*
10
- Add your global styles here to be added for any component using this env
11
- */
12
- `;
13
- }
14
-
15
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["globalStylesFile"],"sources":["styles.ts"],"sourcesContent":["export function globalStylesFile() {\n return `\n /*\n Add your global styles here to be added for any component using this env\n */\n `;\n}\n"],"mappings":";;;;;;AAAO,SAASA,gBAAgBA,CAAA,EAAG;EACjC,OAAQ;AACV;AACA;AACA;AACA,GAAG;AACH"}
@@ -1 +0,0 @@
1
- export declare function tsTransformerFile(): string;
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.tsTransformerFile = tsTransformerFile;
7
- function tsTransformerFile() {
8
- return `
9
- import * as path from 'path';
10
- import {
11
- TsConfigTransformer,
12
- TypescriptConfigMutator,
13
- } from "@teambit/typescript";
14
-
15
- const tsConfig = require('./tsconfig.json');
16
-
17
- export const commonTransformer: TsConfigTransformer = (
18
- config: TypescriptConfigMutator
19
- ) => {
20
- const newConfig = config.addTypes([path.join(__dirname, 'styles.d.ts')])
21
- newConfig.mergeTsConfig(tsConfig);
22
- // Some examples of other built in mutator functions:
23
- //newConfig.addExclude(['someExclude']);
24
- //newConfig.setCompileJs(true)
25
- return newConfig;
26
- };
27
-
28
- /**
29
- * Transformation for the dev config only
30
- * @param config
31
- * @param context
32
- * @returns
33
- */
34
- export const devConfigTransformer: TsConfigTransformer = (
35
- config: TypescriptConfigMutator,
36
- ) => {
37
- const newConfig = commonTransformer(config, {});
38
- return newConfig;
39
- };
40
-
41
- /**
42
- * Transformation for the build only
43
- * @param config
44
- * @param context
45
- * @returns
46
- */
47
- export const buildConfigTransformer: TsConfigTransformer = (
48
- config: TypescriptConfigMutator
49
- ) => {
50
- const newConfig = commonTransformer(config, {});
51
- newConfig.mergeTsConfig(tsConfig);
52
- return newConfig;
53
- };
54
-
55
- `;
56
- }
57
-
58
- //# sourceMappingURL=ts-transformer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["tsTransformerFile"],"sources":["ts-transformer.ts"],"sourcesContent":["export function tsTransformerFile() {\n return `\n import * as path from 'path';\nimport {\n TsConfigTransformer,\n TypescriptConfigMutator,\n} from \"@teambit/typescript\";\n\nconst tsConfig = require('./tsconfig.json');\n\nexport const commonTransformer: TsConfigTransformer = (\n config: TypescriptConfigMutator\n) => {\n const newConfig = config.addTypes([path.join(__dirname, 'styles.d.ts')])\n newConfig.mergeTsConfig(tsConfig);\n // Some examples of other built in mutator functions:\n //newConfig.addExclude(['someExclude']);\n //newConfig.setCompileJs(true)\n return newConfig;\n};\n\n/**\n * Transformation for the dev config only\n * @param config\n * @param context\n * @returns\n */\nexport const devConfigTransformer: TsConfigTransformer = (\n config: TypescriptConfigMutator,\n) => {\n const newConfig = commonTransformer(config, {});\n return newConfig;\n};\n\n/**\n * Transformation for the build only\n * @param config\n * @param context\n * @returns\n */\nexport const buildConfigTransformer: TsConfigTransformer = (\n config: TypescriptConfigMutator\n) => {\n const newConfig = commonTransformer(config, {});\n newConfig.mergeTsConfig(tsConfig);\n return newConfig;\n};\n\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,iBAAiBA,CAAA,EAAG;EAClC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD"}
@@ -1 +0,0 @@
1
- export declare function typescriptConfigFile(): string;
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.typescriptConfigFile = typescriptConfigFile;
7
- function typescriptConfigFile() {
8
- return `{
9
- // add your compiler options here
10
-
11
- "compilerOptions": {
12
- // "target": "es2017",
13
- // "module": "es2015",
14
- // "moduleResolution": "node",
15
- // "lib": ["es2017", "dom"],
16
- // "experimentalDecorators": true,
17
- // "esModuleInterop": true,
18
- // "outDir": "dist",
19
- // "sourceMap": true,
20
- // "emitDecoratorMetadata": true,
21
- // "allowJs": true,
22
- // "baseUrl": ".",
23
- // "jsx": "react"
24
- }
25
- }
26
- `;
27
- }
28
-
29
- //# sourceMappingURL=typescript.config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["typescriptConfigFile"],"sources":["typescript.config.ts"],"sourcesContent":["export function typescriptConfigFile() {\n return `{\n // add your compiler options here\n\n \"compilerOptions\": {\n // \"target\": \"es2017\",\n // \"module\": \"es2015\",\n // \"moduleResolution\": \"node\",\n // \"lib\": [\"es2017\", \"dom\"],\n // \"experimentalDecorators\": true,\n // \"esModuleInterop\": true,\n // \"outDir\": \"dist\",\n // \"sourceMap\": true,\n // \"emitDecoratorMetadata\": true,\n // \"allowJs\": true,\n // \"baseUrl\": \".\",\n // \"jsx\": \"react\"\n }\n}\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,oBAAoBA,CAAA,EAAG;EACrC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD"}
@@ -1 +0,0 @@
1
- export declare function webpackConfigFile(): string;
@@ -1,56 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.webpackConfigFile = webpackConfigFile;
7
- function webpackConfigFile() {
8
- return `
9
- import { WebpackConfigTransformer, WebpackConfigMutator, WebpackConfigTransformContext } from '@teambit/webpack';
10
-
11
- /**
12
- * Transformation to apply for both preview and dev server
13
- * @param config
14
- * @param _context
15
- */
16
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
17
- function commonTransformation(config: WebpackConfigMutator, _context: WebpackConfigTransformContext) {
18
- // Merge config with the webpack.config.js file if you choose to import a module export format config.
19
- // config.merge([webpackConfig]);
20
- // config.addAliases({});
21
- // config.addModuleRule(youRuleHere);
22
- return config;
23
- }
24
-
25
- /**
26
- * Transformation for the preview only
27
- * @param config
28
- * @param context
29
- * @returns
30
- */
31
- export const previewConfigTransformer: WebpackConfigTransformer = (
32
- config: WebpackConfigMutator,
33
- context: WebpackConfigTransformContext
34
- ) => {
35
- const newConfig = commonTransformation(config, context);
36
- return newConfig;
37
- };
38
-
39
- /**
40
- * Transformation for the dev server only
41
- * @param config
42
- * @param context
43
- * @returns
44
- */
45
- export const devServerConfigTransformer: WebpackConfigTransformer = (
46
- config: WebpackConfigMutator,
47
- context: WebpackConfigTransformContext
48
- ) => {
49
- const newConfig = commonTransformation(config, context);
50
- return newConfig;
51
- };
52
-
53
- `;
54
- }
55
-
56
- //# sourceMappingURL=webpack.config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["webpackConfigFile"],"sources":["webpack.config.ts"],"sourcesContent":["export function webpackConfigFile() {\n return `\n import { WebpackConfigTransformer, WebpackConfigMutator, WebpackConfigTransformContext } from '@teambit/webpack';\n\n /**\n * Transformation to apply for both preview and dev server\n * @param config\n * @param _context\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n function commonTransformation(config: WebpackConfigMutator, _context: WebpackConfigTransformContext) {\n // Merge config with the webpack.config.js file if you choose to import a module export format config.\n // config.merge([webpackConfig]);\n // config.addAliases({});\n // config.addModuleRule(youRuleHere);\n return config;\n }\n\n /**\n * Transformation for the preview only\n * @param config\n * @param context\n * @returns\n */\n export const previewConfigTransformer: WebpackConfigTransformer = (\n config: WebpackConfigMutator,\n context: WebpackConfigTransformContext\n ) => {\n const newConfig = commonTransformation(config, context);\n return newConfig;\n };\n\n /**\n * Transformation for the dev server only\n * @param config\n * @param context\n * @returns\n */\n export const devServerConfigTransformer: WebpackConfigTransformer = (\n config: WebpackConfigMutator,\n context: WebpackConfigTransformContext\n ) => {\n const newConfig = commonTransformation(config, context);\n return newConfig;\n };\n\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,iBAAiBA,CAAA,EAAG;EAClC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD"}
@@ -1,2 +0,0 @@
1
- import { ComponentTemplate } from '@teambit/generator';
2
- export declare const nodeEnvTemplate: ComponentTemplate;