Skip to content

Commit

Permalink
Make vue3 default for vue based boilerplates (#341)
Browse files Browse the repository at this point in the history
* Made Vue3 default for extension init and setup for vue based boilerplate

* Fixed test case

* Vue 3 added

* Test cases fix

* fix test case

* Python templates deprecated

* Vue 2 for java

* Removed unused code

* port number added in .env

* test cases fix

---------

Co-authored-by: Bhargav Prajapati <[email protected]>
Co-authored-by: vivek-gofynd <[email protected]>
  • Loading branch information
3 people authored Jul 31, 2024
1 parent 530c33b commit 3ec0c9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/setup_extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Extension, {
import configStore, { CONFIG_KEYS } from '../lib/Config';

let program;
const envFileData = `EXTENSION_API_KEY="api_key"\nEXTENSION_API_SECRET="api_secret"\nEXTENSION_BASE_URL="https://abc.com"\nEXTENSION_CLUSTER_URL="https://api.fynd.com"`;
const envFileData = `EXTENSION_API_KEY="api_key"\nEXTENSION_API_SECRET="api_secret"\nEXTENSION_BASE_URL="https://abc.com"\nEXTENSION_CLUSTER_URL="https://api.fynd.com"\nBACKEND_PORT=8080\nFRONTEND_PORT=8081`;

jest.mock('configstore', () => {
const Store =
Expand Down
4 changes: 3 additions & 1 deletion src/lib/Extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export default class Extension {
if (project_type === NODE_VUE || project_type === NODE_REACT) {
// installing dependencies for Node projects
await installNpmPackages(answers.targetDir);
//added to support new boilerplate structure
await installNpmPackages(path.join(answers.targetDir, 'frontend'));
} else if (project_type === JAVA_VUE || project_type === JAVA_REACT) {
// installing dependencies for java projects
// await Extension.installNpmPackages(`${answers.targetDir}/app`);
Expand Down Expand Up @@ -198,7 +200,7 @@ export default class Extension {
answers.extension_api_secret
}"\nEXTENSION_BASE_URL="${
answers.base_url
}"\nEXTENSION_CLUSTER_URL="${getBaseURL()}"`;
}"\nEXTENSION_CLUSTER_URL="${getBaseURL()}"\nBACKEND_PORT=8080\nFRONTEND_PORT=8081`;
fs.writeFileSync(`${answers.targetDir}/.env`, envData);
}
await Extension.replaceGrootWithExtensionName(
Expand Down

0 comments on commit 3ec0c9f

Please sign in to comment.