@teambit/react 0.0.1109 → 0.0.1110

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 (124) hide show
  1. package/artifacts/env-template/public/{525.60b76f223042311d5e89.js → 383.467873c94ffd6f6dc489.js} +6 -6
  2. package/artifacts/env-template/public/{924.516f9234d940bee08787.js → 924.f496add3c3d5bdf0bc41.js} +19 -19
  3. package/artifacts/env-template/public/assets-manifest.json +14 -14
  4. package/artifacts/env-template/public/{compositions.3934c9fb3cab80d8eefb.js → compositions.c34113c615f1e0c45b99.js} +1 -1
  5. package/artifacts/env-template/public/compositions.html +1 -1
  6. package/artifacts/env-template/public/{overview.dfec8ebc6fd165919647.js → overview.5eecb0f345fb1de4621d.js} +1 -1
  7. package/artifacts/env-template/public/overview.html +1 -1
  8. package/artifacts/env-template/public/{peers.5c03ac9d527f710a7646.js → peers.e874bfb928c26d22e89e.js} +1 -1
  9. package/artifacts/env-template/public/{preview-root.55febf5739db68e5ecff.js → preview-root.b1ea3fdc09f4983f7afd.js} +1 -1
  10. package/artifacts/env-template/public/static/css/924.b8931f51.css +1 -0
  11. package/dist/apps/web/compute-results.js.map +1 -1
  12. package/dist/apps/web/index.js.map +1 -1
  13. package/dist/apps/web/plugins/index.js.map +1 -1
  14. package/dist/apps/web/plugins/prerender.js +4 -1
  15. package/dist/apps/web/plugins/prerender.js.map +1 -1
  16. package/dist/apps/web/react.app-type.js.map +1 -1
  17. package/dist/apps/web/react.application.js.map +1 -1
  18. package/dist/apps/web/ssr/ssr-express.js.map +1 -1
  19. package/dist/apps/web/webpack/mutators.js.map +1 -1
  20. package/dist/apps/web/webpack/webpack.app.ssr.config.js +3 -3
  21. package/dist/apps/web/webpack/webpack.app.ssr.config.js.map +1 -1
  22. package/dist/eslint/eslintrc.js.map +1 -1
  23. package/dist/highlighter-widget.js.map +1 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/jest/index.js.map +1 -1
  26. package/dist/jest/jest.cjs.config.js.map +1 -1
  27. package/dist/jest/jest.esm.config.js.map +1 -1
  28. package/dist/jest/transformers/base-transformer-process.js.map +1 -1
  29. package/dist/jest/transformers/css-transform.js.map +1 -1
  30. package/dist/jest/transformers/file-transform.js.map +1 -1
  31. package/dist/{preview-1689585411475.js → preview-1689736586631.js} +2 -2
  32. package/dist/react.aspect.js.map +1 -1
  33. package/dist/react.composition.js.map +1 -1
  34. package/dist/react.env.js +6 -0
  35. package/dist/react.env.js.map +1 -1
  36. package/dist/react.graphql.js.map +1 -1
  37. package/dist/react.main.runtime.js.map +1 -1
  38. package/dist/react.preview.runtime.js.map +1 -1
  39. package/dist/react.templates.js.map +1 -1
  40. package/dist/react.ui.runtime.js.map +1 -1
  41. package/dist/templates/react-app/files/app-plugin.js.map +1 -1
  42. package/dist/templates/react-app/files/app-root.js.map +1 -1
  43. package/dist/templates/react-app/files/app.js.map +1 -1
  44. package/dist/templates/react-app/files/compositions.js.map +1 -1
  45. package/dist/templates/react-app/files/doc.js.map +1 -1
  46. package/dist/templates/react-app/files/index.js.map +1 -1
  47. package/dist/templates/react-app/index.js.map +1 -1
  48. package/dist/templates/react-component/files/component.js.map +1 -1
  49. package/dist/templates/react-component/files/composition.js.map +1 -1
  50. package/dist/templates/react-component/files/docs.js.map +1 -1
  51. package/dist/templates/react-component/files/index-file.js.map +1 -1
  52. package/dist/templates/react-component/files/test.js.map +1 -1
  53. package/dist/templates/react-component/index.js.map +1 -1
  54. package/dist/templates/react-component-js/files/component.js.map +1 -1
  55. package/dist/templates/react-component-js/files/composition.js.map +1 -1
  56. package/dist/templates/react-component-js/files/docs.js.map +1 -1
  57. package/dist/templates/react-component-js/files/test.js.map +1 -1
  58. package/dist/templates/react-component-js/index.js.map +1 -1
  59. package/dist/templates/react-context/files/composition.js.map +1 -1
  60. package/dist/templates/react-context/files/context-provider.js.map +1 -1
  61. package/dist/templates/react-context/files/context.js.map +1 -1
  62. package/dist/templates/react-context/files/docs.js.map +1 -1
  63. package/dist/templates/react-context/files/index-file.js.map +1 -1
  64. package/dist/templates/react-context/files/test.js.map +1 -1
  65. package/dist/templates/react-context/index.js.map +1 -1
  66. package/dist/templates/react-env/files/aspect.js.map +1 -1
  67. package/dist/templates/react-env/files/doc.js.map +1 -1
  68. package/dist/templates/react-env/files/index.js.map +1 -1
  69. package/dist/templates/react-env/files/jest.config.js.map +1 -1
  70. package/dist/templates/react-env/files/main.runtime.js.map +1 -1
  71. package/dist/templates/react-env/files/preview.runtime.js.map +1 -1
  72. package/dist/templates/react-env/files/typescript/styles.js.map +1 -1
  73. package/dist/templates/react-env/files/typescript/ts-transformer.js.map +1 -1
  74. package/dist/templates/react-env/files/typescript/typescript.config.js.map +1 -1
  75. package/dist/templates/react-env/files/webpack.config.js.map +1 -1
  76. package/dist/templates/react-env/index.js.map +1 -1
  77. package/dist/templates/react-hook/files/component.js.map +1 -1
  78. package/dist/templates/react-hook/files/composition.js.map +1 -1
  79. package/dist/templates/react-hook/files/docs.js.map +1 -1
  80. package/dist/templates/react-hook/files/index-file.js.map +1 -1
  81. package/dist/templates/react-hook/files/index-file.spec.js.map +1 -1
  82. package/dist/templates/react-hook/files/test.js.map +1 -1
  83. package/dist/templates/react-hook/index.js.map +1 -1
  84. package/dist/templates/react-workspace/index.js.map +1 -1
  85. package/dist/templates/react-workspace-analytics/index.js.map +1 -1
  86. package/dist/templates/react-workspace-app/index.js.map +1 -1
  87. package/dist/templates/react-workspace-blog/index.js.map +1 -1
  88. package/dist/templates/react-workspace-data-fetching/index.js.map +1 -1
  89. package/dist/templates/react-workspace-deprecated/index.js.map +1 -1
  90. package/dist/templates/react-workspace-design-system/index.js.map +1 -1
  91. package/dist/templates/react-workspace-lib/index.js.map +1 -1
  92. package/dist/templates/react-workspace-wiki/index.js.map +1 -1
  93. package/dist/templates/workspace-common/constants.js.map +1 -1
  94. package/dist/templates/workspace-common/files/eslint-config.js.map +1 -1
  95. package/dist/templates/workspace-common/files/git-ignore.js.map +1 -1
  96. package/dist/templates/workspace-common/files/launch-json.js.map +1 -1
  97. package/dist/templates/workspace-common/files/prettier-config.js.map +1 -1
  98. package/dist/templates/workspace-common/files/readme-file.js.map +1 -1
  99. package/dist/templates/workspace-common/files/ts-config.js.map +1 -1
  100. package/dist/templates/workspace-common/files/types/asset.js.map +1 -1
  101. package/dist/templates/workspace-common/files/types/style.js.map +1 -1
  102. package/dist/templates/workspace-common/files/workspace-config.js.map +1 -1
  103. package/dist/templates/workspace-common/generate-files.js.map +1 -1
  104. package/dist/templates/workspace-common/index.js.map +1 -1
  105. package/dist/webpack/html.js.map +1 -1
  106. package/dist/webpack/index.js.map +1 -1
  107. package/dist/webpack/overlay/formatWebpackMessages.js.map +1 -1
  108. package/dist/webpack/overlay/webpackHotDevClient.js.map +1 -1
  109. package/dist/webpack/postcss.config.js.map +1 -1
  110. package/dist/webpack/webpack.config.base.js +3 -1
  111. package/dist/webpack/webpack.config.base.js.map +1 -1
  112. package/dist/webpack/webpack.config.base.prod.js.map +1 -1
  113. package/dist/webpack/webpack.config.component.dev.js +0 -1
  114. package/dist/webpack/webpack.config.component.dev.js.map +1 -1
  115. package/dist/webpack/webpack.config.component.prod.js +0 -1
  116. package/dist/webpack/webpack.config.component.prod.js.map +1 -1
  117. package/dist/webpack/webpack.config.env.dev.js.map +1 -1
  118. package/dist/webpack/webpack.config.env.template.js.map +1 -1
  119. package/package-tar/teambit-react-0.0.1110.tgz +0 -0
  120. package/package.json +29 -29
  121. package/artifacts/env-template/public/static/css/924.d7fe792d.css +0 -1
  122. package/package-tar/teambit-react-0.0.1109.tgz +0 -0
  123. /package/{compositions-1689585411475.js → compositions-1689736586631.js} +0 -0
  124. /package/{overview-1689585411475.js → overview-1689736586631.js} +0 -0
@@ -1 +1 @@
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 { ReactAspect, ReactMain, UseTypescriptModifiers } from '@teambit/react';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\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 = [ReactAspect, EnvsAspect];\n\n static runtime = MainRuntime;\n\n static async provider([react, envs]: [ReactMain, 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 = react.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 // react.useTypescript(tsModifiers), // note: this cannot be used in conjunction with react.overrideCompiler\n // react.useWebpack(webpackModifiers),\n // react.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 //react.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 //react.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 react.overrideDependencies({\n devDependencies: {\n // '@types/react': '17.0.3'\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,eAAe,CAAC;EAAEC,cAAc,EAAEC,IAAI;EAAEC;AAAuB,CAAC,EAAE;EAChF,OAAQ;AACV;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
+ {"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 { ReactAspect, ReactMain, UseTypescriptModifiers } from '@teambit/react';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\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 = [ReactAspect, EnvsAspect];\n\n static runtime = MainRuntime;\n\n static async provider([react, envs]: [ReactMain, 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 = react.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 // react.useTypescript(tsModifiers), // note: this cannot be used in conjunction with react.overrideCompiler\n // react.useWebpack(webpackModifiers),\n // react.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 //react.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 //react.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 react.overrideDependencies({\n devDependencies: {\n // '@types/react': '17.0.3'\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,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 +1 @@
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';\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,kBAAkB,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
+ {"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';\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 +1 @@
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,gBAAgB,GAAG;EACjC,OAAQ;AACV;AACA;AACA;AACA,GAAG;AACH"}
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 +1 @@
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,iBAAiB,GAAG;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
+ {"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 +1 @@
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,oBAAoB,GAAG;EACrC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD"}
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 +1 @@
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,iBAAiB,GAAG;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
+ {"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 +1 @@
1
- {"version":3,"names":["reactEnvTemplate","name","description","generateFiles","context","relativePath","content","indexFile","isMain","docFile","mainRuntimeFile","previewRuntimeFile","aspectFile","webpackConfigFile","typescriptConfigFile","globalStylesFile","tsTransformerFile","jestConfigFile","config","env"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext, ComponentTemplate } from '@teambit/generator';\nimport { indexFile } from './files/index';\nimport { docFile } from './files/doc';\nimport { mainRuntimeFile } from './files/main.runtime';\nimport { previewRuntimeFile } from './files/preview.runtime';\nimport { aspectFile } from './files/aspect';\nimport { webpackConfigFile } from './files/webpack.config';\nimport { typescriptConfigFile } from './files/typescript/typescript.config';\nimport { globalStylesFile } from './files/typescript/styles';\nimport { tsTransformerFile } from './files/typescript/ts-transformer';\nimport { jestConfigFile } from './files/jest.config';\n\nexport const reactEnvTemplate: ComponentTemplate = {\n name: 'react-env',\n description: 'customize the base React env with your configs and tools',\n generateFiles: (context: ComponentContext) => {\n return [\n {\n relativePath: 'index.ts',\n content: indexFile(context),\n isMain: true,\n },\n {\n relativePath: `${context.name}.docs.mdx`,\n content: docFile(context),\n },\n {\n relativePath: `${context.name}.main.runtime.ts`,\n content: mainRuntimeFile(context),\n },\n {\n relativePath: `${context.name}.preview.runtime.ts`,\n content: previewRuntimeFile(context),\n },\n {\n relativePath: `${context.name}.aspect.ts`,\n content: aspectFile(context),\n },\n {\n relativePath: `webpack/webpack-transformers.ts`,\n content: webpackConfigFile(),\n },\n {\n relativePath: `typescript/tsconfig.json`,\n content: typescriptConfigFile(),\n },\n {\n relativePath: `typescript/styles.d.ts`,\n content: globalStylesFile(),\n },\n {\n relativePath: `typescript/ts-transformer.ts`,\n content: tsTransformerFile(),\n },\n {\n relativePath: `jest/jest.config.js`,\n content: jestConfigFile(),\n },\n ];\n },\n config: {\n 'teambit.envs/env': {},\n 'teambit.envs/envs': {\n env: 'teambit.envs/env',\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;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,gBAAmC,GAAG;EACjDC,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,0DAA0D;EACvEC,aAAa,EAAGC,OAAyB,IAAK;IAC5C,OAAO,CACL;MACEC,YAAY,EAAE,UAAU;MACxBC,OAAO,EAAE,IAAAC,kBAAS,EAACH,OAAO,CAAC;MAC3BI,MAAM,EAAE;IACV,CAAC,EACD;MACEH,YAAY,EAAG,GAAED,OAAO,CAACH,IAAK,WAAU;MACxCK,OAAO,EAAE,IAAAG,cAAO,EAACL,OAAO;IAC1B,CAAC,EACD;MACEC,YAAY,EAAG,GAAED,OAAO,CAACH,IAAK,kBAAiB;MAC/CK,OAAO,EAAE,IAAAI,uBAAe,EAACN,OAAO;IAClC,CAAC,EACD;MACEC,YAAY,EAAG,GAAED,OAAO,CAACH,IAAK,qBAAoB;MAClDK,OAAO,EAAE,IAAAK,6BAAkB,EAACP,OAAO;IACrC,CAAC,EACD;MACEC,YAAY,EAAG,GAAED,OAAO,CAACH,IAAK,YAAW;MACzCK,OAAO,EAAE,IAAAM,oBAAU,EAACR,OAAO;IAC7B,CAAC,EACD;MACEC,YAAY,EAAG,iCAAgC;MAC/CC,OAAO,EAAE,IAAAO,4BAAiB;IAC5B,CAAC,EACD;MACER,YAAY,EAAG,0BAAyB;MACxCC,OAAO,EAAE,IAAAQ,kCAAoB;IAC/B,CAAC,EACD;MACET,YAAY,EAAG,wBAAuB;MACtCC,OAAO,EAAE,IAAAS,0BAAgB;IAC3B,CAAC,EACD;MACEV,YAAY,EAAG,8BAA6B;MAC5CC,OAAO,EAAE,IAAAU,kCAAiB;IAC5B,CAAC,EACD;MACEX,YAAY,EAAG,qBAAoB;MACnCC,OAAO,EAAE,IAAAW,sBAAc;IACzB,CAAC,CACF;EACH,CAAC;EACDC,MAAM,EAAE;IACN,kBAAkB,EAAE,CAAC,CAAC;IACtB,mBAAmB,EAAE;MACnBC,GAAG,EAAE;IACP;EACF;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_index","data","require","_doc","_main","_preview","_aspect","_webpack","_typescript","_styles","_tsTransformer","_jest","reactEnvTemplate","name","description","generateFiles","context","relativePath","content","indexFile","isMain","docFile","mainRuntimeFile","previewRuntimeFile","aspectFile","webpackConfigFile","typescriptConfigFile","globalStylesFile","tsTransformerFile","jestConfigFile","config","env","exports"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext, ComponentTemplate } from '@teambit/generator';\nimport { indexFile } from './files/index';\nimport { docFile } from './files/doc';\nimport { mainRuntimeFile } from './files/main.runtime';\nimport { previewRuntimeFile } from './files/preview.runtime';\nimport { aspectFile } from './files/aspect';\nimport { webpackConfigFile } from './files/webpack.config';\nimport { typescriptConfigFile } from './files/typescript/typescript.config';\nimport { globalStylesFile } from './files/typescript/styles';\nimport { tsTransformerFile } from './files/typescript/ts-transformer';\nimport { jestConfigFile } from './files/jest.config';\n\nexport const reactEnvTemplate: ComponentTemplate = {\n name: 'react-env',\n description: 'customize the base React env with your configs and tools',\n generateFiles: (context: ComponentContext) => {\n return [\n {\n relativePath: 'index.ts',\n content: indexFile(context),\n isMain: true,\n },\n {\n relativePath: `${context.name}.docs.mdx`,\n content: docFile(context),\n },\n {\n relativePath: `${context.name}.main.runtime.ts`,\n content: mainRuntimeFile(context),\n },\n {\n relativePath: `${context.name}.preview.runtime.ts`,\n content: previewRuntimeFile(context),\n },\n {\n relativePath: `${context.name}.aspect.ts`,\n content: aspectFile(context),\n },\n {\n relativePath: `webpack/webpack-transformers.ts`,\n content: webpackConfigFile(),\n },\n {\n relativePath: `typescript/tsconfig.json`,\n content: typescriptConfigFile(),\n },\n {\n relativePath: `typescript/styles.d.ts`,\n content: globalStylesFile(),\n },\n {\n relativePath: `typescript/ts-transformer.ts`,\n content: tsTransformerFile(),\n },\n {\n relativePath: `jest/jest.config.js`,\n content: jestConfigFile(),\n },\n ];\n },\n config: {\n 'teambit.envs/env': {},\n 'teambit.envs/envs': {\n env: 'teambit.envs/env',\n },\n },\n};\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"names":["componentFile","context","name","nameCamelCase","Name","relativePath","content"],"sources":["component.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const componentFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n return {\n relativePath: `${name}.tsx`,\n content: `import { useState } from 'react';\n\nexport function ${Name}() {\n const [count, setCount] = useState(0)\n const increment = () => setCount((c) => c + 1)\n return { count, increment }\n}\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,aAAa,GAAIC,OAAyB,IAAK;EAC1D,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAC7C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,MAAK;IAC3BI,OAAO,EAAG;AACd;AACA,kBAAkBF,IAAK;AACvB;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"names":["componentFile","context","name","nameCamelCase","Name","relativePath","content","exports"],"sources":["component.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const componentFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n return {\n relativePath: `${name}.tsx`,\n content: `import { useState } from 'react';\n\nexport function ${Name}() {\n const [count, setCount] = useState(0)\n const increment = () => setCount((c) => c + 1)\n return { count, increment }\n}\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,aAAa,GAAIC,OAAyB,IAAK;EAC1D,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAC7C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,MAAK;IAC3BI,OAAO,EAAG;AACd;AACA,kBAAkBF,IAAK;AACvB;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,aAAA,GAAAA,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["compositionFile","context","name","nameCamelCase","Name","relativePath","content"],"sources":["composition.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const compositionFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n\n return {\n relativePath: `${name}.composition.tsx`,\n content: `import React from 'react';\nimport { ${Name} } from './${name}';\n\nexport const Basic${Name} = () => {\n const { count, increment } = ${Name}();\n\n return (\n <>\n <h1>The count is {count}</h1>\n <button onClick={increment}>increment</button>\n </>\n );\n};\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,eAAe,GAAIC,OAAyB,IAAK;EAC5D,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE7C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,kBAAiB;IACvCI,OAAO,EAAG;AACd,WAAWF,IAAK,cAAaF,IAAK;AAClC;AACA,oBAAoBE,IAAK;AACzB,iCAAiCA,IAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"names":["compositionFile","context","name","nameCamelCase","Name","relativePath","content","exports"],"sources":["composition.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const compositionFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n\n return {\n relativePath: `${name}.composition.tsx`,\n content: `import React from 'react';\nimport { ${Name} } from './${name}';\n\nexport const Basic${Name} = () => {\n const { count, increment } = ${Name}();\n\n return (\n <>\n <h1>The count is {count}</h1>\n <button onClick={increment}>increment</button>\n </>\n );\n};\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,eAAe,GAAIC,OAAyB,IAAK;EAC5D,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE7C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,kBAAiB;IACvCI,OAAO,EAAG;AACd,WAAWF,IAAK,cAAaF,IAAK;AAClC;AACA,oBAAoBE,IAAK;AACzB,iCAAiCA,IAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["docsFile","context","name","nameCamelCase","Name","relativePath","content"],"sources":["docs.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const docsFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n\n return {\n relativePath: `${name}.docs.mdx`,\n content: `---\ndescription: 'A React Hook that increments a count by 1 each time it is called.'\nlabels: ['hook', 'counter']\n---\n\nimport { ${Name} } from './${name}';\n\n## A React Hook to increment a count\n\nIncrements the state of \\`count\\` by 1 each time \\`increment\\` is called\n\n### Component usage\n\nIn this example clicking the button calls \\`increment\\` which increments the \\`count\\` by 1\n\n\\`\\`\\`js\nimport { ${Name} } from './${name}';\n\nconst { count, increment } = ${Name}();\n\n<h1>The count is {count}</h1>\n<button onClick={increment}>increment</button>\n\\`\\`\\`\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,QAAQ,GAAIC,OAAyB,IAAK;EACrD,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE7C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,WAAU;IAChCI,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA,WAAWF,IAAK,cAAaF,IAAK;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAWE,IAAK,cAAaF,IAAK;AAClC;AACA,+BAA+BE,IAAK;AACpC;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"names":["docsFile","context","name","nameCamelCase","Name","relativePath","content","exports"],"sources":["docs.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const docsFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n\n return {\n relativePath: `${name}.docs.mdx`,\n content: `---\ndescription: 'A React Hook that increments a count by 1 each time it is called.'\nlabels: ['hook', 'counter']\n---\n\nimport { ${Name} } from './${name}';\n\n## A React Hook to increment a count\n\nIncrements the state of \\`count\\` by 1 each time \\`increment\\` is called\n\n### Component usage\n\nIn this example clicking the button calls \\`increment\\` which increments the \\`count\\` by 1\n\n\\`\\`\\`js\nimport { ${Name} } from './${name}';\n\nconst { count, increment } = ${Name}();\n\n<h1>The count is {count}</h1>\n<button onClick={increment}>increment</button>\n\\`\\`\\`\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,QAAQ,GAAIC,OAAyB,IAAK;EACrD,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE7C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,WAAU;IAChCI,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA,WAAWF,IAAK,cAAaF,IAAK;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAWE,IAAK,cAAaF,IAAK;AAClC;AACA,+BAA+BE,IAAK;AACpC;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,QAAA,GAAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["indexFile","context","name","nameCamelCase","Name","relativePath","content"],"sources":["index-file.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const indexFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n\n return {\n relativePath: 'index.ts',\n content: `export { ${Name} } from './${name}';\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,SAAS,GAAIC,OAAyB,IAAK;EACtD,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE7C,OAAO;IACLI,YAAY,EAAE,UAAU;IACxBC,OAAO,EAAG,YAAWF,IAAK,cAAaF,IAAK;AAChD;EACE,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"names":["indexFile","context","name","nameCamelCase","Name","relativePath","content","exports"],"sources":["index-file.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const indexFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n\n return {\n relativePath: 'index.ts',\n content: `export { ${Name} } from './${name}';\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,SAAS,GAAIC,OAAyB,IAAK;EACtD,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE7C,OAAO;IACLI,YAAY,EAAE,UAAU;IACxBC,OAAO,EAAG,YAAWF,IAAK,cAAaF,IAAK;AAChD;EACE,CAAC;AACH,CAAC;AAACK,OAAA,CAAAP,SAAA,GAAAA,SAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["useFoobarSnapshot","describe","it","ctx","name","namePascalCase","nameCamelCase","componentId","ComponentID","fromString","aspectId","result","indexFile","expect","content","toEqual"],"sources":["index-file.spec.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component-id';\nimport type { ComponentContext } from '@teambit/generator';\nimport { indexFile } from './index-file';\n\n// react hook convention is `useX` (lowercase \"use\")\n// it is required to enable hook-specific linting rules\nconst useFoobarSnapshot = `export { useFooBar } from './use-foo-bar';\n`; // trailing line break\n\ndescribe('templates: react-hook, index-file', () => {\n it('should match snapshot', () => {\n const ctx: ComponentContext = {\n name: 'use-foo-bar',\n namePascalCase: 'UseFooBar',\n nameCamelCase: 'useFooBar',\n componentId: ComponentID.fromString('baz.qux/use/foo/bar'),\n aspectId: ComponentID.fromString('baz.qux/use/foo/my-aspect'),\n };\n\n const result = indexFile(ctx);\n\n expect(result.content).toEqual(useFoobarSnapshot);\n });\n});\n"],"mappings":";;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AACA;AACA,MAAMA,iBAAiB,GAAI;AAC3B,CAAC,CAAC,CAAC;;AAEHC,QAAQ,CAAC,mCAAmC,EAAE,MAAM;EAClDC,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAChC,MAAMC,GAAqB,GAAG;MAC5BC,IAAI,EAAE,aAAa;MACnBC,cAAc,EAAE,WAAW;MAC3BC,aAAa,EAAE,WAAW;MAC1BC,WAAW,EAAEC,0BAAW,CAACC,UAAU,CAAC,qBAAqB,CAAC;MAC1DC,QAAQ,EAAEF,0BAAW,CAACC,UAAU,CAAC,2BAA2B;IAC9D,CAAC;IAED,MAAME,MAAM,GAAG,IAAAC,sBAAS,EAACT,GAAG,CAAC;IAE7BU,MAAM,CAACF,MAAM,CAACG,OAAO,CAAC,CAACC,OAAO,CAACf,iBAAiB,CAAC;EACnD,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["_componentId","data","require","_indexFile","useFoobarSnapshot","describe","it","ctx","name","namePascalCase","nameCamelCase","componentId","ComponentID","fromString","aspectId","result","indexFile","expect","content","toEqual"],"sources":["index-file.spec.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component-id';\nimport type { ComponentContext } from '@teambit/generator';\nimport { indexFile } from './index-file';\n\n// react hook convention is `useX` (lowercase \"use\")\n// it is required to enable hook-specific linting rules\nconst useFoobarSnapshot = `export { useFooBar } from './use-foo-bar';\n`; // trailing line break\n\ndescribe('templates: react-hook, index-file', () => {\n it('should match snapshot', () => {\n const ctx: ComponentContext = {\n name: 'use-foo-bar',\n namePascalCase: 'UseFooBar',\n nameCamelCase: 'useFooBar',\n componentId: ComponentID.fromString('baz.qux/use/foo/bar'),\n aspectId: ComponentID.fromString('baz.qux/use/foo/my-aspect'),\n };\n\n const result = indexFile(ctx);\n\n expect(result.content).toEqual(useFoobarSnapshot);\n });\n});\n"],"mappings":";;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA;AACA;AACA,MAAMG,iBAAiB,GAAI;AAC3B,CAAC,CAAC,CAAC;;AAEHC,QAAQ,CAAC,mCAAmC,EAAE,MAAM;EAClDC,EAAE,CAAC,uBAAuB,EAAE,MAAM;IAChC,MAAMC,GAAqB,GAAG;MAC5BC,IAAI,EAAE,aAAa;MACnBC,cAAc,EAAE,WAAW;MAC3BC,aAAa,EAAE,WAAW;MAC1BC,WAAW,EAAEC,0BAAW,CAACC,UAAU,CAAC,qBAAqB,CAAC;MAC1DC,QAAQ,EAAEF,0BAAW,CAACC,UAAU,CAAC,2BAA2B;IAC9D,CAAC;IAED,MAAME,MAAM,GAAG,IAAAC,sBAAS,EAACT,GAAG,CAAC;IAE7BU,MAAM,CAACF,MAAM,CAACG,OAAO,CAAC,CAACC,OAAO,CAACf,iBAAiB,CAAC;EACnD,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["testFile","context","name","nameCamelCase","Name","relativePath","content"],"sources":["test.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const testFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n\n return {\n relativePath: `${name}.spec.tsx`,\n content: `import { renderHook, act } from '@testing-library/react-hooks';\nimport { ${Name} } from './${name}';\n\nit('should increment counter', () => {\n const { result } = renderHook(() => ${Name}())\n act(() => {\n result.current.increment()\n })\n expect(result.current.count).toBe(1)\n})\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,QAAQ,GAAIC,OAAyB,IAAK;EACrD,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE7C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,WAAU;IAChCI,OAAO,EAAG;AACd,WAAWF,IAAK,cAAaF,IAAK;AAClC;AACA;AACA,wCAAwCE,IAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"names":["testFile","context","name","nameCamelCase","Name","relativePath","content","exports"],"sources":["test.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport const testFile = (context: ComponentContext) => {\n const { name, nameCamelCase: Name } = context;\n\n return {\n relativePath: `${name}.spec.tsx`,\n content: `import { renderHook, act } from '@testing-library/react-hooks';\nimport { ${Name} } from './${name}';\n\nit('should increment counter', () => {\n const { result } = renderHook(() => ${Name}())\n act(() => {\n result.current.increment()\n })\n expect(result.current.count).toBe(1)\n})\n`,\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,QAAQ,GAAIC,OAAyB,IAAK;EACrD,MAAM;IAAEC,IAAI;IAAEC,aAAa,EAAEC;EAAK,CAAC,GAAGH,OAAO;EAE7C,OAAO;IACLI,YAAY,EAAG,GAAEH,IAAK,WAAU;IAChCI,OAAO,EAAG;AACd,WAAWF,IAAK,cAAaF,IAAK;AAClC;AACA;AACA,wCAAwCE,IAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;EACE,CAAC;AACH,CAAC;AAACG,OAAA,CAAAP,QAAA,GAAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactHook","name","description","generateFiles","context","indexFile","componentFile","compositionFile","docsFile","testFile","config","env"],"sources":["index.ts"],"sourcesContent":["import { ComponentTemplate, ComponentContext } from '@teambit/generator';\nimport { componentFile } from './files/component';\nimport { compositionFile } from './files/composition';\nimport { docsFile } from './files/docs';\nimport { testFile } from './files/test';\nimport { indexFile } from './files/index-file';\n\nexport const reactHook: ComponentTemplate = {\n name: 'react-hook',\n description: 'a react hook component',\n\n generateFiles: (context: ComponentContext) => {\n return [indexFile(context), componentFile(context), compositionFile(context), docsFile(context), testFile(context)];\n },\n config: {\n 'teambit.react/react': {},\n 'teambit.envs/envs': {\n env: 'teambit.react/react',\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;AAEO,MAAMA,SAA4B,GAAG;EAC1CC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,wBAAwB;EAErCC,aAAa,EAAGC,OAAyB,IAAK;IAC5C,OAAO,CAAC,IAAAC,sBAAS,EAACD,OAAO,CAAC,EAAE,IAAAE,0BAAa,EAACF,OAAO,CAAC,EAAE,IAAAG,8BAAe,EAACH,OAAO,CAAC,EAAE,IAAAI,gBAAQ,EAACJ,OAAO,CAAC,EAAE,IAAAK,gBAAQ,EAACL,OAAO,CAAC,CAAC;EACrH,CAAC;EACDM,MAAM,EAAE;IACN,qBAAqB,EAAE,CAAC,CAAC;IACzB,mBAAmB,EAAE;MACnBC,GAAG,EAAE;IACP;EACF;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_component","data","require","_composition","_docs","_test","_indexFile","reactHook","name","description","generateFiles","context","indexFile","componentFile","compositionFile","docsFile","testFile","config","env","exports"],"sources":["index.ts"],"sourcesContent":["import { ComponentTemplate, ComponentContext } from '@teambit/generator';\nimport { componentFile } from './files/component';\nimport { compositionFile } from './files/composition';\nimport { docsFile } from './files/docs';\nimport { testFile } from './files/test';\nimport { indexFile } from './files/index-file';\n\nexport const reactHook: ComponentTemplate = {\n name: 'react-hook',\n description: 'a react hook component',\n\n generateFiles: (context: ComponentContext) => {\n return [indexFile(context), componentFile(context), compositionFile(context), docsFile(context), testFile(context)];\n },\n config: {\n 'teambit.react/react': {},\n 'teambit.envs/envs': {\n env: 'teambit.react/react',\n },\n },\n};\n"],"mappings":";;;;;;AACA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,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,MAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMM,SAA4B,GAAG;EAC1CC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,wBAAwB;EAErCC,aAAa,EAAGC,OAAyB,IAAK;IAC5C,OAAO,CAAC,IAAAC,sBAAS,EAACD,OAAO,CAAC,EAAE,IAAAE,0BAAa,EAACF,OAAO,CAAC,EAAE,IAAAG,8BAAe,EAACH,OAAO,CAAC,EAAE,IAAAI,gBAAQ,EAACJ,OAAO,CAAC,EAAE,IAAAK,gBAAQ,EAACL,OAAO,CAAC,CAAC;EACrH,CAAC;EACDM,MAAM,EAAE;IACN,qBAAqB,EAAE,CAAC,CAAC;IACzB,mBAAmB,EAAE;MACnBC,GAAG,EAAE;IACP;EACF;AACF,CAAC;AAACC,OAAA,CAAAZ,SAAA,GAAAA,SAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactWorkspaceTemplate","name","description","generateFiles","context","generateCommonFiles","fork"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceTemplate: WorkspaceTemplate = {\n name: 'react',\n description: 'React workspace with demo components',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n // {\n // id: 'teambit.react/templates/envs/my-react',\n // targetName: 'envs/my-react',\n // path: 'demo/envs/my-react',\n // },\n // { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },\n // { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },\n // { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },\n // {\n // id: 'teambit.react/templates/pages/welcome',\n // targetName: 'pages/welcome',\n // path: 'demo/pages/welcome',\n // },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,sBAAyC,GAAG;EACvDC,IAAI,EAAE,OAAO;EACbC,WAAW,EAAE,sCAAsC;EACnDC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAE,MAAM;IACV,OAAO;MACL;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IAAA,CACD;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_workspaceCommon","data","require","reactWorkspaceTemplate","name","description","generateFiles","context","generateCommonFiles","fork","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceTemplate: WorkspaceTemplate = {\n name: 'react',\n description: 'React workspace with demo components',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n // {\n // id: 'teambit.react/templates/envs/my-react',\n // targetName: 'envs/my-react',\n // path: 'demo/envs/my-react',\n // },\n // { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },\n // { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },\n // { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },\n // {\n // id: 'teambit.react/templates/pages/welcome',\n // targetName: 'pages/welcome',\n // path: 'demo/pages/welcome',\n // },\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;AAEO,MAAME,sBAAyC,GAAG;EACvDC,IAAI,EAAE,OAAO;EACbC,WAAW,EAAE,sCAAsC;EACnDC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO;MACL;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IAAA,CACD;EACH;AACF,CAAC;AAACC,OAAA,CAAAP,sBAAA,GAAAA,sBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactWorkspaceAnalyticsTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceAnalyticsTemplate: WorkspaceTemplate = {\n name: 'react-analytics',\n description: 'React workspace with components for an Analytics Application',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.analytics/examples/dashboard',\n targetName: 'examples/dashboard',\n path: 'examples/dashboard',\n },\n { id: 'teambit.analytics/examples/new-users', targetName: 'examples/new-users', path: 'examples/new-users' },\n { id: 'teambit.analytics/examples/revenues', targetName: 'examples/revenues', path: 'examples/revenues' },\n {\n id: 'teambit.analytics/examples/top-frameworks',\n targetName: 'examples/top-frameworks',\n path: 'examples/top-frameworks',\n },\n {\n id: 'teambit.analytics/examples/top-members',\n targetName: 'examples/top-members',\n path: 'examples/top-members',\n },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,+BAAkD,GAAG;EAChEC,IAAI,EAAE,iBAAiB;EACvBC,WAAW,EAAE,8DAA8D;EAC3EC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAE,MAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,sCAAsC;MAC1CC,UAAU,EAAE,oBAAoB;MAChCC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,sCAAsC;MAAEC,UAAU,EAAE,oBAAoB;MAAEC,IAAI,EAAE;IAAqB,CAAC,EAC5G;MAAEF,EAAE,EAAE,qCAAqC;MAAEC,UAAU,EAAE,mBAAmB;MAAEC,IAAI,EAAE;IAAoB,CAAC,EACzG;MACEF,EAAE,EAAE,2CAA2C;MAC/CC,UAAU,EAAE,yBAAyB;MACrCC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,wCAAwC;MAC5CC,UAAU,EAAE,sBAAsB;MAClCC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_workspaceCommon","data","require","reactWorkspaceAnalyticsTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceAnalyticsTemplate: WorkspaceTemplate = {\n name: 'react-analytics',\n description: 'React workspace with components for an Analytics Application',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.analytics/examples/dashboard',\n targetName: 'examples/dashboard',\n path: 'examples/dashboard',\n },\n { id: 'teambit.analytics/examples/new-users', targetName: 'examples/new-users', path: 'examples/new-users' },\n { id: 'teambit.analytics/examples/revenues', targetName: 'examples/revenues', path: 'examples/revenues' },\n {\n id: 'teambit.analytics/examples/top-frameworks',\n targetName: 'examples/top-frameworks',\n path: 'examples/top-frameworks',\n },\n {\n id: 'teambit.analytics/examples/top-members',\n targetName: 'examples/top-members',\n path: 'examples/top-members',\n },\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;AAEO,MAAME,+BAAkD,GAAG;EAChEC,IAAI,EAAE,iBAAiB;EACvBC,WAAW,EAAE,8DAA8D;EAC3EC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,sCAAsC;MAC1CC,UAAU,EAAE,oBAAoB;MAChCC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,sCAAsC;MAAEC,UAAU,EAAE,oBAAoB;MAAEC,IAAI,EAAE;IAAqB,CAAC,EAC5G;MAAEF,EAAE,EAAE,qCAAqC;MAAEC,UAAU,EAAE,mBAAmB;MAAEC,IAAI,EAAE;IAAoB,CAAC,EACzG;MACEF,EAAE,EAAE,2CAA2C;MAC/CC,UAAU,EAAE,yBAAyB;MACrCC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,wCAAwC;MAC5CC,UAAU,EAAE,sBAAsB;MAClCC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAACC,OAAA,CAAAV,+BAAA,GAAAA,+BAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactWorkspaceAppTemplate","name","description","hidden","appName","generateFiles","context","scope","defaultScope","DEFAULT_SCOPE_NAME","extensions","parse","generateCommonFiles","fork","id","targetName"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { parse } from 'comment-json';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\nimport { DEFAULT_SCOPE_NAME } from '../workspace-common/constants';\n\nexport const reactWorkspaceAppTemplate: WorkspaceTemplate = {\n name: 'react-app',\n description: 'EXPERIMENTAL. react workspace for an app',\n hidden: true,\n appName: 'my-app',\n generateFiles: async (context: WorkspaceContext) => {\n const scope = context.defaultScope || DEFAULT_SCOPE_NAME;\n const extensions = {\n [`${scope}/apps/my-app`]: parse(`{}`),\n };\n return generateCommonFiles(context, extensions);\n },\n fork: () => {\n return [\n { id: 'teambit.react/templates/apps/my-app', targetName: 'apps/my-app' },\n // { id: 'teambit.react/templates/envs/my-react', targetName: 'envs/my-react' }, // TODO: uncomment when ready\n { id: 'teambit.react/templates/themes/theme', targetName: 'themes/theme' },\n { id: 'teambit.react/templates/pages/home', targetName: 'pages/home' },\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;AAEO,MAAMA,yBAA4C,GAAG;EAC1DC,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,0CAA0C;EACvDC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE,QAAQ;EACjBC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,MAAMC,KAAK,GAAGD,OAAO,CAACE,YAAY,IAAIC,+BAAkB;IACxD,MAAMC,UAAU,GAAG;MACjB,CAAE,GAAEH,KAAM,cAAa,GAAG,IAAAI,oBAAK,EAAE,IAAG;IACtC,CAAC;IACD,OAAO,IAAAC,gCAAmB,EAACN,OAAO,EAAEI,UAAU,CAAC;EACjD,CAAC;EACDG,IAAI,EAAE,MAAM;IACV,OAAO,CACL;MAAEC,EAAE,EAAE,qCAAqC;MAAEC,UAAU,EAAE;IAAc,CAAC;IACxE;IACA;MAAED,EAAE,EAAE,sCAAsC;MAAEC,UAAU,EAAE;IAAe,CAAC,EAC1E;MAAED,EAAE,EAAE,oCAAoC;MAAEC,UAAU,EAAE;IAAa,CAAC,CACvE;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_commentJson","data","require","_workspaceCommon","_constants","reactWorkspaceAppTemplate","name","description","hidden","appName","generateFiles","context","scope","defaultScope","DEFAULT_SCOPE_NAME","extensions","parse","generateCommonFiles","fork","id","targetName","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { parse } from 'comment-json';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\nimport { DEFAULT_SCOPE_NAME } from '../workspace-common/constants';\n\nexport const reactWorkspaceAppTemplate: WorkspaceTemplate = {\n name: 'react-app',\n description: 'EXPERIMENTAL. react workspace for an app',\n hidden: true,\n appName: 'my-app',\n generateFiles: async (context: WorkspaceContext) => {\n const scope = context.defaultScope || DEFAULT_SCOPE_NAME;\n const extensions = {\n [`${scope}/apps/my-app`]: parse(`{}`),\n };\n return generateCommonFiles(context, extensions);\n },\n fork: () => {\n return [\n { id: 'teambit.react/templates/apps/my-app', targetName: 'apps/my-app' },\n // { id: 'teambit.react/templates/envs/my-react', targetName: 'envs/my-react' }, // TODO: uncomment when ready\n { id: 'teambit.react/templates/themes/theme', targetName: 'themes/theme' },\n { id: 'teambit.react/templates/pages/home', targetName: 'pages/home' },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,iBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,gBAAA,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,MAAMI,yBAA4C,GAAG;EAC1DC,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,0CAA0C;EACvDC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE,QAAQ;EACjBC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,MAAMC,KAAK,GAAGD,OAAO,CAACE,YAAY,IAAIC,+BAAkB;IACxD,MAAMC,UAAU,GAAG;MACjB,CAAE,GAAEH,KAAM,cAAa,GAAG,IAAAI,oBAAK,EAAE,IAAG;IACtC,CAAC;IACD,OAAO,IAAAC,gCAAmB,EAACN,OAAO,EAAEI,UAAU,CAAC;EACjD,CAAC;EACDG,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO,CACL;MAAEC,EAAE,EAAE,qCAAqC;MAAEC,UAAU,EAAE;IAAc,CAAC;IACxE;IACA;MAAED,EAAE,EAAE,sCAAsC;MAAEC,UAAU,EAAE;IAAe,CAAC,EAC1E;MAAED,EAAE,EAAE,oCAAoC;MAAEC,UAAU,EAAE;IAAa,CAAC,CACvE;EACH;AACF,CAAC;AAACC,OAAA,CAAAhB,yBAAA,GAAAA,yBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactWorkspaceBlogTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceBlogTemplate: WorkspaceTemplate = {\n name: 'react-blog',\n description: 'React workspace with components for a Blog',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.blog/starter/starter-blog',\n targetName: 'starter/starter-blog',\n path: 'starter/starter-blog',\n },\n { id: 'teambit.blog/blog', targetName: 'blog', path: 'blog' },\n {\n id: 'teambit.blog/starter/blog-posts/post-one',\n targetName: 'blog-posts/post-one',\n path: 'blog-posts/post-one',\n },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,0BAA6C,GAAG;EAC3DC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,4CAA4C;EACzDC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAE,MAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,mCAAmC;MACvCC,UAAU,EAAE,sBAAsB;MAClCC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,mBAAmB;MAAEC,UAAU,EAAE,MAAM;MAAEC,IAAI,EAAE;IAAO,CAAC,EAC7D;MACEF,EAAE,EAAE,0CAA0C;MAC9CC,UAAU,EAAE,qBAAqB;MACjCC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_workspaceCommon","data","require","reactWorkspaceBlogTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceBlogTemplate: WorkspaceTemplate = {\n name: 'react-blog',\n description: 'React workspace with components for a Blog',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.blog/starter/starter-blog',\n targetName: 'starter/starter-blog',\n path: 'starter/starter-blog',\n },\n { id: 'teambit.blog/blog', targetName: 'blog', path: 'blog' },\n {\n id: 'teambit.blog/starter/blog-posts/post-one',\n targetName: 'blog-posts/post-one',\n path: 'blog-posts/post-one',\n },\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;AAEO,MAAME,0BAA6C,GAAG;EAC3DC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,4CAA4C;EACzDC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,mCAAmC;MACvCC,UAAU,EAAE,sBAAsB;MAClCC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,mBAAmB;MAAEC,UAAU,EAAE,MAAM;MAAEC,IAAI,EAAE;IAAO,CAAC,EAC7D;MACEF,EAAE,EAAE,0CAA0C;MAC9CC,UAAU,EAAE,qBAAqB;MACjCC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAACC,OAAA,CAAAV,0BAAA,GAAAA,0BAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactWorkspaceDataFetchingTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceDataFetchingTemplate: WorkspaceTemplate = {\n name: 'react-data-fetching',\n description: 'React workspace with components to show data fetching',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'learn-bit-react.data-fetching/pages/books-page',\n targetName: 'pages/books-page',\n path: 'pages/books-page',\n },\n {\n id: 'learn-bit-react.data-fetching/ui/hooks/use-books',\n targetName: 'ui/hooks/use-books',\n path: 'ui/hooks/use-books',\n },\n { id: 'learn-bit-react.data-fetching/ui/book', targetName: 'ui/book', path: 'ui/book' },\n {\n id: 'learn-bit-react.data-fetching/ui/book-list',\n targetName: 'ui/book-list',\n path: 'ui/book-list',\n },\n {\n id: 'learn-bit-react.data-fetching/models/book',\n targetName: 'models/book',\n path: 'models/book',\n },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,kCAAqD,GAAG;EACnEC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EAAE,uDAAuD;EACpEC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAE,MAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,gDAAgD;MACpDC,UAAU,EAAE,kBAAkB;MAC9BC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,kDAAkD;MACtDC,UAAU,EAAE,oBAAoB;MAChCC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,uCAAuC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAU,CAAC,EACvF;MACEF,EAAE,EAAE,4CAA4C;MAChDC,UAAU,EAAE,cAAc;MAC1BC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,2CAA2C;MAC/CC,UAAU,EAAE,aAAa;MACzBC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_workspaceCommon","data","require","reactWorkspaceDataFetchingTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceDataFetchingTemplate: WorkspaceTemplate = {\n name: 'react-data-fetching',\n description: 'React workspace with components to show data fetching',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'learn-bit-react.data-fetching/pages/books-page',\n targetName: 'pages/books-page',\n path: 'pages/books-page',\n },\n {\n id: 'learn-bit-react.data-fetching/ui/hooks/use-books',\n targetName: 'ui/hooks/use-books',\n path: 'ui/hooks/use-books',\n },\n { id: 'learn-bit-react.data-fetching/ui/book', targetName: 'ui/book', path: 'ui/book' },\n {\n id: 'learn-bit-react.data-fetching/ui/book-list',\n targetName: 'ui/book-list',\n path: 'ui/book-list',\n },\n {\n id: 'learn-bit-react.data-fetching/models/book',\n targetName: 'models/book',\n path: 'models/book',\n },\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;AAEO,MAAME,kCAAqD,GAAG;EACnEC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EAAE,uDAAuD;EACpEC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,gDAAgD;MACpDC,UAAU,EAAE,kBAAkB;MAC9BC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,kDAAkD;MACtDC,UAAU,EAAE,oBAAoB;MAChCC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,uCAAuC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAU,CAAC,EACvF;MACEF,EAAE,EAAE,4CAA4C;MAChDC,UAAU,EAAE,cAAc;MAC1BC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,2CAA2C;MAC/CC,UAAU,EAAE,aAAa;MACzBC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAACC,OAAA,CAAAV,kCAAA,GAAAA,kCAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["deprecatedReactWorkspaceTemplate","name","description","hidden","generateFiles","context","generateCommonFiles","fork","id","targetName","path"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const deprecatedReactWorkspaceTemplate: WorkspaceTemplate = {\n name: 'react-workspace',\n description: 'React workspace with demo components',\n hidden: true,\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.react/templates/envs/my-react',\n targetName: 'envs/my-react',\n path: 'demo/envs/my-react',\n },\n { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },\n { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },\n { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },\n {\n id: 'teambit.react/templates/pages/welcome',\n targetName: 'pages/welcome',\n path: 'demo/pages/welcome',\n },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,gCAAmD,GAAG;EACjEC,IAAI,EAAE,iBAAiB;EACvBC,WAAW,EAAE,sCAAsC;EACnDC,MAAM,EAAE,IAAI;EACZC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAE,MAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,uCAAuC;MAC3CC,UAAU,EAAE,eAAe;MAC3BC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,iCAAiC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAe,CAAC,EACtF;MAAEF,EAAE,EAAE,oCAAoC;MAAEC,UAAU,EAAE,YAAY;MAAEC,IAAI,EAAE;IAAkB,CAAC,EAC/F;MAAEF,EAAE,EAAE,iCAAiC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAe,CAAC,EACtF;MACEF,EAAE,EAAE,uCAAuC;MAC3CC,UAAU,EAAE,eAAe;MAC3BC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_workspaceCommon","data","require","deprecatedReactWorkspaceTemplate","name","description","hidden","generateFiles","context","generateCommonFiles","fork","id","targetName","path","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const deprecatedReactWorkspaceTemplate: WorkspaceTemplate = {\n name: 'react-workspace',\n description: 'React workspace with demo components',\n hidden: true,\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.react/templates/envs/my-react',\n targetName: 'envs/my-react',\n path: 'demo/envs/my-react',\n },\n { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },\n { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },\n { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },\n {\n id: 'teambit.react/templates/pages/welcome',\n targetName: 'pages/welcome',\n path: 'demo/pages/welcome',\n },\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;AAEO,MAAME,gCAAmD,GAAG;EACjEC,IAAI,EAAE,iBAAiB;EACvBC,WAAW,EAAE,sCAAsC;EACnDC,MAAM,EAAE,IAAI;EACZC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,uCAAuC;MAC3CC,UAAU,EAAE,eAAe;MAC3BC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,iCAAiC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAe,CAAC,EACtF;MAAEF,EAAE,EAAE,oCAAoC;MAAEC,UAAU,EAAE,YAAY;MAAEC,IAAI,EAAE;IAAkB,CAAC,EAC/F;MAAEF,EAAE,EAAE,iCAAiC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAe,CAAC,EACtF;MACEF,EAAE,EAAE,uCAAuC;MAC3CC,UAAU,EAAE,eAAe;MAC3BC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAACC,OAAA,CAAAX,gCAAA,GAAAA,gCAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactWorkspaceDesignSystemTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceDesignSystemTemplate: WorkspaceTemplate = {\n name: 'react-design-system',\n description: 'React workspace with components for a Design System',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.design/examples/sample-app',\n targetName: 'app/sample-app',\n path: 'app/sample-app',\n },\n { id: 'teambit.design/ui/cards/card', targetName: 'ui/cards/card', path: 'ui/cards/card' },\n { id: 'teambit.design/ui/heading', targetName: 'ui/heading', path: 'ui/heading' },\n { id: 'teambit.design/themes/theme-toggler', targetName: 'themes/theme-toggler', path: 'themes/theme-toggler' },\n {\n id: 'teambit.design/themes/base-theme',\n targetName: 'themes/base-theme',\n path: 'themes/base-theme',\n },\n {\n id: 'teambit.design/themes/light-theme',\n targetName: 'themes/light-theme',\n path: 'themes/light-theme',\n },\n {\n id: 'teambit.design/themes/dark-theme',\n targetName: 'themes/dark-theme',\n path: 'themes/dark-theme',\n },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,kCAAqD,GAAG;EACnEC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EAAE,qDAAqD;EAClEC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAE,MAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,oCAAoC;MACxCC,UAAU,EAAE,gBAAgB;MAC5BC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,8BAA8B;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAgB,CAAC,EAC1F;MAAEF,EAAE,EAAE,2BAA2B;MAAEC,UAAU,EAAE,YAAY;MAAEC,IAAI,EAAE;IAAa,CAAC,EACjF;MAAEF,EAAE,EAAE,qCAAqC;MAAEC,UAAU,EAAE,sBAAsB;MAAEC,IAAI,EAAE;IAAuB,CAAC,EAC/G;MACEF,EAAE,EAAE,kCAAkC;MACtCC,UAAU,EAAE,mBAAmB;MAC/BC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,mCAAmC;MACvCC,UAAU,EAAE,oBAAoB;MAChCC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,kCAAkC;MACtCC,UAAU,EAAE,mBAAmB;MAC/BC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_workspaceCommon","data","require","reactWorkspaceDesignSystemTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceDesignSystemTemplate: WorkspaceTemplate = {\n name: 'react-design-system',\n description: 'React workspace with components for a Design System',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.design/examples/sample-app',\n targetName: 'app/sample-app',\n path: 'app/sample-app',\n },\n { id: 'teambit.design/ui/cards/card', targetName: 'ui/cards/card', path: 'ui/cards/card' },\n { id: 'teambit.design/ui/heading', targetName: 'ui/heading', path: 'ui/heading' },\n { id: 'teambit.design/themes/theme-toggler', targetName: 'themes/theme-toggler', path: 'themes/theme-toggler' },\n {\n id: 'teambit.design/themes/base-theme',\n targetName: 'themes/base-theme',\n path: 'themes/base-theme',\n },\n {\n id: 'teambit.design/themes/light-theme',\n targetName: 'themes/light-theme',\n path: 'themes/light-theme',\n },\n {\n id: 'teambit.design/themes/dark-theme',\n targetName: 'themes/dark-theme',\n path: 'themes/dark-theme',\n },\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;AAEO,MAAME,kCAAqD,GAAG;EACnEC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EAAE,qDAAqD;EAClEC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,oCAAoC;MACxCC,UAAU,EAAE,gBAAgB;MAC5BC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,8BAA8B;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAgB,CAAC,EAC1F;MAAEF,EAAE,EAAE,2BAA2B;MAAEC,UAAU,EAAE,YAAY;MAAEC,IAAI,EAAE;IAAa,CAAC,EACjF;MAAEF,EAAE,EAAE,qCAAqC;MAAEC,UAAU,EAAE,sBAAsB;MAAEC,IAAI,EAAE;IAAuB,CAAC,EAC/G;MACEF,EAAE,EAAE,kCAAkC;MACtCC,UAAU,EAAE,mBAAmB;MAC/BC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,mCAAmC;MACvCC,UAAU,EAAE,oBAAoB;MAChCC,IAAI,EAAE;IACR,CAAC,EACD;MACEF,EAAE,EAAE,kCAAkC;MACtCC,UAAU,EAAE,mBAAmB;MAC/BC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAACC,OAAA,CAAAV,kCAAA,GAAAA,kCAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactWorkspaceLibTemplate","name","description","hidden","generateFiles","context","generateCommonFiles","fork","id","targetName","path"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceLibTemplate: WorkspaceTemplate = {\n name: 'react-lib',\n description: 'EXPERIMENTAL. react workspace for a component library',\n hidden: true,\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n { id: 'teambit.react/templates/envs/my-react', targetName: 'envs/my-react', path: 'demo/envs/my-react' },\n { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },\n { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },\n { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },\n { id: 'teambit.react/templates/styles/colors', targetName: 'styles/colors', path: 'demo/styles/colors' },\n { id: 'teambit.react/templates/themes/theme', targetName: 'themes/theme', path: 'demo/themes/theme' },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,yBAA4C,GAAG;EAC1DC,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,uDAAuD;EACpEC,MAAM,EAAE,IAAI;EACZC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAE,MAAM;IACV,OAAO,CACL;MAAEC,EAAE,EAAE,uCAAuC;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAqB,CAAC,EACxG;MAAEF,EAAE,EAAE,iCAAiC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAe,CAAC,EACtF;MAAEF,EAAE,EAAE,oCAAoC;MAAEC,UAAU,EAAE,YAAY;MAAEC,IAAI,EAAE;IAAkB,CAAC,EAC/F;MAAEF,EAAE,EAAE,iCAAiC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAe,CAAC,EACtF;MAAEF,EAAE,EAAE,uCAAuC;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAqB,CAAC,EACxG;MAAEF,EAAE,EAAE,sCAAsC;MAAEC,UAAU,EAAE,cAAc;MAAEC,IAAI,EAAE;IAAoB,CAAC,CACtG;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_workspaceCommon","data","require","reactWorkspaceLibTemplate","name","description","hidden","generateFiles","context","generateCommonFiles","fork","id","targetName","path","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceLibTemplate: WorkspaceTemplate = {\n name: 'react-lib',\n description: 'EXPERIMENTAL. react workspace for a component library',\n hidden: true,\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n { id: 'teambit.react/templates/envs/my-react', targetName: 'envs/my-react', path: 'demo/envs/my-react' },\n { id: 'teambit.react/templates/ui/text', targetName: 'ui/text', path: 'demo/ui/text' },\n { id: 'teambit.react/templates/ui/heading', targetName: 'ui/heading', path: 'demo/ui/heading' },\n { id: 'teambit.react/templates/ui/card', targetName: 'ui/card', path: 'demo/ui/card' },\n { id: 'teambit.react/templates/styles/colors', targetName: 'styles/colors', path: 'demo/styles/colors' },\n { id: 'teambit.react/templates/themes/theme', targetName: 'themes/theme', path: 'demo/themes/theme' },\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;AAEO,MAAME,yBAA4C,GAAG;EAC1DC,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,uDAAuD;EACpEC,MAAM,EAAE,IAAI;EACZC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO,CACL;MAAEC,EAAE,EAAE,uCAAuC;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAqB,CAAC,EACxG;MAAEF,EAAE,EAAE,iCAAiC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAe,CAAC,EACtF;MAAEF,EAAE,EAAE,oCAAoC;MAAEC,UAAU,EAAE,YAAY;MAAEC,IAAI,EAAE;IAAkB,CAAC,EAC/F;MAAEF,EAAE,EAAE,iCAAiC;MAAEC,UAAU,EAAE,SAAS;MAAEC,IAAI,EAAE;IAAe,CAAC,EACtF;MAAEF,EAAE,EAAE,uCAAuC;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAqB,CAAC,EACxG;MAAEF,EAAE,EAAE,sCAAsC;MAAEC,UAAU,EAAE,cAAc;MAAEC,IAAI,EAAE;IAAoB,CAAC,CACtG;EACH;AACF,CAAC;AAACC,OAAA,CAAAX,yBAAA,GAAAA,yBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["reactWorkspaceWikiTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceWikiTemplate: WorkspaceTemplate = {\n name: 'react-wiki',\n description: 'React workspace with components for a Wiki',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.wiki/apps/wiki',\n targetName: 'apps/wiki',\n path: 'apps/wiki',\n },\n { id: 'teambit.wiki/sections/wiki', targetName: 'sections/wiki', path: 'sections/wiki' },\n { id: 'teambit.wiki/blocks/header', targetName: 'blocks/header', path: 'blocks/header' },\n { id: 'teambit.wiki/blocks/footer', targetName: 'blocks/footer', path: 'blocks/footer' },\n {\n id: 'teambit.wiki/content/welcome',\n targetName: 'content/welcome',\n path: 'content/welcome',\n },\n ];\n },\n};\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,0BAA6C,GAAG;EAC3DC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,4CAA4C;EACzDC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAE,MAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,wBAAwB;MAC5BC,UAAU,EAAE,WAAW;MACvBC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,4BAA4B;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAgB,CAAC,EACxF;MAAEF,EAAE,EAAE,4BAA4B;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAgB,CAAC,EACxF;MAAEF,EAAE,EAAE,4BAA4B;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAgB,CAAC,EACxF;MACEF,EAAE,EAAE,8BAA8B;MAClCC,UAAU,EAAE,iBAAiB;MAC7BC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAAC"}
1
+ {"version":3,"names":["_workspaceCommon","data","require","reactWorkspaceWikiTemplate","name","description","generateFiles","context","generateCommonFiles","fork","id","targetName","path","exports"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceContext, WorkspaceTemplate } from '@teambit/generator';\nimport { generateFiles as generateCommonFiles } from '../workspace-common';\n\nexport const reactWorkspaceWikiTemplate: WorkspaceTemplate = {\n name: 'react-wiki',\n description: 'React workspace with components for a Wiki',\n generateFiles: async (context: WorkspaceContext) => {\n return generateCommonFiles(context);\n },\n fork: () => {\n return [\n {\n id: 'teambit.wiki/apps/wiki',\n targetName: 'apps/wiki',\n path: 'apps/wiki',\n },\n { id: 'teambit.wiki/sections/wiki', targetName: 'sections/wiki', path: 'sections/wiki' },\n { id: 'teambit.wiki/blocks/header', targetName: 'blocks/header', path: 'blocks/header' },\n { id: 'teambit.wiki/blocks/footer', targetName: 'blocks/footer', path: 'blocks/footer' },\n {\n id: 'teambit.wiki/content/welcome',\n targetName: 'content/welcome',\n path: 'content/welcome',\n },\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;AAEO,MAAME,0BAA6C,GAAG;EAC3DC,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE,4CAA4C;EACzDC,aAAa,EAAE,MAAOC,OAAyB,IAAK;IAClD,OAAO,IAAAC,gCAAmB,EAACD,OAAO,CAAC;EACrC,CAAC;EACDE,IAAI,EAAEA,CAAA,KAAM;IACV,OAAO,CACL;MACEC,EAAE,EAAE,wBAAwB;MAC5BC,UAAU,EAAE,WAAW;MACvBC,IAAI,EAAE;IACR,CAAC,EACD;MAAEF,EAAE,EAAE,4BAA4B;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAgB,CAAC,EACxF;MAAEF,EAAE,EAAE,4BAA4B;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAgB,CAAC,EACxF;MAAEF,EAAE,EAAE,4BAA4B;MAAEC,UAAU,EAAE,eAAe;MAAEC,IAAI,EAAE;IAAgB,CAAC,EACxF;MACEF,EAAE,EAAE,8BAA8B;MAClCC,UAAU,EAAE,iBAAiB;MAC7BC,IAAI,EAAE;IACR,CAAC,CACF;EACH;AACF,CAAC;AAACC,OAAA,CAAAV,0BAAA,GAAAA,0BAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["DEFAULT_SCOPE_NAME"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_SCOPE_NAME = 'my-org.my-scope';\n"],"mappings":";;;;;;AAAO,MAAMA,kBAAkB,GAAG,iBAAiB;AAAC"}
1
+ {"version":3,"names":["DEFAULT_SCOPE_NAME","exports"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_SCOPE_NAME = 'my-org.my-scope';\n"],"mappings":";;;;;;AAAO,MAAMA,kBAAkB,GAAG,iBAAiB;AAACC,OAAA,CAAAD,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["eslintConfig"],"sources":["eslint-config.ts"],"sourcesContent":["export const eslintConfig = `module.exports = {\n extends: ['@teambit/eslint-config-bit-react'],\n parserOptions: {\n project: './tsconfig.json'\n },\n}`;\n"],"mappings":";;;;;;AAAO,MAAMA,YAAY,GAAI;AAC7B;AACA;AACA;AACA;AACA,EAAE;AAAC"}
1
+ {"version":3,"names":["eslintConfig","exports"],"sources":["eslint-config.ts"],"sourcesContent":["export const eslintConfig = `module.exports = {\n extends: ['@teambit/eslint-config-bit-react'],\n parserOptions: {\n project: './tsconfig.json'\n },\n}`;\n"],"mappings":";;;;;;AAAO,MAAMA,YAAY,GAAI;AAC7B;AACA;AACA;AACA;AACA,EAAE;AAACC,OAAA,CAAAD,YAAA,GAAAA,YAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["gitIgnore"],"sources":["git-ignore.ts"],"sourcesContent":["export function gitIgnore() {\n return `# Bit\n.bit\npublic\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.test\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n.history\n\n.DS_Store\n\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,SAAS,GAAG;EAC1B,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;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,CAAC;AACD"}
1
+ {"version":3,"names":["gitIgnore"],"sources":["git-ignore.ts"],"sourcesContent":["export function gitIgnore() {\n return `# Bit\n.bit\npublic\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.test\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n.history\n\n.DS_Store\n\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,SAASA,CAAA,EAAG;EAC1B,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;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,CAAC;AACD"}
@@ -1 +1 @@
1
- {"version":3,"names":["launchJson","defaultScope","scopedRegistry","split"],"sources":["launch-json.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\n\nexport function launchJson({ defaultScope }: WorkspaceContext) {\n const scopedRegistry = defaultScope ? `@${defaultScope.split('.')[0]}` : '@my-org';\n return `{\n // Use IntelliSense to learn about possible attributes.\n // Hover to view descriptions of existing attributes.\n // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"type\": \"node\",\n \"request\": \"launch\",\n \"name\": \"test\",\n \"program\": \"\\${workspaceFolder}/node_modules/@teambit/bit/dist/app.js\",\n \"args\": [\"test\"],\n \"resolveSourceMapLocations\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"outFiles\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"console\": \"integratedTerminal\",\n \"sourceMaps\": true,\n \"internalConsoleOptions\": \"neverOpen\",\n \"cwd\": \"\\${workspaceFolder}\"\n }\n ]\n}`;\n}\n"],"mappings":";;;;;;;AAEO,SAASA,UAAU,CAAC;EAAEC;AAA+B,CAAC,EAAE;EAC7D,MAAMC,cAAc,GAAGD,YAAY,GAAI,IAAGA,YAAY,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,EAAC,GAAG,SAAS;EAClF,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4CD,cAAe;AAC3D;AACA;AACA,4CAA4CA,cAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF"}
1
+ {"version":3,"names":["launchJson","defaultScope","scopedRegistry","split"],"sources":["launch-json.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\n\nexport function launchJson({ defaultScope }: WorkspaceContext) {\n const scopedRegistry = defaultScope ? `@${defaultScope.split('.')[0]}` : '@my-org';\n return `{\n // Use IntelliSense to learn about possible attributes.\n // Hover to view descriptions of existing attributes.\n // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"type\": \"node\",\n \"request\": \"launch\",\n \"name\": \"test\",\n \"program\": \"\\${workspaceFolder}/node_modules/@teambit/bit/dist/app.js\",\n \"args\": [\"test\"],\n \"resolveSourceMapLocations\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"outFiles\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"console\": \"integratedTerminal\",\n \"sourceMaps\": true,\n \"internalConsoleOptions\": \"neverOpen\",\n \"cwd\": \"\\${workspaceFolder}\"\n }\n ]\n}`;\n}\n"],"mappings":";;;;;;;AAEO,SAASA,UAAUA,CAAC;EAAEC;AAA+B,CAAC,EAAE;EAC7D,MAAMC,cAAc,GAAGD,YAAY,GAAI,IAAGA,YAAY,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,EAAC,GAAG,SAAS;EAClF,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4CD,cAAe;AAC3D;AACA;AACA,4CAA4CA,cAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["prettierConfig"],"sources":["prettier-config.ts"],"sourcesContent":["export const prettierConfig = `const baseConfig = require(\"@teambit/react/prettier/prettier.config\");\nmodule.exports = {\n ...baseConfig,\n};\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAI;AAC/B;AACA;AACA;AACA,CAAC;AAAC"}
1
+ {"version":3,"names":["prettierConfig","exports"],"sources":["prettier-config.ts"],"sourcesContent":["export const prettierConfig = `const baseConfig = require(\"@teambit/react/prettier/prettier.config\");\nmodule.exports = {\n ...baseConfig,\n};\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAI;AAC/B;AACA;AACA;AACA,CAAC;AAACC,OAAA,CAAAD,cAAA,GAAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["readme"],"sources":["readme-file.ts"],"sourcesContent":["export function readme() {\n return `# Welcome to your Bit Workspace\n\nTo get started straight away run \\`bit start\\` and open [localhost:3000](http://localhost:3000). It may take a while to build the first time you run this command as it is building the whole User Interface for your development environment.\n\n\\`\\`\\`bash\nbit start\n\\`\\`\\`\n\n## What's included\n\n- **workspace.jsonc**\n\nThis is the main configuration file of your bit workspace. Here you can modify the workspace name and icon as well as default directory and scope. It is where dependencies are found when you install anything. It is also where you register aspects, bit extensions as well as apply the environments for your components. This workspace has been setup so that all components use the React env. However you can create other components and apply other envs to them such as node, html, angular and aspect envs.\n\n- **.bitmap**\n\nThis is an auto-generated file and includes the mapping of your components. There is one component included here. In order to remove this component you can run the following command.\n\n\n- **Demo Components**\n\nA folder (unless the --empty flag was used) containing demo components are included in this workspace. These components are used to demonstrate the different features of Bit. If you would like to remove these components you can run the following command.\n\n\\`\\`\\`jsx\nbit remove \"ui/*\" --delete files\n\\`\\`\\`\n\nThis removes the components from the bitmap as well as removes the files.\n\n\n- **.gitignore**\n\nIgnoring any files from version control\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAM,GAAG;EACvB,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,CAAC;AACD"}
1
+ {"version":3,"names":["readme"],"sources":["readme-file.ts"],"sourcesContent":["export function readme() {\n return `# Welcome to your Bit Workspace\n\nTo get started straight away run \\`bit start\\` and open [localhost:3000](http://localhost:3000). It may take a while to build the first time you run this command as it is building the whole User Interface for your development environment.\n\n\\`\\`\\`bash\nbit start\n\\`\\`\\`\n\n## What's included\n\n- **workspace.jsonc**\n\nThis is the main configuration file of your bit workspace. Here you can modify the workspace name and icon as well as default directory and scope. It is where dependencies are found when you install anything. It is also where you register aspects, bit extensions as well as apply the environments for your components. This workspace has been setup so that all components use the React env. However you can create other components and apply other envs to them such as node, html, angular and aspect envs.\n\n- **.bitmap**\n\nThis is an auto-generated file and includes the mapping of your components. There is one component included here. In order to remove this component you can run the following command.\n\n\n- **Demo Components**\n\nA folder (unless the --empty flag was used) containing demo components are included in this workspace. These components are used to demonstrate the different features of Bit. If you would like to remove these components you can run the following command.\n\n\\`\\`\\`jsx\nbit remove \"ui/*\" --delete files\n\\`\\`\\`\n\nThis removes the components from the bitmap as well as removes the files.\n\n\n- **.gitignore**\n\nIgnoring any files from version control\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAMA,CAAA,EAAG;EACvB,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,CAAC;AACD"}
@@ -1 +1 @@
1
- {"version":3,"names":["tsConfig"],"sources":["ts-config.ts"],"sourcesContent":["export const tsConfig = `{\n \"extends\": \"./node_modules/@teambit/react/typescript/tsconfig.json\",\n // \"include\": [],\n \"compilerOptions\": {\n \"noEmit\": true\n },\n \"exclude\": [\n \"dist\"\n ]\n}`;\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AAAC"}
1
+ {"version":3,"names":["tsConfig","exports"],"sources":["ts-config.ts"],"sourcesContent":["export const tsConfig = `{\n \"extends\": \"./node_modules/@teambit/react/typescript/tsconfig.json\",\n // \"include\": [],\n \"compilerOptions\": {\n \"noEmit\": true\n },\n \"exclude\": [\n \"dist\"\n ]\n}`;\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AAACC,OAAA,CAAAD,QAAA,GAAAA,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["assetTypes"],"sources":["asset.ts"],"sourcesContent":["export const assetTypes = `declare module '*.png' {\n const value: any;\n export = value;\n}\ndeclare module '*.svg' {\n import type { FunctionComponent, SVGProps } from 'react';\n\n export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;\n const src: string;\n export default src;\n}\ndeclare module '*.jpg' {\n const value: any;\n export = value;\n}\ndeclare module '*.jpeg' {\n const value: any;\n export = value;\n}\ndeclare module '*.gif' {\n const value: any;\n export = value;\n}\ndeclare module '*.bmp' {\n const value: any;\n export = value;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;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;AAAC"}
1
+ {"version":3,"names":["assetTypes","exports"],"sources":["asset.ts"],"sourcesContent":["export const assetTypes = `declare module '*.png' {\n const value: any;\n export = value;\n}\ndeclare module '*.svg' {\n import type { FunctionComponent, SVGProps } from 'react';\n\n export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;\n const src: string;\n export default src;\n}\ndeclare module '*.jpg' {\n const value: any;\n export = value;\n}\ndeclare module '*.jpeg' {\n const value: any;\n export = value;\n}\ndeclare module '*.gif' {\n const value: any;\n export = value;\n}\ndeclare module '*.bmp' {\n const value: any;\n export = value;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;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;AAACC,OAAA,CAAAD,UAAA,GAAAA,UAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["styleTypes"],"sources":["style.ts"],"sourcesContent":["export const styleTypes = `declare module '*.module.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.module.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.mdx' {\n const component: any;\n export default component;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;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;AAAC"}
1
+ {"version":3,"names":["styleTypes","exports"],"sources":["style.ts"],"sourcesContent":["export const styleTypes = `declare module '*.module.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.module.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.mdx' {\n const component: any;\n export default component;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;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;AAACC,OAAA,CAAAD,UAAA,GAAAA,UAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["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;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,eAAeA,eAAe,CAAC;EAAEC,IAAI;EAAEC;AAA+B,CAAC,EAAEC,WAAiC,EAAE;EACjH,MAAMC,KAAK,GAAGF,YAAY,IAAIG,+BAAkB;EAChD,MAAMC,YAAY,GAAG,MAAM,IAAAC,0CAAgC,GAAE;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
+ {"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 +1 @@
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,aAAa,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;EACpB,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;EACjB,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
+ {"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 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { generateFiles } from './generate-files';\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
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 +1 @@
1
- {"version":3,"names":["html","title"],"sources":["html.ts"],"sourcesContent":["/** html template for Previews (docs, compositions, etc) */\nexport function html(title: string) {\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${title}</title>\n <script>\n // Allow to use react dev-tools inside the examples\n try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}\n </script>\n <!-- minimal css resets -->\n <style> body { margin: 0; } </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n </html>\n `;\n}\n\n// <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>\n"],"mappings":";;;;;;AAAA;AACO,SAASA,IAAI,CAACC,KAAa,EAAE;EAClC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA,eAAeA,KAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA"}
1
+ {"version":3,"names":["html","title"],"sources":["html.ts"],"sourcesContent":["/** html template for Previews (docs, compositions, etc) */\nexport function html(title: string) {\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${title}</title>\n <script>\n // Allow to use react dev-tools inside the examples\n try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}\n </script>\n <!-- minimal css resets -->\n <style> body { margin: 0; } </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n </html>\n `;\n}\n\n// <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>\n"],"mappings":";;;;;;AAAA;AACO,SAASA,IAAIA,CAACC,KAAa,EAAE;EAClC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA,eAAeA,KAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { html } from './html';\n"],"mappings":";;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_html","data","require"],"sources":["index.ts"],"sourcesContent":["export { html } from './html';\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["friendlySyntaxErrorLabel","isLikelyASyntaxError","message","indexOf","formatMessage","lines","split","Array","isArray","forEach","filter","line","test","map","parsingError","exec","errorLine","errorColumn","errorMessage","join","replace","length","trim","splice","match","index","arr","formatWebpackMessages","json","formattedErrors","errors","formattedWarnings","warnings","result","some","module","exports"],"sources":["formatWebpackMessages.js"],"sourcesContent":["/* eslint-disable */\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nconst friendlySyntaxErrorLabel = 'Syntax error:';\n\nfunction isLikelyASyntaxError(message) {\n return message.indexOf(friendlySyntaxErrorLabel) !== -1;\n}\n\n// Cleans up webpack error messages.\nfunction formatMessage(message) {\n let lines = [];\n\n if (typeof message === 'string') {\n lines = message.split('\\n');\n } else if ('message' in message) {\n lines = message['message'].split('\\n');\n } else if (Array.isArray(message)) {\n message.forEach((message) => {\n if ('message' in message) {\n lines = message['message'].split('\\n');\n }\n });\n }\n\n // Strip webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter((line) => !/Module [A-z ]+\\(from/.test(line));\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(line);\n if (!parsingError) {\n return line;\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError;\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;\n });\n\n message = lines.join('\\n');\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(/SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g, `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`);\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n );\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n );\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n );\n lines = message.split('\\n');\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1);\n }\n // Clean up file name\n lines[0] = lines[0].replace(/^(.*) \\d+:\\d+-\\d+$/, '$1');\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {\n lines = [\n lines[0],\n lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ];\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n lines[1] = 'To import Sass files, you first need to install sass.\\n';\n lines[1] += 'Run `bit install sass` inside your workspace.';\n }\n\n message = lines.join('\\n');\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(/^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm, ''); // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, ''); // at <anonymous>\n lines = message.split('\\n');\n\n // Remove duplicated newlines\n lines = lines.filter(\n (line, index, arr) => index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n );\n\n // Reassemble the message\n message = lines.join('\\n');\n return message.trim();\n}\n\nfunction formatWebpackMessages(json) {\n const formattedErrors = json.errors.map(formatMessage);\n const formattedWarnings = json.warnings.map(formatMessage);\n const result = { errors: formattedErrors, warnings: formattedWarnings };\n if (result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n }\n return result;\n}\n\nmodule.exports = formatWebpackMessages;\n"],"mappings":"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"}
1
+ {"version":3,"names":["require","friendlySyntaxErrorLabel","isLikelyASyntaxError","message","indexOf","formatMessage","lines","split","Array","isArray","forEach","filter","line","test","map","parsingError","exec","errorLine","errorColumn","errorMessage","join","replace","length","trim","splice","match","index","arr","formatWebpackMessages","json","formattedErrors","errors","formattedWarnings","warnings","result","some","module","exports"],"sources":["formatWebpackMessages.js"],"sourcesContent":["/* eslint-disable */\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nconst friendlySyntaxErrorLabel = 'Syntax error:';\n\nfunction isLikelyASyntaxError(message) {\n return message.indexOf(friendlySyntaxErrorLabel) !== -1;\n}\n\n// Cleans up webpack error messages.\nfunction formatMessage(message) {\n let lines = [];\n\n if (typeof message === 'string') {\n lines = message.split('\\n');\n } else if ('message' in message) {\n lines = message['message'].split('\\n');\n } else if (Array.isArray(message)) {\n message.forEach((message) => {\n if ('message' in message) {\n lines = message['message'].split('\\n');\n }\n });\n }\n\n // Strip webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter((line) => !/Module [A-z ]+\\(from/.test(line));\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(line);\n if (!parsingError) {\n return line;\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError;\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;\n });\n\n message = lines.join('\\n');\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(/SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g, `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`);\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n );\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n );\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n );\n lines = message.split('\\n');\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1);\n }\n // Clean up file name\n lines[0] = lines[0].replace(/^(.*) \\d+:\\d+-\\d+$/, '$1');\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {\n lines = [\n lines[0],\n lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ];\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n lines[1] = 'To import Sass files, you first need to install sass.\\n';\n lines[1] += 'Run `bit install sass` inside your workspace.';\n }\n\n message = lines.join('\\n');\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(/^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm, ''); // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, ''); // at <anonymous>\n lines = message.split('\\n');\n\n // Remove duplicated newlines\n lines = lines.filter(\n (line, index, arr) => index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n );\n\n // Reassemble the message\n message = lines.join('\\n');\n return message.trim();\n}\n\nfunction formatWebpackMessages(json) {\n const formattedErrors = json.errors.map(formatMessage);\n const formattedWarnings = json.warnings.map(formatMessage);\n const result = { errors: formattedErrors, warnings: formattedWarnings };\n if (result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n }\n return result;\n}\n\nmodule.exports = formatWebpackMessages;\n"],"mappings":"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"}