netsuite-suitecloud-sdk
netsuite-suitecloud-sdk copied to clipboard
Issue: 902 - Added a new feature to the CLI workflow that allows users to create an SPA
✨ Feature: SPA Scaffold Prompt in SDF SuiteCloud SDK CLI
Summary
This PR introduces a new feature to the SDF SuiteCloud SDK CLI flow. After the existing prompt for unit testing, the CLI now asks the user whether they want to create a new SPA (Single Page Application) as part of the project setup.
What's New
- ✅ After the unit testing prompt, a new question is presented:
"Do you want to create an SPA project? ***This will install NPM module dependencies and create needed files and folders. (Use arrow keys)"
- ✅ If the user selects Yes, they are prompted to input the name of the SPA application.
Enter the SPA project name.
- ✅ Once confirmed:
- A new folder structure is created under the appropriate directory using the SPA name.
- A set of predefined template files are copied into the new SPA folder.
- Placeholders within these templates are automatically replaced with the provided SPA name to personalize the setup.
Motivation
This enhancement streamlines the creation of client-side SuiteApps by integrating SPA scaffolding into the CLI setup process. It:
- Reduces manual effort in initializing a new SPA project.
- Ensures consistent structure and naming across projects.
- Increases developer productivity and adoption for frontend SuiteApp workflows.
Here is the new folder structure
/src/Objects/custspa_myspa.xml
/src/SuiteApps/myspa/assets
/src/SuiteApps/HelloWorld.tsx
/src/SuiteApps/SpaClient.tsx
/src/SuiteApps/SpaServer.ts
/src/package.json
/src/tsconfig.json
/src/tsconfig.test.json
/src/gulpfile.mjs
/src/eslint.config.mjs
Some of the files like custspa_myspa.xml use the name of the project and current path replaced inside.
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA). The following contributors of this PR have not signed the OCA:
- PR author: warambillete
- [email protected] (@sdntechnicaldoc)
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.
When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.
If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.