Skip to content

Issue: 902 - Added a new feature to the CLI workflow that allows users to create an SPA #914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

warambillete
Copy link
Member

✨ 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.

sdntechnicaldoc and others added 2 commits May 21, 2025 13:54
… scaffold for SPAs

Signed-off-by: Arambillete, Wilman <warambillete@netsuite.com>
Signed-off-by: warambillete <wilman.arambillete@oracle.com>

  #
Copy link

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:

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.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label May 21, 2025
Signed-off-by: warambillete <wilman.arambillete@oracle.com>
@warambillete warambillete marked this pull request as draft May 23, 2025 10:08
@warambillete warambillete marked this pull request as ready for review May 23, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants