extension-create 2.0.0-rc.30 → 2.0.0-rc.31

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.
@@ -4,5 +4,4 @@ export declare function moveDirectoryContents(source: string, destination: strin
4
4
  export declare function getInstallCommand(): Promise<string>;
5
5
  export declare function getTemplatePath(workingDir: string): string;
6
6
  export declare function isDirectoryWriteable(directory: string, projectName: string): Promise<boolean>;
7
- export declare function isExternalTemplate(templateName: string): boolean;
8
7
  export declare function isTypeScriptTemplate(templateName: string): boolean;
package/dist/module.d.ts CHANGED
@@ -3,7 +3,7 @@ export interface CreateOptions {
3
3
  install?: boolean;
4
4
  cliVersion?: string;
5
5
  }
6
- export declare function extensionCreate(projectNameInput: string | undefined, { cliVersion, template, install, }: {
6
+ export declare function extensionCreate(projectNameInput: string | undefined, { cliVersion, template, install }: {
7
7
  cliVersion?: string;
8
8
  template?: string;
9
9
  install?: boolean;
package/dist/module.js CHANGED
@@ -237,9 +237,6 @@ async function isDirectoryWriteable(directory, projectName) {
237
237
  return false;
238
238
  }
239
239
  }
240
- function isExternalTemplate(templateName) {
241
- return 'init' !== templateName;
242
- }
243
240
  function isTypeScriptTemplate(templateName) {
244
241
  return templateName.includes("typescript") || templateName.includes('react') || templateName.includes('preact') || templateName.includes('svelte') || templateName.includes('solid');
245
242
  }
@@ -311,9 +308,9 @@ const extensionJsPackageJsonScripts = {
311
308
  start: 'development' === process.env.EXTENSION_ENV ? 'node node_modules/extension start' : 'extension start',
312
309
  build: 'development' === process.env.EXTENSION_ENV ? 'node node_modules/extension build' : 'extension build'
313
310
  };
314
- async function overridePackageJson(projectPath, projectName, { template, cliVersion }) {
311
+ async function overridePackageJson(projectPath, projectName, { cliVersion }) {
315
312
  const templatePath = getTemplatePath(process.cwd());
316
- const packageJsonPath = isExternalTemplate(template) ? external_path_namespaceObject.join(projectPath, 'package.json') : external_path_namespaceObject.join(templatePath, 'package.json');
313
+ const packageJsonPath = external_path_namespaceObject.join(templatePath, 'package.json');
317
314
  const packageJsonContent = await promises_namespaceObject.readFile(packageJsonPath);
318
315
  const packageJson = JSON.parse(packageJsonContent.toString());
319
316
  packageJson.scripts = packageJson.scripts || {};
@@ -2,5 +2,5 @@ interface OverridePackageJsonOptions {
2
2
  template: string;
3
3
  cliVersion?: string;
4
4
  }
5
- export declare function overridePackageJson(projectPath: string, projectName: string, { template, cliVersion }: OverridePackageJsonOptions): Promise<void>;
5
+ export declare function overridePackageJson(projectPath: string, projectName: string, { cliVersion }: OverridePackageJsonOptions): Promise<void>;
6
6
  export {};
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "dist"
22
22
  ],
23
23
  "name": "extension-create",
24
- "version": "2.0.0-rc.30",
24
+ "version": "2.0.0-rc.31",
25
25
  "description": "The create step of Extension.js",
26
26
  "author": {
27
27
  "name": "Cezar Augusto",