@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.
- package/dist/component-generator.d.ts +3 -0
- package/dist/component-template.d.ts +37 -0
- package/dist/generator.main.runtime.d.ts +29 -0
- package/dist/workspace-generator.d.ts +3 -0
- package/dist/workspace-template.d.ts +45 -0
- package/package.json +28 -20
- package/tsconfig.json +1 -2
- package/component-generator.ts +0 -119
- package/component-template.ts +0 -66
- package/create.cmd.ts +0 -44
- package/generator.aspect.ts +0 -5
- package/generator.docs.mdx +0 -8
- package/generator.graphql.ts +0 -66
- package/generator.main.runtime.ts +0 -279
- package/index.ts +0 -4
- package/new.cmd.ts +0 -79
- package/package-tar/teambit-generator-0.0.553.tgz +0 -0
- package/templates/component-generator/files/aspect-file.ts +0 -10
- package/templates/component-generator/files/docs-file.ts +0 -54
- package/templates/component-generator/files/index.ts +0 -10
- package/templates/component-generator/files/main-runtime.ts +0 -125
- package/templates/component-generator/index.ts +0 -32
- package/templates/workspace-generator/files/aspect-file.ts +0 -10
- package/templates/workspace-generator/files/docs-file.ts +0 -37
- package/templates/workspace-generator/files/git-ignore-tpl.ts +0 -113
- package/templates/workspace-generator/files/index-tpl.ts +0 -29
- package/templates/workspace-generator/files/index.ts +0 -10
- package/templates/workspace-generator/files/main-runtime.ts +0 -24
- package/templates/workspace-generator/files/readme-tpl.ts +0 -39
- package/templates/workspace-generator/files/workspace-config-tpl.ts +0 -18
- package/templates/workspace-generator/index.ts +0 -52
- package/templates.cmd.ts +0 -48
- package/types/asset.d.ts +0 -29
- package/types/style.d.ts +0 -42
- package/types.ts +0 -3
- package/workspace-generator.ts +0 -246
- package/workspace-template.ts +0 -82
package/workspace-template.ts
DELETED
|
@@ -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
|
-
}
|