@teambit/generator 0.0.881 → 0.0.883
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.js +1 -61
- package/dist/component-generator.js.map +1 -1
- package/dist/create.cmd.js +0 -13
- package/dist/create.cmd.js.map +1 -1
- package/dist/generator.aspect.js +0 -5
- package/dist/generator.aspect.js.map +1 -1
- package/dist/generator.composition.js +0 -6
- package/dist/generator.composition.js.map +1 -1
- package/dist/generator.graphql.js +4 -13
- package/dist/generator.graphql.js.map +1 -1
- package/dist/generator.main.runtime.js +8 -119
- package/dist/generator.main.runtime.js.map +1 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +1 -1
- package/dist/new.cmd.js +0 -18
- package/dist/new.cmd.js.map +1 -1
- package/dist/starter.plugin.js +0 -11
- package/dist/starter.plugin.js.map +1 -1
- package/dist/templates/component-generator/files/aspect-file.js +0 -1
- package/dist/templates/component-generator/files/aspect-file.js.map +1 -1
- package/dist/templates/component-generator/files/docs-file.js +0 -1
- package/dist/templates/component-generator/files/docs-file.js.map +1 -1
- package/dist/templates/component-generator/files/index.js +0 -1
- package/dist/templates/component-generator/files/index.js.map +1 -1
- package/dist/templates/component-generator/files/main-runtime.js +0 -1
- package/dist/templates/component-generator/files/main-runtime.js.map +1 -1
- package/dist/templates/component-generator/index.js +0 -13
- package/dist/templates/component-generator/index.js.map +1 -1
- package/dist/templates/starter/files/docs-file.js +0 -1
- package/dist/templates/starter/files/docs-file.js.map +1 -1
- package/dist/templates/starter/files/git-ignore-tpl.js +0 -1
- package/dist/templates/starter/files/git-ignore-tpl.js.map +1 -1
- package/dist/templates/starter/files/index.js +0 -1
- package/dist/templates/starter/files/index.js.map +1 -1
- package/dist/templates/starter/files/readme-tpl.js +0 -1
- package/dist/templates/starter/files/readme-tpl.js.map +1 -1
- package/dist/templates/starter/files/starter.js +0 -1
- package/dist/templates/starter/files/starter.js.map +1 -1
- package/dist/templates/starter/files/workspace-config-tpl.js +0 -1
- package/dist/templates/starter/files/workspace-config-tpl.js.map +1 -1
- package/dist/templates/starter/index.js +0 -19
- package/dist/templates/starter/index.js.map +1 -1
- package/dist/templates/workspace-generator/index.js +0 -11
- package/dist/templates/workspace-generator/index.js.map +1 -1
- package/dist/templates.cmd.js +4 -22
- package/dist/templates.cmd.js.map +1 -1
- package/dist/workspace-generator.js +3 -74
- package/dist/workspace-generator.js.map +1 -1
- package/package-tar/teambit-generator-0.0.883.tgz +0 -0
- package/package.json +14 -14
- package/{preview-1666409808293.js → preview-1666582798766.js} +2 -2
- package/package-tar/teambit-generator-0.0.881.tgz +0 -0
package/dist/new.cmd.js
CHANGED
|
@@ -1,36 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
|
|
9
6
|
Object.defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
9
|
exports.NewCmd = void 0;
|
|
13
|
-
|
|
14
10
|
function _defineProperty2() {
|
|
15
11
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
|
|
17
12
|
_defineProperty2 = function () {
|
|
18
13
|
return data;
|
|
19
14
|
};
|
|
20
|
-
|
|
21
15
|
return data;
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
function _chalk() {
|
|
25
18
|
const data = _interopRequireDefault(require("chalk"));
|
|
26
|
-
|
|
27
19
|
_chalk = function () {
|
|
28
20
|
return data;
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
return data;
|
|
32
23
|
}
|
|
33
|
-
|
|
34
24
|
class NewCmd {
|
|
35
25
|
constructor(generator) {
|
|
36
26
|
this.generator = generator;
|
|
@@ -48,10 +38,8 @@ class NewCmd {
|
|
|
48
38
|
(0, _defineProperty2().default)(this, "group", 'start');
|
|
49
39
|
(0, _defineProperty2().default)(this, "options", [['a', 'aspect <aspect-id>', 'aspect-id of the template. mandatory for non-core aspects. helpful for core aspects in case of a name collision'], ['d', 'default-scope <scope-name>', `set defaultScope in the new workspace.jsonc`], ['', 'standalone', 'DEPRECATED. use --skip-git instead'], ['s', 'skip-git', 'skip generation of Git repository'], ['e', 'empty', 'empty workspace with no components (relevant for templates that add components by default)'], ['', 'load-from <path-to-template>', 'path to the workspace containing the template. helpful during a development of a workspace-template']]);
|
|
50
40
|
}
|
|
51
|
-
|
|
52
41
|
async report([templateName, workspaceName], options) {
|
|
53
42
|
var _options$skipGit;
|
|
54
|
-
|
|
55
43
|
options.skipGit = (_options$skipGit = options.skipGit) !== null && _options$skipGit !== void 0 ? _options$skipGit : options.standalone;
|
|
56
44
|
const {
|
|
57
45
|
workspacePath,
|
|
@@ -90,20 +78,14 @@ ${_chalk().default.green.bold("Let's get started!")}
|
|
|
90
78
|
${getBottomSection(workspaceName, appName)}
|
|
91
79
|
`);
|
|
92
80
|
}
|
|
93
|
-
|
|
94
81
|
}
|
|
95
|
-
|
|
96
82
|
exports.NewCmd = NewCmd;
|
|
97
|
-
|
|
98
83
|
function getBottomSection(workspaceName, appName) {
|
|
99
84
|
const cdLine = _chalk().default.yellow(`cd ${workspaceName}`);
|
|
100
|
-
|
|
101
85
|
const parts = [cdLine];
|
|
102
|
-
|
|
103
86
|
if (appName) {
|
|
104
87
|
parts.push(_chalk().default.yellow(` bit run ${appName}`));
|
|
105
88
|
}
|
|
106
|
-
|
|
107
89
|
parts.push(_chalk().default.yellow(` bit start`));
|
|
108
90
|
return parts.join('\n');
|
|
109
91
|
}
|
package/dist/new.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NewCmd","constructor","generator","name","description","report","templateName","workspaceName","options","skipGit","standalone","workspacePath","appName","generateWorkspaceTemplate","chalk","white","green","yellow","bold","getBottomSection","cdLine","parts","push","join"],"sources":["new.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { GeneratorMain } from './generator.main.runtime';\n\nexport type NewOptions = {\n aspect?: string;\n defaultScope?: string;\n skipGit?: boolean;\n loadFrom?: string;\n empty?: boolean;\n};\n\nexport class NewCmd implements Command {\n name = 'new <template-name> <workspace-name>';\n description = 'create a new workspace from a template';\n arguments = [\n {\n name: 'template-name',\n description:\n \"the name of the workspace template (run 'bit templates', outside of a workspace, to get a list of available templates)\",\n },\n { name: 'workspace-name', description: 'the name for the new workspace and workspace directory' },\n ];\n alias = '';\n loader = true;\n group = 'start';\n options = [\n [\n 'a',\n 'aspect <aspect-id>',\n 'aspect-id of the template. mandatory for non-core aspects. helpful for core aspects in case of a name collision',\n ],\n ['d', 'default-scope <scope-name>', `set defaultScope in the new workspace.jsonc`],\n ['', 'standalone', 'DEPRECATED. use --skip-git instead'],\n ['s', 'skip-git', 'skip generation of Git repository'],\n ['e', 'empty', 'empty workspace with no components (relevant for templates that add components by default)'],\n [\n '',\n 'load-from <path-to-template>',\n 'path to the workspace containing the template. helpful during a development of a workspace-template',\n ],\n ] as CommandOptions;\n\n constructor(private generator: GeneratorMain) {}\n\n async report([templateName, workspaceName]: [string, string], options: NewOptions & { standalone: boolean }) {\n options.skipGit = options.skipGit ?? options.standalone;\n const { workspacePath, appName } = await this.generator.generateWorkspaceTemplate(\n workspaceName,\n templateName,\n options\n );\n return chalk.white(\n `${chalk.green(`\n\nCongrats! A new workspace has been created successfully at '${workspacePath}'`)}\n\nInside the directory '${workspaceName}' you can run various commands including:\n\n ${chalk.yellow('bit start')}\n Starts the workspace in development mode\n\n ${chalk.yellow('bit install')}\n Installs any missing dependencies\n\n ${chalk.yellow('bit status')}\n Shows the status of the components\n\n ${chalk.yellow('bit compile')}\n Compiles the components\n\n ${chalk.yellow('bit test')}\n Runs the tests on all your components\n\n ${chalk.yellow('bit templates')}\n Shows all available component templates\n\n ${chalk.yellow('bit help')}\n Shows all available commands\n\n\n${chalk.green.bold(\"Let's get started!\")}\n\n ${getBottomSection(workspaceName, appName)}\n `\n );\n }\n}\n\nfunction getBottomSection(workspaceName: string, appName: string | undefined) {\n const cdLine = chalk.yellow(`cd ${workspaceName}`);\n const parts = [cdLine];\n if (appName) {\n parts.push(chalk.yellow(` bit run ${appName}`));\n }\n parts.push(chalk.yellow(` bit start`));\n return parts.join('\\n');\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["NewCmd","constructor","generator","name","description","report","templateName","workspaceName","options","skipGit","standalone","workspacePath","appName","generateWorkspaceTemplate","chalk","white","green","yellow","bold","getBottomSection","cdLine","parts","push","join"],"sources":["new.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { GeneratorMain } from './generator.main.runtime';\n\nexport type NewOptions = {\n aspect?: string;\n defaultScope?: string;\n skipGit?: boolean;\n loadFrom?: string;\n empty?: boolean;\n};\n\nexport class NewCmd implements Command {\n name = 'new <template-name> <workspace-name>';\n description = 'create a new workspace from a template';\n arguments = [\n {\n name: 'template-name',\n description:\n \"the name of the workspace template (run 'bit templates', outside of a workspace, to get a list of available templates)\",\n },\n { name: 'workspace-name', description: 'the name for the new workspace and workspace directory' },\n ];\n alias = '';\n loader = true;\n group = 'start';\n options = [\n [\n 'a',\n 'aspect <aspect-id>',\n 'aspect-id of the template. mandatory for non-core aspects. helpful for core aspects in case of a name collision',\n ],\n ['d', 'default-scope <scope-name>', `set defaultScope in the new workspace.jsonc`],\n ['', 'standalone', 'DEPRECATED. use --skip-git instead'],\n ['s', 'skip-git', 'skip generation of Git repository'],\n ['e', 'empty', 'empty workspace with no components (relevant for templates that add components by default)'],\n [\n '',\n 'load-from <path-to-template>',\n 'path to the workspace containing the template. helpful during a development of a workspace-template',\n ],\n ] as CommandOptions;\n\n constructor(private generator: GeneratorMain) {}\n\n async report([templateName, workspaceName]: [string, string], options: NewOptions & { standalone: boolean }) {\n options.skipGit = options.skipGit ?? options.standalone;\n const { workspacePath, appName } = await this.generator.generateWorkspaceTemplate(\n workspaceName,\n templateName,\n options\n );\n return chalk.white(\n `${chalk.green(`\n\nCongrats! A new workspace has been created successfully at '${workspacePath}'`)}\n\nInside the directory '${workspaceName}' you can run various commands including:\n\n ${chalk.yellow('bit start')}\n Starts the workspace in development mode\n\n ${chalk.yellow('bit install')}\n Installs any missing dependencies\n\n ${chalk.yellow('bit status')}\n Shows the status of the components\n\n ${chalk.yellow('bit compile')}\n Compiles the components\n\n ${chalk.yellow('bit test')}\n Runs the tests on all your components\n\n ${chalk.yellow('bit templates')}\n Shows all available component templates\n\n ${chalk.yellow('bit help')}\n Shows all available commands\n\n\n${chalk.green.bold(\"Let's get started!\")}\n\n ${getBottomSection(workspaceName, appName)}\n `\n );\n }\n}\n\nfunction getBottomSection(workspaceName: string, appName: string | undefined) {\n const cdLine = chalk.yellow(`cd ${workspaceName}`);\n const parts = [cdLine];\n if (appName) {\n parts.push(chalk.yellow(` bit run ${appName}`));\n }\n parts.push(chalk.yellow(` bit start`));\n return parts.join('\\n');\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAWO,MAAMA,MAAM,CAAoB;EA+BrCC,WAAW,CAASC,SAAwB,EAAE;IAAA,KAA1BA,SAAwB,GAAxBA,SAAwB;IAAA,8CA9BrC,sCAAsC;IAAA,qDAC/B,wCAAwC;IAAA,mDAC1C,CACV;MACEC,IAAI,EAAE,eAAe;MACrBC,WAAW,EACT;IACJ,CAAC,EACD;MAAED,IAAI,EAAE,gBAAgB;MAAEC,WAAW,EAAE;IAAyD,CAAC,CAClG;IAAA,+CACO,EAAE;IAAA,gDACD,IAAI;IAAA,+CACL,OAAO;IAAA,iDACL,CACR,CACE,GAAG,EACH,oBAAoB,EACpB,iHAAiH,CAClH,EACD,CAAC,GAAG,EAAE,4BAA4B,EAAG,6CAA4C,CAAC,EAClF,CAAC,EAAE,EAAE,YAAY,EAAE,oCAAoC,CAAC,EACxD,CAAC,GAAG,EAAE,UAAU,EAAE,mCAAmC,CAAC,EACtD,CAAC,GAAG,EAAE,OAAO,EAAE,4FAA4F,CAAC,EAC5G,CACE,EAAE,EACF,8BAA8B,EAC9B,qGAAqG,CACtG,CACF;EAE8C;EAE/C,MAAMC,MAAM,CAAC,CAACC,YAAY,EAAEC,aAAa,CAAmB,EAAEC,OAA6C,EAAE;IAAA;IAC3GA,OAAO,CAACC,OAAO,uBAAGD,OAAO,CAACC,OAAO,+DAAID,OAAO,CAACE,UAAU;IACvD,MAAM;MAAEC,aAAa;MAAEC;IAAQ,CAAC,GAAG,MAAM,IAAI,CAACV,SAAS,CAACW,yBAAyB,CAC/EN,aAAa,EACbD,YAAY,EACZE,OAAO,CACR;IACD,OAAOM,gBAAK,CAACC,KAAK,CACf,GAAED,gBAAK,CAACE,KAAK,CAAE;AACtB;AACA,8DAA8DL,aAAc,GAAE,CAAE;AAChF;AACA,wBAAwBJ,aAAc;AACtC;AACA,QAAQO,gBAAK,CAACG,MAAM,CAAC,WAAW,CAAE;AAClC;AACA;AACA,QAAQH,gBAAK,CAACG,MAAM,CAAC,aAAa,CAAE;AACpC;AACA;AACA,QAAQH,gBAAK,CAACG,MAAM,CAAC,YAAY,CAAE;AACnC;AACA;AACA,QAAQH,gBAAK,CAACG,MAAM,CAAC,aAAa,CAAE;AACpC;AACA;AACA,QAAQH,gBAAK,CAACG,MAAM,CAAC,UAAU,CAAE;AACjC;AACA;AACA,QAAQH,gBAAK,CAACG,MAAM,CAAC,eAAe,CAAE;AACtC;AACA;AACA,QAAQH,gBAAK,CAACG,MAAM,CAAC,UAAU,CAAE;AACjC;AACA;AACA;AACA,EAAEH,gBAAK,CAACE,KAAK,CAACE,IAAI,CAAC,oBAAoB,CAAE;AACzC;AACA,QAAQC,gBAAgB,CAACZ,aAAa,EAAEK,OAAO,CAAE;AACjD,OAAO,CACF;EACH;AACF;AAAC;AAED,SAASO,gBAAgB,CAACZ,aAAqB,EAAEK,OAA2B,EAAE;EAC5E,MAAMQ,MAAM,GAAGN,gBAAK,CAACG,MAAM,CAAE,MAAKV,aAAc,EAAC,CAAC;EAClD,MAAMc,KAAK,GAAG,CAACD,MAAM,CAAC;EACtB,IAAIR,OAAO,EAAE;IACXS,KAAK,CAACC,IAAI,CAACR,gBAAK,CAACG,MAAM,CAAE,iBAAgBL,OAAQ,EAAC,CAAC,CAAC;EACtD;EACAS,KAAK,CAACC,IAAI,CAACR,gBAAK,CAACG,MAAM,CAAE,iBAAgB,CAAC,CAAC;EAC3C,OAAOI,KAAK,CAACE,IAAI,CAAC,IAAI,CAAC;AACzB"}
|
package/dist/starter.plugin.js
CHANGED
|
@@ -1,46 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.StarterPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
function _defineProperty2() {
|
|
11
9
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
10
|
_defineProperty2 = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
function _cli() {
|
|
21
16
|
const data = require("@teambit/cli");
|
|
22
|
-
|
|
23
17
|
_cli = function () {
|
|
24
18
|
return data;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
return data;
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
class StarterPlugin {
|
|
31
23
|
constructor(generator) {
|
|
32
24
|
this.generator = generator;
|
|
33
25
|
(0, _defineProperty2().default)(this, "pattern", '*.starter.*');
|
|
34
26
|
(0, _defineProperty2().default)(this, "runtimes", [_cli().MainRuntime.name]);
|
|
35
27
|
}
|
|
36
|
-
|
|
37
28
|
register(object) {
|
|
38
29
|
const templates = Array.isArray(object) ? object : [object];
|
|
39
30
|
return this.generator.registerWorkspaceTemplate(templates);
|
|
40
31
|
}
|
|
41
|
-
|
|
42
32
|
}
|
|
43
|
-
|
|
44
33
|
exports.StarterPlugin = StarterPlugin;
|
|
45
34
|
|
|
46
35
|
//# sourceMappingURL=starter.plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StarterPlugin","constructor","generator","MainRuntime","name","register","object","templates","Array","isArray","registerWorkspaceTemplate"],"sources":["starter.plugin.ts"],"sourcesContent":["import { PluginDefinition } from '@teambit/aspect-loader';\nimport { MainRuntime } from '@teambit/cli';\nimport { GeneratorMain } from './generator.main.runtime';\n\nexport class StarterPlugin implements PluginDefinition {\n constructor(private generator: GeneratorMain) {}\n\n pattern = '*.starter.*';\n\n runtimes = [MainRuntime.name];\n\n register(object: any) {\n const templates = Array.isArray(object) ? object : [object];\n return this.generator.registerWorkspaceTemplate(templates);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["StarterPlugin","constructor","generator","MainRuntime","name","register","object","templates","Array","isArray","registerWorkspaceTemplate"],"sources":["starter.plugin.ts"],"sourcesContent":["import { PluginDefinition } from '@teambit/aspect-loader';\nimport { MainRuntime } from '@teambit/cli';\nimport { GeneratorMain } from './generator.main.runtime';\n\nexport class StarterPlugin implements PluginDefinition {\n constructor(private generator: GeneratorMain) {}\n\n pattern = '*.starter.*';\n\n runtimes = [MainRuntime.name];\n\n register(object: any) {\n const templates = Array.isArray(object) ? object : [object];\n return this.generator.registerWorkspaceTemplate(templates);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,aAAa,CAA6B;EACrDC,WAAW,CAASC,SAAwB,EAAE;IAAA,KAA1BA,SAAwB,GAAxBA,SAAwB;IAAA,iDAElC,aAAa;IAAA,kDAEZ,CAACC,kBAAW,CAACC,IAAI,CAAC;EAJkB;EAM/CC,QAAQ,CAACC,MAAW,EAAE;IACpB,MAAMC,SAAS,GAAGC,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;IAC3D,OAAO,IAAI,CAACJ,SAAS,CAACQ,yBAAyB,CAACH,SAAS,CAAC;EAC5D;AACF;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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,UAAU,CAAC;EAAEC,cAAc;EAAEC;AAA8B,CAAC,EAAE;EAC5E,OAAQ;AACV;AACA,eAAeD,cAAe;AAC9B,SAASC,WAAY;AACrB;AACA,GAAG;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["docsFile"],"sources":["docs-file.ts"],"sourcesContent":["export function docsFile() {\n return `### Configuring your Generator\n\nEdit your \\`workspace.jsonc\\` file and set this component to use the \\`teambit.harmony/aspect\\` env under the variants object.\n\n\\`\\`\\`json\n\"teambit.workspace/variants\": {\n \"{my-components}\": {\n \"teambit.harmony/aspect\": {}\n },\n}\n\\`\\`\\`\n\nTo check if your component is using the correct env you can run \\`bit envs\\` or \\`bit show my-components\\`\n\nEdit your \\`workspace.jsonc\\` file and add the component id, (scope name / component name) to teambit generator. This should go at root level. The component id can be found in the \\`aspect.ts\\` file:\n\n\\`\\`\\`json\n{\n \"teambit.generator/generator\": {\n \"aspects\": [\"my-scope-name/my-components\"]\n },\n}\n\\`\\`\\`\n\nThis registers the component aspect so that your templates will appear in the CLI when you run \\`bit templates\\`.\n\n### Modifying your Generator\n\nThe \\`my-components.main.runtime.ts\\` file contains an array of templates that you can modify and add to to create different templates and numerous files to be generated.\n\n### Using your Generator\n\nUse your generator to create the component files\n\n\\`\\`\\`bash\nbit create my-components component1\n\\`\\`\\`\n\n### Exporting your Generator\n\nTag and export your generator component so you can use it in any other workspace. Make sure the scope name is set correctly in the \\`aspect.ts\\` file before tagging and exporting. Once you have tagged and exported the component you can add it to the \\`workspace.jsonc\\` file in the workspace where you want to use this generator.\n\n\\`\\`\\`json\n{\n \"teambit.generator/generator\": {\n \"aspects\": [\"my-scope-name/my-components\"]\n },\n}\n\\`\\`\\`\n\nRun \\`bit templates\\` to see your generator and then use it to generate you components.\n`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["docsFile"],"sources":["docs-file.ts"],"sourcesContent":["export function docsFile() {\n return `### Configuring your Generator\n\nEdit your \\`workspace.jsonc\\` file and set this component to use the \\`teambit.harmony/aspect\\` env under the variants object.\n\n\\`\\`\\`json\n\"teambit.workspace/variants\": {\n \"{my-components}\": {\n \"teambit.harmony/aspect\": {}\n },\n}\n\\`\\`\\`\n\nTo check if your component is using the correct env you can run \\`bit envs\\` or \\`bit show my-components\\`\n\nEdit your \\`workspace.jsonc\\` file and add the component id, (scope name / component name) to teambit generator. This should go at root level. The component id can be found in the \\`aspect.ts\\` file:\n\n\\`\\`\\`json\n{\n \"teambit.generator/generator\": {\n \"aspects\": [\"my-scope-name/my-components\"]\n },\n}\n\\`\\`\\`\n\nThis registers the component aspect so that your templates will appear in the CLI when you run \\`bit templates\\`.\n\n### Modifying your Generator\n\nThe \\`my-components.main.runtime.ts\\` file contains an array of templates that you can modify and add to to create different templates and numerous files to be generated.\n\n### Using your Generator\n\nUse your generator to create the component files\n\n\\`\\`\\`bash\nbit create my-components component1\n\\`\\`\\`\n\n### Exporting your Generator\n\nTag and export your generator component so you can use it in any other workspace. Make sure the scope name is set correctly in the \\`aspect.ts\\` file before tagging and exporting. Once you have tagged and exported the component you can add it to the \\`workspace.jsonc\\` file in the workspace where you want to use this generator.\n\n\\`\\`\\`json\n{\n \"teambit.generator/generator\": {\n \"aspects\": [\"my-scope-name/my-components\"]\n },\n}\n\\`\\`\\`\n\nRun \\`bit templates\\` to see your generator and then use it to generate you components.\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,QAAQ,GAAG;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;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":["indexFile","namePascalCase","name"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function indexFile({ namePascalCase, name }: ComponentContext) {\n return `import { ${namePascalCase}Aspect } from './${name}.aspect';\n\nexport type { ${namePascalCase}Main } from './${name}.main.runtime';\nexport default ${namePascalCase}Aspect;\nexport { ${namePascalCase}Aspect };\n`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["indexFile","namePascalCase","name"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function indexFile({ namePascalCase, name }: ComponentContext) {\n return `import { ${namePascalCase}Aspect } from './${name}.aspect';\n\nexport type { ${namePascalCase}Main } from './${name}.main.runtime';\nexport default ${namePascalCase}Aspect;\nexport { ${namePascalCase}Aspect };\n`;\n}\n"],"mappings":";;;;;;AAEO,SAASA,SAAS,CAAC;EAAEC,cAAc;EAAEC;AAAuB,CAAC,EAAE;EACpE,OAAQ,YAAWD,cAAe,oBAAmBC,IAAK;AAC5D;AACA,gBAAgBD,cAAe,kBAAiBC,IAAK;AACrD,iBAAiBD,cAAe;AAChC,WAAWA,cAAe;AAC1B,CAAC;AACD"}
|
|
@@ -1 +1 @@
|
|
|
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 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":"
|
|
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 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,WAAW,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"}
|
|
@@ -4,47 +4,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.componentGeneratorTemplate = void 0;
|
|
7
|
-
|
|
8
7
|
function _index() {
|
|
9
8
|
const data = require("./files/index");
|
|
10
|
-
|
|
11
9
|
_index = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
function _aspectFile() {
|
|
19
15
|
const data = require("./files/aspect-file");
|
|
20
|
-
|
|
21
16
|
_aspectFile = function () {
|
|
22
17
|
return data;
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
return data;
|
|
26
20
|
}
|
|
27
|
-
|
|
28
21
|
function _docsFile() {
|
|
29
22
|
const data = require("./files/docs-file");
|
|
30
|
-
|
|
31
23
|
_docsFile = function () {
|
|
32
24
|
return data;
|
|
33
25
|
};
|
|
34
|
-
|
|
35
26
|
return data;
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
function _mainRuntime() {
|
|
39
29
|
const data = require("./files/main-runtime");
|
|
40
|
-
|
|
41
30
|
_mainRuntime = function () {
|
|
42
31
|
return data;
|
|
43
32
|
};
|
|
44
|
-
|
|
45
33
|
return data;
|
|
46
34
|
}
|
|
47
|
-
|
|
48
35
|
const componentGeneratorTemplate = {
|
|
49
36
|
name: 'component-generator',
|
|
50
37
|
description: 'create your own component generator \nDocs: https://bit.dev/docs/dev-services/generator/generate-component',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["componentGeneratorTemplate","name","description","generateFiles","context","relativePath","content","indexFile","isMain","aspectFile","docsFile","mainRuntime","config","env"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext, ComponentTemplate } from '@teambit/generator';\nimport { indexFile } from './files/index';\nimport { aspectFile } from './files/aspect-file';\nimport { docsFile } from './files/docs-file';\nimport { mainRuntime } from './files/main-runtime';\n\nexport const componentGeneratorTemplate: ComponentTemplate = {\n name: 'component-generator',\n description:\n 'create your own component generator \\nDocs: https://bit.dev/docs/dev-services/generator/generate-component',\n generateFiles: (context: ComponentContext) => {\n return [\n {\n relativePath: 'index.ts',\n content: indexFile(context),\n isMain: true,\n },\n {\n relativePath: `${context.name}.aspect.ts`,\n content: aspectFile(context),\n },\n {\n relativePath: `${context.name}.docs.mdx`,\n content: docsFile(),\n },\n {\n relativePath: `${context.name}.main.runtime.ts`,\n content: mainRuntime(context),\n },\n ];\n },\n config: {\n 'teambit.harmony/aspect': {},\n 'teambit.envs/envs': {\n env: 'teambit.harmony/aspect',\n },\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["componentGeneratorTemplate","name","description","generateFiles","context","relativePath","content","indexFile","isMain","aspectFile","docsFile","mainRuntime","config","env"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext, ComponentTemplate } from '@teambit/generator';\nimport { indexFile } from './files/index';\nimport { aspectFile } from './files/aspect-file';\nimport { docsFile } from './files/docs-file';\nimport { mainRuntime } from './files/main-runtime';\n\nexport const componentGeneratorTemplate: ComponentTemplate = {\n name: 'component-generator',\n description:\n 'create your own component generator \\nDocs: https://bit.dev/docs/dev-services/generator/generate-component',\n generateFiles: (context: ComponentContext) => {\n return [\n {\n relativePath: 'index.ts',\n content: indexFile(context),\n isMain: true,\n },\n {\n relativePath: `${context.name}.aspect.ts`,\n content: aspectFile(context),\n },\n {\n relativePath: `${context.name}.docs.mdx`,\n content: docsFile(),\n },\n {\n relativePath: `${context.name}.main.runtime.ts`,\n content: mainRuntime(context),\n },\n ];\n },\n config: {\n 'teambit.harmony/aspect': {},\n 'teambit.envs/envs': {\n env: 'teambit.harmony/aspect',\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;AAEO,MAAMA,0BAA6C,GAAG;EAC3DC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EACT,4GAA4G;EAC9GC,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,YAAW;MACzCK,OAAO,EAAE,IAAAG,wBAAU,EAACL,OAAO;IAC7B,CAAC,EACD;MACEC,YAAY,EAAG,GAAED,OAAO,CAACH,IAAK,WAAU;MACxCK,OAAO,EAAE,IAAAI,oBAAQ;IACnB,CAAC,EACD;MACEL,YAAY,EAAG,GAAED,OAAO,CAACH,IAAK,kBAAiB;MAC/CK,OAAO,EAAE,IAAAK,0BAAW,EAACP,OAAO;IAC9B,CAAC,CACF;EACH,CAAC;EACDQ,MAAM,EAAE;IACN,wBAAwB,EAAE,CAAC,CAAC;IAC5B,mBAAmB,EAAE;MACnBC,GAAG,EAAE;IACP;EACF;AACF,CAAC;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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,QAAQ,GAAG;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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["gitIgnoreTemplate"],"sources":["git-ignore-tpl.ts"],"sourcesContent":["export function gitIgnoreTemplate() {\n return `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}\n`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["gitIgnoreTemplate"],"sources":["git-ignore-tpl.ts"],"sourcesContent":["export function gitIgnoreTemplate() {\n return `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}\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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":["indexFile","namePascalCase","name"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function indexFile({ namePascalCase, name }: ComponentContext) {\n return `export { starter as ${namePascalCase}Starter } from './${name}.starter';\n`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["indexFile","namePascalCase","name"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function indexFile({ namePascalCase, name }: ComponentContext) {\n return `export { starter as ${namePascalCase}Starter } from './${name}.starter';\n`;\n}\n"],"mappings":";;;;;;AAEO,SAASA,SAAS,CAAC;EAAEC,cAAc;EAAEC;AAAuB,CAAC,EAAE;EACpE,OAAQ,uBAAsBD,cAAe,qBAAoBC,IAAK;AACxE,CAAC;AACD"}
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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,cAAc,GAAG;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"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.starterFile = starterFile;
|
|
7
|
-
|
|
8
7
|
function starterFile() {
|
|
9
8
|
return `import { WorkspaceContext, Starter } from '@teambit/generator';
|
|
10
9
|
import { workspaceConfig } from './template/files/workspace-config';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["starterFile"],"sources":["starter.ts"],"sourcesContent":["export function starterFile() {\n return `import { WorkspaceContext, Starter } from '@teambit/generator';\nimport { workspaceConfig } from './template/files/workspace-config';\nimport { readme } from './template/files/readme-file';\nimport { gitIgnore } from './template/files/git-ignore';\n\nexport const starter: Starter = {\n name: 'template-example',\n description: 'demonstration of a workspace template',\n generateFiles: async (context: WorkspaceContext) => [\n {\n relativePath: 'workspace.jsonc',\n content: await workspaceConfig(context),\n },\n {\n relativePath: '.gitignore',\n content: gitIgnore(),\n },\n {\n relativePath: 'README.md',\n content: readme(),\n },\n ],\n importComponents: () => [\n { id: 'teambit.react/templates/ui/text', path: 'ui/text' },\n ],\n};\n\nexport default starter;\n`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["starterFile"],"sources":["starter.ts"],"sourcesContent":["export function starterFile() {\n return `import { WorkspaceContext, Starter } from '@teambit/generator';\nimport { workspaceConfig } from './template/files/workspace-config';\nimport { readme } from './template/files/readme-file';\nimport { gitIgnore } from './template/files/git-ignore';\n\nexport const starter: Starter = {\n name: 'template-example',\n description: 'demonstration of a workspace template',\n generateFiles: async (context: WorkspaceContext) => [\n {\n relativePath: 'workspace.jsonc',\n content: await workspaceConfig(context),\n },\n {\n relativePath: '.gitignore',\n content: gitIgnore(),\n },\n {\n relativePath: 'README.md',\n content: readme(),\n },\n ],\n importComponents: () => [\n { id: 'teambit.react/templates/ui/text', path: 'ui/text' },\n ],\n};\n\nexport default starter;\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,WAAW,GAAG;EAC5B,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,CAAC;AACD"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.workspaceConfigTemplate = workspaceConfigTemplate;
|
|
7
|
-
|
|
8
7
|
function workspaceConfigTemplate() {
|
|
9
8
|
return `import { WorkspaceContext } from '@teambit/generator';
|
|
10
9
|
import { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@teambit/config';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["workspaceConfigTemplate"],"sources":["workspace-config-tpl.ts"],"sourcesContent":["export function workspaceConfigTemplate() {\n return `import { WorkspaceContext } from '@teambit/generator';\nimport { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@teambit/config';\n\nexport async function workspaceConfig({ name, defaultScope }: WorkspaceContext) {\n const configParsed = await getWorkspaceConfigTemplateParsed();\n configParsed['teambit.workspace/workspace'].name = name;\n configParsed['teambit.workspace/workspace'].defaultScope = defaultScope || 'company.scope';\n configParsed['teambit.workspace/variants'] = {\n '*': {},\n };\n\n return stringifyWorkspaceConfig(configParsed);\n}\n`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["workspaceConfigTemplate"],"sources":["workspace-config-tpl.ts"],"sourcesContent":["export function workspaceConfigTemplate() {\n return `import { WorkspaceContext } from '@teambit/generator';\nimport { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@teambit/config';\n\nexport async function workspaceConfig({ name, defaultScope }: WorkspaceContext) {\n const configParsed = await getWorkspaceConfigTemplateParsed();\n configParsed['teambit.workspace/workspace'].name = name;\n configParsed['teambit.workspace/workspace'].defaultScope = defaultScope || 'company.scope';\n configParsed['teambit.workspace/variants'] = {\n '*': {},\n };\n\n return stringifyWorkspaceConfig(configParsed);\n}\n`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,uBAAuB,GAAG;EACxC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD"}
|
|
@@ -4,67 +4,48 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.starterTemplate = void 0;
|
|
7
|
-
|
|
8
7
|
function _index() {
|
|
9
8
|
const data = require("./files/index");
|
|
10
|
-
|
|
11
9
|
_index = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
function _starter() {
|
|
19
15
|
const data = require("./files/starter");
|
|
20
|
-
|
|
21
16
|
_starter = function () {
|
|
22
17
|
return data;
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
return data;
|
|
26
20
|
}
|
|
27
|
-
|
|
28
21
|
function _docsFile() {
|
|
29
22
|
const data = require("./files/docs-file");
|
|
30
|
-
|
|
31
23
|
_docsFile = function () {
|
|
32
24
|
return data;
|
|
33
25
|
};
|
|
34
|
-
|
|
35
26
|
return data;
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
function _gitIgnoreTpl() {
|
|
39
29
|
const data = require("./files/git-ignore-tpl");
|
|
40
|
-
|
|
41
30
|
_gitIgnoreTpl = function () {
|
|
42
31
|
return data;
|
|
43
32
|
};
|
|
44
|
-
|
|
45
33
|
return data;
|
|
46
34
|
}
|
|
47
|
-
|
|
48
35
|
function _readmeTpl() {
|
|
49
36
|
const data = require("./files/readme-tpl");
|
|
50
|
-
|
|
51
37
|
_readmeTpl = function () {
|
|
52
38
|
return data;
|
|
53
39
|
};
|
|
54
|
-
|
|
55
40
|
return data;
|
|
56
41
|
}
|
|
57
|
-
|
|
58
42
|
function _workspaceConfigTpl() {
|
|
59
43
|
const data = require("./files/workspace-config-tpl");
|
|
60
|
-
|
|
61
44
|
_workspaceConfigTpl = function () {
|
|
62
45
|
return data;
|
|
63
46
|
};
|
|
64
|
-
|
|
65
47
|
return data;
|
|
66
48
|
}
|
|
67
|
-
|
|
68
49
|
const starterTemplate = {
|
|
69
50
|
name: 'starter',
|
|
70
51
|
description: 'create your own starter - \nDocs: https://bit.dev/docs/dev-services/generator/generate-workspace',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["starterTemplate","name","description","generateFiles","context","relativePath","content","indexFile","isMain","starterFile","docsFile","gitIgnoreTemplate","readmeTemplate","workspaceConfigTemplate","config","env"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext, ComponentTemplate } from '@teambit/generator';\nimport { indexFile } from './files/index';\nimport { starterFile } from './files/starter';\nimport { docsFile } from './files/docs-file';\nimport { gitIgnoreTemplate } from './files/git-ignore-tpl';\nimport { readmeTemplate } from './files/readme-tpl';\nimport { workspaceConfigTemplate } from './files/workspace-config-tpl';\n\nexport const starterTemplate: ComponentTemplate = {\n name: 'starter',\n description: 'create your own starter - \\nDocs: https://bit.dev/docs/dev-services/generator/generate-workspace',\n generateFiles: (context: ComponentContext) => {\n return [\n {\n relativePath: 'index.ts',\n content: indexFile(context),\n isMain: true,\n },\n {\n relativePath: `${context.name}.starter.ts`,\n content: starterFile(),\n },\n {\n relativePath: `${context.name}.docs.mdx`,\n content: docsFile(),\n },\n {\n relativePath: 'template/files/git-ignore.ts',\n content: gitIgnoreTemplate(),\n },\n {\n relativePath: 'template/files/readme-file.ts',\n content: readmeTemplate(),\n },\n {\n relativePath: 'template/files/workspace-config.ts',\n content: workspaceConfigTemplate(),\n },\n ];\n },\n config: {\n 'teambit.harmony/aspect': {},\n 'teambit.envs/envs': {\n env: 'teambit.harmony/aspect',\n },\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["starterTemplate","name","description","generateFiles","context","relativePath","content","indexFile","isMain","starterFile","docsFile","gitIgnoreTemplate","readmeTemplate","workspaceConfigTemplate","config","env"],"sources":["index.ts"],"sourcesContent":["import { ComponentContext, ComponentTemplate } from '@teambit/generator';\nimport { indexFile } from './files/index';\nimport { starterFile } from './files/starter';\nimport { docsFile } from './files/docs-file';\nimport { gitIgnoreTemplate } from './files/git-ignore-tpl';\nimport { readmeTemplate } from './files/readme-tpl';\nimport { workspaceConfigTemplate } from './files/workspace-config-tpl';\n\nexport const starterTemplate: ComponentTemplate = {\n name: 'starter',\n description: 'create your own starter - \\nDocs: https://bit.dev/docs/dev-services/generator/generate-workspace',\n generateFiles: (context: ComponentContext) => {\n return [\n {\n relativePath: 'index.ts',\n content: indexFile(context),\n isMain: true,\n },\n {\n relativePath: `${context.name}.starter.ts`,\n content: starterFile(),\n },\n {\n relativePath: `${context.name}.docs.mdx`,\n content: docsFile(),\n },\n {\n relativePath: 'template/files/git-ignore.ts',\n content: gitIgnoreTemplate(),\n },\n {\n relativePath: 'template/files/readme-file.ts',\n content: readmeTemplate(),\n },\n {\n relativePath: 'template/files/workspace-config.ts',\n content: workspaceConfigTemplate(),\n },\n ];\n },\n config: {\n 'teambit.harmony/aspect': {},\n 'teambit.envs/envs': {\n env: 'teambit.harmony/aspect',\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;AAEO,MAAMA,eAAkC,GAAG;EAChDC,IAAI,EAAE,SAAS;EACfC,WAAW,EAAE,kGAAkG;EAC/GC,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,aAAY;MAC1CK,OAAO,EAAE,IAAAG,sBAAW;IACtB,CAAC,EACD;MACEJ,YAAY,EAAG,GAAED,OAAO,CAACH,IAAK,WAAU;MACxCK,OAAO,EAAE,IAAAI,oBAAQ;IACnB,CAAC,EACD;MACEL,YAAY,EAAE,8BAA8B;MAC5CC,OAAO,EAAE,IAAAK,iCAAiB;IAC5B,CAAC,EACD;MACEN,YAAY,EAAE,+BAA+B;MAC7CC,OAAO,EAAE,IAAAM,2BAAc;IACzB,CAAC,EACD;MACEP,YAAY,EAAE,oCAAoC;MAClDC,OAAO,EAAE,IAAAO,6CAAuB;IAClC,CAAC,CACF;EACH,CAAC;EACDC,MAAM,EAAE;IACN,wBAAwB,EAAE,CAAC,CAAC;IAC5B,mBAAmB,EAAE;MACnBC,GAAG,EAAE;IACP;EACF;AACF,CAAC;AAAC"}
|
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.workspaceGeneratorTemplate = void 0;
|
|
9
|
-
|
|
10
8
|
function _defineProperty2() {
|
|
11
9
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
10
|
_defineProperty2 = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
function _starter() {
|
|
21
16
|
const data = require("../starter");
|
|
22
|
-
|
|
23
17
|
_starter = function () {
|
|
24
18
|
return data;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
return data;
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
-
|
|
32
23
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
-
|
|
34
24
|
// TODO: This is deprecated and should be removed once we update the docs to use the new starter template.
|
|
35
25
|
const workspaceGeneratorTemplate = _objectSpread(_objectSpread({}, _starter().starterTemplate), {}, {
|
|
36
26
|
name: 'workspace-generator',
|
|
37
27
|
description: 'DEPRECATED: use "starter" instead.\ncreate your own workspace generator - \nDocs: https://bit.dev/docs/dev-services/generator/generate-workspace'
|
|
38
28
|
});
|
|
39
|
-
|
|
40
29
|
exports.workspaceGeneratorTemplate = workspaceGeneratorTemplate;
|
|
41
30
|
|
|
42
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["workspaceGeneratorTemplate","starterTemplate","name","description"],"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":"
|
|
1
|
+
{"version":3,"names":["workspaceGeneratorTemplate","starterTemplate","name","description"],"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;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA6C;AAAA;AAE7C;AACO,MAAMA,0BAA6C,mCACrDC,0BAAe;EAClBC,IAAI,EAAE,qBAAqB;EAC3BC,WAAW,EACT;AAAkJ,EACrJ;AAAC"}
|