@teambit/generator 0.0.553 → 0.0.557

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 (37) hide show
  1. package/dist/component-generator.d.ts +3 -0
  2. package/dist/component-template.d.ts +37 -0
  3. package/dist/generator.main.runtime.d.ts +29 -0
  4. package/dist/workspace-generator.d.ts +3 -0
  5. package/dist/workspace-template.d.ts +45 -0
  6. package/package.json +28 -20
  7. package/tsconfig.json +1 -2
  8. package/component-generator.ts +0 -119
  9. package/component-template.ts +0 -66
  10. package/create.cmd.ts +0 -44
  11. package/generator.aspect.ts +0 -5
  12. package/generator.docs.mdx +0 -8
  13. package/generator.graphql.ts +0 -66
  14. package/generator.main.runtime.ts +0 -279
  15. package/index.ts +0 -4
  16. package/new.cmd.ts +0 -79
  17. package/package-tar/teambit-generator-0.0.553.tgz +0 -0
  18. package/templates/component-generator/files/aspect-file.ts +0 -10
  19. package/templates/component-generator/files/docs-file.ts +0 -54
  20. package/templates/component-generator/files/index.ts +0 -10
  21. package/templates/component-generator/files/main-runtime.ts +0 -125
  22. package/templates/component-generator/index.ts +0 -32
  23. package/templates/workspace-generator/files/aspect-file.ts +0 -10
  24. package/templates/workspace-generator/files/docs-file.ts +0 -37
  25. package/templates/workspace-generator/files/git-ignore-tpl.ts +0 -113
  26. package/templates/workspace-generator/files/index-tpl.ts +0 -29
  27. package/templates/workspace-generator/files/index.ts +0 -10
  28. package/templates/workspace-generator/files/main-runtime.ts +0 -24
  29. package/templates/workspace-generator/files/readme-tpl.ts +0 -39
  30. package/templates/workspace-generator/files/workspace-config-tpl.ts +0 -18
  31. package/templates/workspace-generator/index.ts +0 -52
  32. package/templates.cmd.ts +0 -48
  33. package/types/asset.d.ts +0 -29
  34. package/types/style.d.ts +0 -42
  35. package/types.ts +0 -3
  36. package/workspace-generator.ts +0 -246
  37. package/workspace-template.ts +0 -82
@@ -1,82 +0,0 @@
1
- import type { Component } from '@teambit/component';
2
-
3
- export interface WorkspaceFile {
4
- /**
5
- * relative path of the file within the workspace.
6
- */
7
- relativePath: string;
8
-
9
- /**
10
- * file content
11
- */
12
- content: string;
13
- }
14
-
15
- export interface WorkspaceContext {
16
- /**
17
- * workspace-name as entered by the user, e.g. `react-app`.
18
- * it is used as the directory name for the workspace.
19
- */
20
- name: string;
21
-
22
- /**
23
- * default scope as entered by the user.
24
- * it will be set in the workspace.jsonc and be used for components
25
- */
26
- defaultScope?: string;
27
-
28
- /**
29
- * whether user entered `--empty` flag in `bit new` to avoid creating components.
30
- */
31
- empty?: boolean;
32
-
33
- /**
34
- * in case the "--aspect" flag used to import a remote aspect, this is populated with that aspect.
35
- * useful to get the aspect-id and other info.
36
- */
37
- aspectComponent?: Component;
38
- }
39
-
40
- export interface ComponentToImport {
41
- /**
42
- * full component id
43
- */
44
- id: string;
45
-
46
- /**
47
- * path where to write the component
48
- */
49
- path: string;
50
-
51
- /**
52
- * a new component name. if not specified, use the original id (without the scope)
53
- */
54
- targetName?: string;
55
- }
56
-
57
- export interface WorkspaceTemplate {
58
- /**
59
- * name of the workspace template. for example: `react-workspace`.
60
- */
61
- name: string;
62
-
63
- /**
64
- * short description of the template. shown in the `bit templates` command when outside of bit-workspace.
65
- */
66
- description?: string;
67
-
68
- /**
69
- * hide this template so that it is not listed with `bit templates`
70
- */
71
- hidden?: boolean;
72
-
73
- /**
74
- * template function for generating the template files,
75
- */
76
- generateFiles(context: WorkspaceContext): Promise<WorkspaceFile[]>;
77
-
78
- /**
79
- * populate existing components into the new workspace and add them as new components
80
- */
81
- importComponents?: () => ComponentToImport[];
82
- }