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.
- package/dist/lib/utils.d.ts +0 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.js +2 -5
- package/dist/steps/write-package-json.d.ts +1 -1
- package/package.json +1 -1
package/dist/lib/utils.d.ts
CHANGED
|
@@ -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, {
|
|
311
|
+
async function overridePackageJson(projectPath, projectName, { cliVersion }) {
|
|
315
312
|
const templatePath = getTemplatePath(process.cwd());
|
|
316
|
-
const packageJsonPath =
|
|
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, {
|
|
5
|
+
export declare function overridePackageJson(projectPath: string, projectName: string, { cliVersion }: OverridePackageJsonOptions): Promise<void>;
|
|
6
6
|
export {};
|