@teambit/generator 0.0.1144 → 0.0.1146
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-template.d.ts +39 -22
- package/dist/component-template.js.map +1 -1
- package/dist/create.cmd.d.ts +10 -9
- package/dist/create.cmd.js +15 -12
- package/dist/create.cmd.js.map +1 -1
- package/dist/generator.graphql.d.ts +4 -0
- package/dist/generator.graphql.js +12 -1
- package/dist/generator.graphql.js.map +1 -1
- package/dist/generator.main.runtime.d.ts +5 -5
- package/dist/generator.main.runtime.js +16 -29
- package/dist/generator.main.runtime.js.map +1 -1
- package/dist/new.cmd.d.ts +6 -7
- package/dist/new.cmd.js +4 -0
- package/dist/new.cmd.js.map +1 -1
- package/dist/{preview-1693279117198.js → preview-1693538278577.js} +2 -2
- package/dist/templates/basic/basic.starter.d.ts +3 -0
- package/dist/templates/basic/basic.starter.js +39 -0
- package/dist/templates/basic/basic.starter.js.map +1 -0
- package/dist/templates/basic/index.d.ts +1 -0
- package/dist/templates/basic/index.js +20 -0
- package/dist/templates/basic/index.js.map +1 -0
- package/dist/templates/basic/template/files/git-ignore.d.ts +1 -0
- package/dist/templates/basic/template/files/git-ignore.js +118 -0
- package/dist/templates/basic/template/files/git-ignore.js.map +1 -0
- package/dist/templates/basic/template/files/workspace-config.d.ts +2 -0
- package/dist/templates/{workspace-generator/index.js → basic/template/files/workspace-config.js} +35 -11
- package/dist/templates/basic/template/files/workspace-config.js.map +1 -0
- package/dist/templates/component-generator/files/component-template-files/component.d.ts +1 -0
- package/dist/templates/component-generator/files/component-template-files/component.js +35 -0
- package/dist/templates/component-generator/files/component-template-files/component.js.map +1 -0
- package/dist/templates/component-generator/files/component-template-files/composition.d.ts +1 -0
- package/dist/templates/component-generator/files/component-template-files/composition.js +29 -0
- package/dist/templates/component-generator/files/component-template-files/composition.js.map +1 -0
- package/dist/templates/component-generator/files/component-template-files/index-file.d.ts +1 -0
- package/dist/templates/component-generator/files/component-template-files/index-file.js +24 -0
- package/dist/templates/component-generator/files/component-template-files/index-file.js.map +1 -0
- package/dist/templates/component-generator/files/component-template-files/test.d.ts +1 -0
- package/dist/templates/component-generator/files/component-template-files/test.js +31 -0
- package/dist/templates/component-generator/files/component-template-files/test.js.map +1 -0
- package/dist/templates/component-generator/files/component-template.d.ts +2 -0
- package/dist/templates/component-generator/files/component-template.js +67 -0
- package/dist/templates/component-generator/files/component-template.js.map +1 -0
- package/dist/templates/component-generator/files/index.d.ts +1 -1
- package/dist/templates/component-generator/files/index.js +1 -5
- package/dist/templates/component-generator/files/index.js.map +1 -1
- package/dist/templates/component-generator/index.d.ts +1 -1
- package/dist/templates/component-generator/index.js +36 -16
- package/dist/templates/component-generator/index.js.map +1 -1
- package/dist/templates/{component-generator → component-generator-standalone}/files/aspect-file.d.ts +1 -1
- package/dist/templates/component-generator-standalone/files/aspect-file.js.map +1 -0
- package/dist/templates/component-generator-standalone/files/index.d.ts +2 -0
- package/dist/templates/component-generator-standalone/files/index.js +19 -0
- package/dist/templates/component-generator-standalone/files/index.js.map +1 -0
- package/dist/templates/{component-generator → component-generator-standalone}/files/main-runtime.d.ts +1 -1
- package/dist/templates/component-generator-standalone/files/main-runtime.js.map +1 -0
- package/dist/templates/component-generator-standalone/index.d.ts +2 -0
- package/dist/templates/component-generator-standalone/index.js +64 -0
- package/dist/templates/component-generator-standalone/index.js.map +1 -0
- package/dist/templates/index.d.ts +4 -0
- package/dist/templates/index.js +59 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/starter/files/doc-file.d.ts +2 -0
- package/dist/templates/starter/files/doc-file.js +33 -0
- package/dist/templates/starter/files/doc-file.js.map +1 -0
- package/dist/templates/starter/files/generate-files.d.ts +1 -0
- package/dist/templates/starter/files/generate-files.js +35 -0
- package/dist/templates/starter/files/generate-files.js.map +1 -0
- package/dist/templates/starter/files/index.d.ts +1 -1
- package/dist/templates/starter/files/index.js +1 -1
- package/dist/templates/starter/files/index.js.map +1 -1
- package/dist/templates/starter/files/starter.d.ts +2 -1
- package/dist/templates/starter/files/starter.js +39 -29
- package/dist/templates/starter/files/starter.js.map +1 -1
- package/dist/templates/starter/files/workspace-config-tpl.js +7 -1
- package/dist/templates/starter/files/workspace-config-tpl.js.map +1 -1
- package/dist/templates/starter/index.d.ts +1 -1
- package/dist/templates/starter/index.js +16 -16
- package/dist/templates/starter/index.js.map +1 -1
- package/dist/templates/starter-standalone/files/doc-file.d.ts +2 -0
- package/dist/templates/starter-standalone/files/doc-file.js +33 -0
- package/dist/templates/starter-standalone/files/doc-file.js.map +1 -0
- package/dist/templates/starter-standalone/files/git-ignore-tpl.d.ts +1 -0
- package/dist/templates/starter-standalone/files/git-ignore-tpl.js +121 -0
- package/dist/templates/starter-standalone/files/git-ignore-tpl.js.map +1 -0
- package/dist/templates/starter-standalone/files/index.d.ts +2 -0
- package/dist/templates/starter-standalone/files/index.js +15 -0
- package/dist/templates/starter-standalone/files/index.js.map +1 -0
- package/dist/templates/starter-standalone/files/starter.d.ts +2 -0
- package/dist/templates/starter-standalone/files/starter.js +44 -0
- package/dist/templates/starter-standalone/files/starter.js.map +1 -0
- package/dist/templates/starter-standalone/files/workspace-config-tpl.d.ts +1 -0
- package/dist/templates/starter-standalone/files/workspace-config-tpl.js +30 -0
- package/dist/templates/starter-standalone/files/workspace-config-tpl.js.map +1 -0
- package/dist/templates/starter-standalone/index.d.ts +2 -0
- package/dist/templates/starter-standalone/index.js +73 -0
- package/dist/templates/starter-standalone/index.js.map +1 -0
- package/dist/workspace-generator.js +17 -1
- package/dist/workspace-generator.js.map +1 -1
- package/dist/workspace-template.d.ts +37 -29
- package/dist/workspace-template.js.map +1 -1
- package/package.json +22 -22
- package/templates/basic/basic.starter.ts +22 -0
- package/templates/basic/index.ts +1 -0
- package/templates/basic/template/files/git-ignore.ts +110 -0
- package/templates/basic/template/files/workspace-config.ts +33 -0
- package/templates/component-generator/files/component-template-files/component.ts +26 -0
- package/templates/component-generator/files/component-template-files/composition.ts +20 -0
- package/templates/component-generator/files/component-template-files/index-file.ts +15 -0
- package/templates/component-generator/files/component-template-files/test.ts +22 -0
- package/templates/component-generator/files/component-template.ts +58 -0
- package/templates/component-generator/files/index.ts +2 -6
- package/templates/component-generator/index.ts +22 -12
- package/templates/{component-generator → component-generator-standalone}/files/aspect-file.ts +1 -1
- package/templates/component-generator-standalone/files/index.ts +10 -0
- package/templates/{component-generator → component-generator-standalone}/files/main-runtime.ts +1 -1
- package/templates/component-generator-standalone/index.ts +39 -0
- package/templates/index.ts +4 -0
- package/templates/starter/files/doc-file.ts +24 -0
- package/templates/starter/files/generate-files.ts +27 -0
- package/templates/starter/files/index.ts +2 -2
- package/templates/starter/files/starter.ts +37 -28
- package/templates/starter/files/workspace-config-tpl.ts +7 -1
- package/templates/starter/index.ts +13 -11
- package/templates/starter-standalone/files/doc-file.ts +24 -0
- package/templates/starter-standalone/files/git-ignore-tpl.ts +113 -0
- package/templates/starter-standalone/files/index.ts +6 -0
- package/templates/starter-standalone/files/starter.ts +35 -0
- package/templates/starter-standalone/files/workspace-config-tpl.ts +22 -0
- package/templates/starter-standalone/index.ts +44 -0
- package/dist/templates/component-generator/files/aspect-file.js.map +0 -1
- package/dist/templates/component-generator/files/main-runtime.js.map +0 -1
- package/dist/templates/starter/files/docs-file.d.ts +0 -1
- package/dist/templates/starter/files/docs-file.js +0 -45
- package/dist/templates/starter/files/docs-file.js.map +0 -1
- package/dist/templates/starter/files/readme-tpl.d.ts +0 -1
- package/dist/templates/starter/files/readme-tpl.js +0 -47
- package/dist/templates/starter/files/readme-tpl.js.map +0 -1
- package/dist/templates/workspace-generator/index.d.ts +0 -2
- package/dist/templates/workspace-generator/index.js.map +0 -1
- package/templates/starter/files/docs-file.ts +0 -37
- package/templates/starter/files/readme-tpl.ts +0 -39
- package/templates/workspace-generator/index.ts +0 -10
- /package/dist/templates/{component-generator → component-generator-standalone}/files/aspect-file.js +0 -0
- /package/dist/templates/{component-generator → component-generator-standalone}/files/docs-file.d.ts +0 -0
- /package/dist/templates/{component-generator → component-generator-standalone}/files/docs-file.js +0 -0
- /package/dist/templates/{component-generator → component-generator-standalone}/files/docs-file.js.map +0 -0
- /package/dist/templates/{component-generator → component-generator-standalone}/files/main-runtime.js +0 -0
- /package/templates/{component-generator → component-generator-standalone}/files/docs-file.ts +0 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ComponentContext, ComponentTemplate } from '@teambit/generator';
|
2
|
+
import { indexFile } from './files/index';
|
3
|
+
import { starterFile } from './files/starter';
|
4
|
+
import { docFile } from './files/doc-file';
|
5
|
+
import { gitIgnoreTemplate } from './files/git-ignore-tpl';
|
6
|
+
import { workspaceConfigTemplate } from './files/workspace-config-tpl';
|
7
|
+
|
8
|
+
export const starterTemplate: ComponentTemplate = {
|
9
|
+
name: 'standalone-starter',
|
10
|
+
description:
|
11
|
+
'create your own workspace starter (standalone) - \nDocs: https://bit.dev/reference/starters/create-starter',
|
12
|
+
generateFiles: (context: ComponentContext) => {
|
13
|
+
return [
|
14
|
+
{
|
15
|
+
relativePath: 'index.ts',
|
16
|
+
content: indexFile(context),
|
17
|
+
isMain: true,
|
18
|
+
},
|
19
|
+
{
|
20
|
+
relativePath: `${context.name}.starter.ts`,
|
21
|
+
content: starterFile(context),
|
22
|
+
},
|
23
|
+
{
|
24
|
+
relativePath: `${context.name}.docs.mdx`,
|
25
|
+
content: docFile(context),
|
26
|
+
},
|
27
|
+
{
|
28
|
+
relativePath: 'template/files/git-ignore.ts',
|
29
|
+
content: gitIgnoreTemplate(),
|
30
|
+
},
|
31
|
+
|
32
|
+
{
|
33
|
+
relativePath: 'template/files/workspace-config.ts',
|
34
|
+
content: workspaceConfigTemplate(),
|
35
|
+
},
|
36
|
+
];
|
37
|
+
},
|
38
|
+
config: {
|
39
|
+
'teambit.harmony/aspect': {},
|
40
|
+
'teambit.envs/envs': {
|
41
|
+
env: 'teambit.harmony/aspect',
|
42
|
+
},
|
43
|
+
},
|
44
|
+
};
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["aspectFile","namePascalCase","componentId"],"sources":["aspect-file.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function aspectFile({ namePascalCase, componentId }: ComponentContext) {\n return `import { Aspect } from '@teambit/harmony';\n\nexport const ${namePascalCase}Aspect = Aspect.create({\n id: '${componentId}',\n});\n `;\n}\n"],"mappings":";;;;;;AAEO,SAASA,UAAUA,CAAC;EAAEC,cAAc;EAAEC;AAA8B,CAAC,EAAE;EAC5E,OAAQ;AACV;AACA,eAAeD,cAAe;AAC9B,SAASC,WAAY;AACrB;AACA,GAAG;AACH"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["mainRuntime","name","namePascalCase"],"sources":["main-runtime.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function mainRuntime({ name, namePascalCase }: ComponentContext) {\n return `import { MainRuntime } from '@teambit/cli';\nimport { GeneratorMain, GeneratorAspect, ComponentContext } from '@teambit/generator';\nimport { ${namePascalCase}Aspect } from './${name}.aspect';\n\nexport class ${namePascalCase}Main {\n static slots = [];\n static dependencies = [GeneratorAspect];\n static runtime = MainRuntime;\n static async provider([generator]: [GeneratorMain]) {\n /**\n * Array of templates. Add as many templates as you want\n * Separate the templates to multiple files if you prefer\n * Modify, add or remove files as needed\n * See the docs file of this component for more info\n */\n\n if (generator) generator.registerComponentTemplate([\n {\n name: 'component1',\n description: 'description for component1',\n generateFiles: (context: ComponentContext) => {\n return [\n\n // index file\n {\n relativePath: 'index.ts',\n isMain: true,\n content: \\`export { \\${context.namePascalCase} } from './\\${context.name}';\nexport type { \\${context.namePascalCase}Props } from './\\${context.name}';\n\\`,\n },\n\n // component file\n {\n relativePath: \\`\\${context.name}.tsx\\`,\n content: \\`import React from 'react';\n\nexport type \\${context.namePascalCase}Props = {\n /**\n * a text to be rendered in the component.\n */\n text: string\n};\n\nexport function \\${context.namePascalCase}({ text }: \\${context.namePascalCase}Props) {\n return (\n <div>\n {text}\n </div>\n );\n}\\`,\n },\n\n // docs file\n {\n relativePath: \\`\\${context.name}.docs.mdx\\`,\n content: \\`---\ndescription: 'A React Component for rendering text.'\nlabels: ['text', 'ui']\n---\n\nimport { \\${context.namePascalCase} } from './\\${context.name}';\n\\`\n },\n\n // composition file\n {\n relativePath: \\`\\${context.name}.composition.tsx\\`,\n content: \\`import React from 'react';\nimport { \\${context.namePascalCase} } from './\\${context.name}';\n\nexport const Basic\\${context.namePascalCase} = () => (\n <\\${context.namePascalCase} text=\"hello from \\${context.namePascalCase} \" />\n);\n\\`\n },\n\n // test file\n {\n relativePath: \\`\\${context.name}.spec.tsx\\`,\n content: \\`import React from 'react';\nimport { render } from '@testing-library/react';\nimport { Basic\\${context.namePascalCase} } from './\\${context.name}.composition';\n\nit('should render with the correct text', () => {\n const { getByText } = render(<Basic\\${context.namePascalCase} />);\n const rendered = getByText('hello from \\${context.namePascalCase}');\n expect(rendered).toBeTruthy();\n});\n\\`\n },\n // add more files here such as css/sass\n ];\n },\n },\n\n // component 2\n {\n name: 'component2',\n description: 'description for component2',\n generateFiles: (context: ComponentContext) => {\n return [\n\n // index file\n {\n relativePath: 'index.ts',\n isMain: true,\n content: \\`export {} from '';\n\\`,\n },\n ]\n }\n }\n ]);\n\n return new ${namePascalCase}Main();\n }\n}\n\n${namePascalCase}Aspect.addRuntime(${namePascalCase}Main);\n`;\n}\n"],"mappings":";;;;;;AAEO,SAASA,WAAWA,CAAC;EAAEC,IAAI;EAAEC;AAAiC,CAAC,EAAE;EACtE,OAAQ;AACV;AACA,WAAWA,cAAe,oBAAmBD,IAAK;AAClD;AACA,eAAeC,cAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiBA,cAAe;AAChC;AACA;AACA;AACA,EAAEA,cAAe,qBAAoBA,cAAe;AACpD,CAAC;AACD"}
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function docsFile(): string;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.docsFile = docsFile;
|
7
|
-
function docsFile() {
|
8
|
-
return `---
|
9
|
-
description: Generator for generating a workspace
|
10
|
-
labels: ['generator', 'templates', 'workspace']
|
11
|
-
---
|
12
|
-
|
13
|
-
## Registering your Workspace
|
14
|
-
|
15
|
-
Register your workspace template under the aspect environment in the variants section of the workspace.jsonc file.
|
16
|
-
|
17
|
-
\`\`\`json
|
18
|
-
"teambit.workspace/variants": {
|
19
|
-
"{workspace-name}": {
|
20
|
-
"teambit.harmony/aspect": {}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
\`\`\`
|
24
|
-
|
25
|
-
## Customizing your Workspace
|
26
|
-
|
27
|
-
See the docs for more info on [Customizing your Generator](https://harmony-docs.bit.dev/extending-bit/creating-a-custom-workspace-generator)
|
28
|
-
|
29
|
-
## Using the Workspace Generator
|
30
|
-
|
31
|
-
How to use this generator locally, essentially for development purposes:
|
32
|
-
|
33
|
-
\`\`\`js
|
34
|
-
bit new <template-name> <workspace-name> --load-from /Users/me/path/to/this/dir --aspect <workspace-template-id>
|
35
|
-
\`\`\`
|
36
|
-
|
37
|
-
How to use this generator after exporting to a remote scope:
|
38
|
-
|
39
|
-
\`\`\`js
|
40
|
-
bit new <template-name> <workspace-name> --aspect <workspace-template-id>
|
41
|
-
\`\`\`
|
42
|
-
`;
|
43
|
-
}
|
44
|
-
|
45
|
-
//# sourceMappingURL=docs-file.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["docsFile"],"sources":["docs-file.ts"],"sourcesContent":["export function docsFile() {\n return `---\ndescription: Generator for generating a workspace\nlabels: ['generator', 'templates', 'workspace']\n---\n\n## Registering your Workspace\n\nRegister your workspace template under the aspect environment in the variants section of the workspace.jsonc file.\n\n\\`\\`\\`json\n\"teambit.workspace/variants\": {\n \"{workspace-name}\": {\n \"teambit.harmony/aspect\": {}\n }\n }\n\\`\\`\\`\n\n## Customizing your Workspace\n\nSee the docs for more info on [Customizing your Generator](https://harmony-docs.bit.dev/extending-bit/creating-a-custom-workspace-generator)\n\n## Using the Workspace Generator\n\nHow to use this generator locally, essentially for development purposes:\n\n\\`\\`\\`js\nbit new <template-name> <workspace-name> --load-from /Users/me/path/to/this/dir --aspect <workspace-template-id>\n\\`\\`\\`\n\nHow to use this generator after exporting to a remote scope:\n\n\\`\\`\\`js\nbit new <template-name> <workspace-name> --aspect <workspace-template-id>\n\\`\\`\\`\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,QAAQA,CAAA,EAAG;EACzB,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,CAAC;AACD"}
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function readmeTemplate(): string;
|
@@ -1,47 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.readmeTemplate = readmeTemplate;
|
7
|
-
function readmeTemplate() {
|
8
|
-
return `export function readme() {
|
9
|
-
return \`## Workspace Generator
|
10
|
-
|
11
|
-
Easily generate a new workspace with a single command.
|
12
|
-
|
13
|
-
## Registering your Workspace
|
14
|
-
|
15
|
-
Register your workspace template under the aspect environment in the variants section of the workspace.jsonc file.
|
16
|
-
|
17
|
-
\\\`\\\`\\\`json
|
18
|
-
"teambit.workspace/variants": {
|
19
|
-
"{workspace-name}": {
|
20
|
-
"teambit.harmony/aspect": {}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
\\\`\\\`\\\`
|
24
|
-
|
25
|
-
## Customizing your Workspace
|
26
|
-
|
27
|
-
See the docs for more info on [Customizing your Generator](https://harmony-docs.bit.dev/extending-bit/creating-a-custom-workspace-generator)
|
28
|
-
|
29
|
-
## Using the Workspace Generator
|
30
|
-
|
31
|
-
How to use this generator locally, essentially for development purposes:
|
32
|
-
|
33
|
-
\\\`\\\`\\\`js
|
34
|
-
bit new <template-name> <workspace-name> --load-from /Users/me/path/to/this/dir --aspect <workspace-template-id>
|
35
|
-
\\\`\\\`\\\`
|
36
|
-
|
37
|
-
How to use this generator after exporting to a remote scope:
|
38
|
-
|
39
|
-
\\\`\\\`\\\`js
|
40
|
-
bit new <template-name> <workspace-name> --aspect <workspace-template-id>
|
41
|
-
\\\`\\\`\\\`
|
42
|
-
\`;
|
43
|
-
}
|
44
|
-
`;
|
45
|
-
}
|
46
|
-
|
47
|
-
//# sourceMappingURL=readme-tpl.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["readmeTemplate"],"sources":["readme-tpl.ts"],"sourcesContent":["export function readmeTemplate() {\n return `export function readme() {\n return \\`## Workspace Generator\n\nEasily generate a new workspace with a single command.\n\n## Registering your Workspace\n\nRegister your workspace template under the aspect environment in the variants section of the workspace.jsonc file.\n\n\\\\\\`\\\\\\`\\\\\\`json\n\"teambit.workspace/variants\": {\n \"{workspace-name}\": {\n \"teambit.harmony/aspect\": {}\n }\n }\n\\\\\\`\\\\\\`\\\\\\`\n\n## Customizing your Workspace\n\nSee the docs for more info on [Customizing your Generator](https://harmony-docs.bit.dev/extending-bit/creating-a-custom-workspace-generator)\n\n## Using the Workspace Generator\n\nHow to use this generator locally, essentially for development purposes:\n\n\\\\\\`\\\\\\`\\\\\\`js\nbit new <template-name> <workspace-name> --load-from /Users/me/path/to/this/dir --aspect <workspace-template-id>\n\\\\\\`\\\\\\`\\\\\\`\n\nHow to use this generator after exporting to a remote scope:\n\n\\\\\\`\\\\\\`\\\\\\`js\nbit new <template-name> <workspace-name> --aspect <workspace-template-id>\n\\\\\\`\\\\\\`\\\\\\`\n\\`;\n}\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,cAAcA,CAAA,EAAG;EAC/B,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_starter","data","require","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","workspaceGeneratorTemplate","starterTemplate","name","description","exports"],"sources":["index.ts"],"sourcesContent":["import { ComponentTemplate } from '@teambit/generator';\nimport { starterTemplate } from '../starter';\n\n// TODO: This is deprecated and should be removed once we update the docs to use the new starter template.\nexport const workspaceGeneratorTemplate: ComponentTemplate = {\n ...starterTemplate,\n name: 'workspace-generator',\n description:\n 'DEPRECATED: use \"starter\" instead.\\ncreate your own workspace generator - \\nDocs: https://bit.dev/docs/dev-services/generator/generate-workspace',\n};\n"],"mappings":";;;;;;;;;;;;;;AACA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6C,SAAAE,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,QAAAC,gBAAA,GAAAC,OAAA,EAAAR,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,GAAA,SAAAhB,MAAA,CAAAmB,yBAAA,GAAAnB,MAAA,CAAAoB,gBAAA,CAAAV,MAAA,EAAAV,MAAA,CAAAmB,yBAAA,CAAAL,MAAA,KAAAlB,OAAA,CAAAI,MAAA,CAAAc,MAAA,GAAAC,OAAA,WAAAC,GAAA,IAAAhB,MAAA,CAAAqB,cAAA,CAAAX,MAAA,EAAAM,GAAA,EAAAhB,MAAA,CAAAK,wBAAA,CAAAS,MAAA,EAAAE,GAAA,iBAAAN,MAAA;AAE7C;AACO,MAAMY,0BAA6C,GAAAb,aAAA,CAAAA,aAAA,KACrDc,0BAAe;EAClBC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EACT;AAAkJ,EACrJ;AAACC,OAAA,CAAAJ,0BAAA,GAAAA,0BAAA"}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
export function docsFile() {
|
2
|
-
return `---
|
3
|
-
description: Generator for generating a workspace
|
4
|
-
labels: ['generator', 'templates', 'workspace']
|
5
|
-
---
|
6
|
-
|
7
|
-
## Registering your Workspace
|
8
|
-
|
9
|
-
Register your workspace template under the aspect environment in the variants section of the workspace.jsonc file.
|
10
|
-
|
11
|
-
\`\`\`json
|
12
|
-
"teambit.workspace/variants": {
|
13
|
-
"{workspace-name}": {
|
14
|
-
"teambit.harmony/aspect": {}
|
15
|
-
}
|
16
|
-
}
|
17
|
-
\`\`\`
|
18
|
-
|
19
|
-
## Customizing your Workspace
|
20
|
-
|
21
|
-
See the docs for more info on [Customizing your Generator](https://harmony-docs.bit.dev/extending-bit/creating-a-custom-workspace-generator)
|
22
|
-
|
23
|
-
## Using the Workspace Generator
|
24
|
-
|
25
|
-
How to use this generator locally, essentially for development purposes:
|
26
|
-
|
27
|
-
\`\`\`js
|
28
|
-
bit new <template-name> <workspace-name> --load-from /Users/me/path/to/this/dir --aspect <workspace-template-id>
|
29
|
-
\`\`\`
|
30
|
-
|
31
|
-
How to use this generator after exporting to a remote scope:
|
32
|
-
|
33
|
-
\`\`\`js
|
34
|
-
bit new <template-name> <workspace-name> --aspect <workspace-template-id>
|
35
|
-
\`\`\`
|
36
|
-
`;
|
37
|
-
}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
export function readmeTemplate() {
|
2
|
-
return `export function readme() {
|
3
|
-
return \`## Workspace Generator
|
4
|
-
|
5
|
-
Easily generate a new workspace with a single command.
|
6
|
-
|
7
|
-
## Registering your Workspace
|
8
|
-
|
9
|
-
Register your workspace template under the aspect environment in the variants section of the workspace.jsonc file.
|
10
|
-
|
11
|
-
\\\`\\\`\\\`json
|
12
|
-
"teambit.workspace/variants": {
|
13
|
-
"{workspace-name}": {
|
14
|
-
"teambit.harmony/aspect": {}
|
15
|
-
}
|
16
|
-
}
|
17
|
-
\\\`\\\`\\\`
|
18
|
-
|
19
|
-
## Customizing your Workspace
|
20
|
-
|
21
|
-
See the docs for more info on [Customizing your Generator](https://harmony-docs.bit.dev/extending-bit/creating-a-custom-workspace-generator)
|
22
|
-
|
23
|
-
## Using the Workspace Generator
|
24
|
-
|
25
|
-
How to use this generator locally, essentially for development purposes:
|
26
|
-
|
27
|
-
\\\`\\\`\\\`js
|
28
|
-
bit new <template-name> <workspace-name> --load-from /Users/me/path/to/this/dir --aspect <workspace-template-id>
|
29
|
-
\\\`\\\`\\\`
|
30
|
-
|
31
|
-
How to use this generator after exporting to a remote scope:
|
32
|
-
|
33
|
-
\\\`\\\`\\\`js
|
34
|
-
bit new <template-name> <workspace-name> --aspect <workspace-template-id>
|
35
|
-
\\\`\\\`\\\`
|
36
|
-
\`;
|
37
|
-
}
|
38
|
-
`;
|
39
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { ComponentTemplate } from '@teambit/generator';
|
2
|
-
import { starterTemplate } from '../starter';
|
3
|
-
|
4
|
-
// TODO: This is deprecated and should be removed once we update the docs to use the new starter template.
|
5
|
-
export const workspaceGeneratorTemplate: ComponentTemplate = {
|
6
|
-
...starterTemplate,
|
7
|
-
name: 'workspace-generator',
|
8
|
-
description:
|
9
|
-
'DEPRECATED: use "starter" instead.\ncreate your own workspace generator - \nDocs: https://bit.dev/docs/dev-services/generator/generate-workspace',
|
10
|
-
};
|
/package/dist/templates/{component-generator → component-generator-standalone}/files/aspect-file.js
RENAMED
File without changes
|
/package/dist/templates/{component-generator → component-generator-standalone}/files/docs-file.d.ts
RENAMED
File without changes
|
/package/dist/templates/{component-generator → component-generator-standalone}/files/docs-file.js
RENAMED
File without changes
|
File without changes
|
/package/dist/templates/{component-generator → component-generator-standalone}/files/main-runtime.js
RENAMED
File without changes
|
/package/templates/{component-generator → component-generator-standalone}/files/docs-file.ts
RENAMED
File without changes
|