@teambit/generator 1.0.575 → 1.0.577
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/create.cmd.js
CHANGED
@@ -38,7 +38,7 @@ class CreateCmd {
|
|
38
38
|
cmd: 'bit create react ui/button --aspect teambit.react/react-env',
|
39
39
|
description: "creates a component named 'ui/button' using the 'react' template"
|
40
40
|
}, {
|
41
|
-
cmd: 'bit create
|
41
|
+
cmd: 'bit create module utils/is-string utils/is-number --aspect teambit.node/node',
|
42
42
|
description: "creates two components, 'utils/is-string' and 'utils/is-number' using the 'node' template from the 'node' aspect(env)"
|
43
43
|
}, {
|
44
44
|
cmd: 'bit create mdx docs/create-components --aspect teambit.mdx/mdx-env --scope my-org.my-scope',
|
package/dist/create.cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CreateCmd","constructor","generator","name","description","cmd","report","templateName","componentNames","options","aspectId","template","results","generateComponentTemplate","title","length","componentsData","map","result","chalk","bold","id","toString","dir","envId","envSetBy","packageName","join","footer","green","exports"],"sources":["create.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component';\nimport chalk from 'chalk';\nimport { GeneratorMain } from './generator.main.runtime';\nimport type { BaseComponentTemplateOptions } from './component-template';\n\n/**\n * CreateOptions combines foundational properties with additional options for creating a component.\n */\nexport type CreateOptions = BaseComponentTemplateOptions & {\n env?: string;\n aspect?: string;\n force?: boolean;\n};\n\nexport class CreateCmd implements Command {\n name = 'create <template-name> <component-names...>';\n description = 'create a new component (source files and config) using a template.';\n alias = '';\n loader = true;\n helpUrl = 'reference/starters/create-starter';\n arguments = [\n {\n name: 'template-name',\n description:\n \"the template for generating the component \\n(run 'bit templates' for a list of available templates)\",\n },\n {\n name: 'component-names...',\n description: 'a list of component names to generate',\n },\n ];\n examples = [\n {\n cmd: 'bit create react ui/button --aspect teambit.react/react-env',\n description: \"creates a component named 'ui/button' using the 'react' template\",\n },\n {\n cmd: 'bit create
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CreateCmd","constructor","generator","name","description","cmd","report","templateName","componentNames","options","aspectId","template","results","generateComponentTemplate","title","length","componentsData","map","result","chalk","bold","id","toString","dir","envId","envSetBy","packageName","join","footer","green","exports"],"sources":["create.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component';\nimport chalk from 'chalk';\nimport { GeneratorMain } from './generator.main.runtime';\nimport type { BaseComponentTemplateOptions } from './component-template';\n\n/**\n * CreateOptions combines foundational properties with additional options for creating a component.\n */\nexport type CreateOptions = BaseComponentTemplateOptions & {\n env?: string;\n aspect?: string;\n force?: boolean;\n};\n\nexport class CreateCmd implements Command {\n name = 'create <template-name> <component-names...>';\n description = 'create a new component (source files and config) using a template.';\n alias = '';\n loader = true;\n helpUrl = 'reference/starters/create-starter';\n arguments = [\n {\n name: 'template-name',\n description:\n \"the template for generating the component \\n(run 'bit templates' for a list of available templates)\",\n },\n {\n name: 'component-names...',\n description: 'a list of component names to generate',\n },\n ];\n examples = [\n {\n cmd: 'bit create react ui/button --aspect teambit.react/react-env',\n description: \"creates a component named 'ui/button' using the 'react' template\",\n },\n {\n cmd: 'bit create module utils/is-string utils/is-number --aspect teambit.node/node',\n description:\n \"creates two components, 'utils/is-string' and 'utils/is-number' using the 'node' template from the 'node' aspect(env)\",\n },\n {\n cmd: 'bit create mdx docs/create-components --aspect teambit.mdx/mdx-env --scope my-org.my-scope',\n description:\n \"creates an mdx component named 'docs/create-components' and sets it scope to 'my-org.my-scope'. \\nby default, the scope is the `defaultScope` value, configured in your `workspace.jsonc`.\",\n },\n {\n cmd: 'bit create react ui/button --aspect teambit.react/react-env --env teambit.community/envs/community-react@3.0.3',\n description:\n \"creates a component named 'ui/button' from the teambit.react/react-env env and sets it to use the 'community-react' env. \\n(the template's default env is 'teambit.react/react-env').\",\n },\n ];\n group = 'development';\n options = [\n ['n', 'namespace <string>', `sets the component's namespace and nested dirs inside the scope`],\n ['s', 'scope <string>', `sets the component's scope-name. if not entered, the default-scope will be used`],\n ['a', 'aspect <string>', 'aspect-id of the template. helpful when multiple aspects use the same template name'],\n ['t', 'template <string>', 'env-id of the template. alias for --aspect.'],\n ['p', 'path <string>', 'relative path in the workspace. by default the path is `<scope>/<namespace>/<name>`'],\n ['e', 'env <string>', \"set the component's environment. (overrides the env from variants and the template)\"],\n ['f', 'force', 'replace existing files at the target location'],\n ] as CommandOptions;\n\n constructor(private generator: GeneratorMain) {}\n\n async report(\n [templateName, componentNames]: [string, string[]],\n options: Partial<CreateOptions> & {\n template?: string | ComponentID;\n force?: boolean;\n }\n ) {\n options.aspectId = options.aspectId ?? options.template;\n const results = await this.generator.generateComponentTemplate(componentNames, templateName, options);\n const title = `${results.length} component(s) were created`;\n\n const componentsData = results\n .map((result) => {\n return `${chalk.bold(result.id.toString())}\n location: ${result.dir}\n env: ${result.envId} (set by ${result.envSetBy})\n package: ${result.packageName}\n`;\n })\n .join('\\n');\n const footer = `env configuration is according to workspace variants, template config or --env flag.`;\n\n return `${chalk.green(title)}\\n\\n${componentsData}\\n\\n${footer}`;\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,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CAAC,CACDC,IAAI,CAAC,IAAI,CAAC;IACb,MAAMC,MAAM,GAAG,sFAAsF;IAErG,OAAO,GAAGT,gBAAK,CAACU,KAAK,CAACf,KAAK,CAAC,OAAOE,cAAc,OAAOY,MAAM,EAAE;EAClE;AACF;AAACE,OAAA,CAAA9B,SAAA,GAAAA,SAAA","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.577/dist/generator.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.generator_generator@1.0.577/dist/generator.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/generator",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.577",
|
4
4
|
"homepage": "https://bit.cloud/teambit/generator/generator",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.generator",
|
8
8
|
"name": "generator",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.577"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"camelcase": "6.2.0",
|
@@ -21,32 +21,32 @@
|
|
21
21
|
"@teambit/component-id": "1.2.3",
|
22
22
|
"@teambit/harmony": "0.4.7",
|
23
23
|
"@teambit/git.modules.git-ignore": "1.0.2",
|
24
|
-
"@teambit/envs": "1.0.
|
25
|
-
"@teambit/logger": "0.0.
|
26
|
-
"@teambit/new-component-helper": "1.0.
|
27
|
-
"@teambit/pkg.modules.component-package-name": "0.0.
|
28
|
-
"@teambit/tracker": "1.0.
|
29
|
-
"@teambit/workspace-config-files": "1.0.
|
30
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
31
|
-
"@teambit/workspace": "1.0.
|
32
|
-
"@teambit/component": "1.0.
|
33
|
-
"@teambit/cli": "0.0.
|
34
|
-
"@teambit/graphql": "1.0.
|
35
|
-
"@teambit/aspect-loader": "1.0.
|
36
|
-
"@teambit/deprecation": "1.0.
|
37
|
-
"@teambit/git": "1.0.
|
24
|
+
"@teambit/envs": "1.0.576",
|
25
|
+
"@teambit/logger": "0.0.1246",
|
26
|
+
"@teambit/new-component-helper": "1.0.576",
|
27
|
+
"@teambit/pkg.modules.component-package-name": "0.0.51",
|
28
|
+
"@teambit/tracker": "1.0.576",
|
29
|
+
"@teambit/workspace-config-files": "1.0.576",
|
30
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.272",
|
31
|
+
"@teambit/workspace": "1.0.576",
|
32
|
+
"@teambit/component": "1.0.576",
|
33
|
+
"@teambit/cli": "0.0.1153",
|
34
|
+
"@teambit/graphql": "1.0.576",
|
35
|
+
"@teambit/aspect-loader": "1.0.576",
|
36
|
+
"@teambit/deprecation": "1.0.576",
|
37
|
+
"@teambit/git": "1.0.576",
|
38
38
|
"@teambit/legacy.constants": "0.0.11",
|
39
|
-
"@teambit/legacy.consumer-config": "0.0.
|
40
|
-
"@teambit/legacy.scope": "0.0.
|
41
|
-
"@teambit/scope": "1.0.
|
42
|
-
"@teambit/compiler": "1.0.
|
43
|
-
"@teambit/forking": "1.0.
|
39
|
+
"@teambit/legacy.consumer-config": "0.0.44",
|
40
|
+
"@teambit/legacy.scope": "0.0.44",
|
41
|
+
"@teambit/scope": "1.0.576",
|
42
|
+
"@teambit/compiler": "1.0.576",
|
43
|
+
"@teambit/forking": "1.0.576",
|
44
44
|
"@teambit/git.modules.git-executable": "0.0.12",
|
45
|
-
"@teambit/host-initializer": "0.0.
|
46
|
-
"@teambit/importer": "1.0.
|
47
|
-
"@teambit/install": "1.0.
|
48
|
-
"@teambit/ui": "1.0.
|
49
|
-
"@teambit/config": "0.0.
|
45
|
+
"@teambit/host-initializer": "0.0.289",
|
46
|
+
"@teambit/importer": "1.0.576",
|
47
|
+
"@teambit/install": "1.0.576",
|
48
|
+
"@teambit/ui": "1.0.576",
|
49
|
+
"@teambit/config": "0.0.1327"
|
50
50
|
},
|
51
51
|
"devDependencies": {
|
52
52
|
"@types/fs-extra": "9.0.7",
|