This extension allows you to use the Developer Tools of Miniapp inside Visual Studio Code.
Features
Create a New Miniapp
Create a new Miniapp quickly.
Select a Scaffold to Create a New Miniapp
Click the extension icon in the Activity Bar, then click "Create Miniapp". A panel appears with several templates you can choose from.
Select a scaffold and click the "OK" button.
Enter the name of your Miniapp and select the storage path.
Click "Create". The extension will automatically open the newly created Miniapp project.
Application Open Platform
Login: Login to the Application Open Platform.
Bind Application: Bind your Miniapp project to an application on the Application Open Platform.
Platform Integration: After successful binding, your Miniapp project is connected to the Application Open Platform. You can then use the platform to package, build, and publish your Miniapp.
RUN Miniapp
You can run Miniapps directly in Visual Studio Code, or use the mobile development extension to preview and debug within an Android or iOS Miniapp container.
Preview only: If you do not need to debug Miniapp container JavaScript APIs, it is recommended to use the built-in preview in VS Code.
Debug APIs: If you need to debug Miniapp container JavaScript APIs, please use the Android or iOS simulator with the mobile development extension.
Preview Miniapp in Visual Studio Code
in VS Code:
Click the extension icon in the Activity Bar,then select "Preview Miniapp in VS Code".
A prompt appears at the top of VS Code: "Is your Miniapp started?" Choose one of the following:
Yes (The Miniapp can be previewed.): The Miniapp is running. Enter its preview URL in the text box to view it in the preview window.
No (The Miniapp must be started first; 'npm start' will be executed.): The extension will automatically run the start command to launch your Miniapp. After successful startup, enter the preview URL in the text box to preview the Miniapp.
Preview Miniapp in Android emulator
In Android emulator:
Click the extension icon in the Activity Bar, then select "Preview Miniapp in Android Emulator.".
The extension will automatically start an Android emulator.
Once the emulator is running, an input dialog appears at the top of the window. Enter the preview URL of your Miniapp.
After entering the URL, the Android emulator will automatically open your Miniapp.
Preview Miniapp in iOS Simulator
In iOS Simulator:
Click the extension icon in the Activity Bar, then select "Preview Miniapp in iOS Simulator".
Choose the simulator you want to use. The extension will launch the selected iOS simulator.
Once the simulator is running, an input dialog appears at the top of the window. Enter the preview URL of your Miniapp.
After entering the URL, the iOS Simulator will automatically open your Miniapp.
Publish Miniapp
Click the extension icon in the Activity Bar, then select "Publish Miniapp".
The extension automatically calls the server API, calculates the latest version number based on the response, and updates it in the package.json file.
Then, the extension runs the build command, packages the build output, compresses it into a zip file, uploads it to the Application Open Platform, and creates a new version of the Miniapp.
Commands
superapp.createMiniappProject: Select a template and create a new Miniapp
superapp.login: Login to the Application Open Platform
superapp.previewInAndroidEmulator: Preview the Miniapp in an Android emulator
superapp.createAndroidEmulator: Create an Android emulator
superapp.previewInVSCode: Preview the Miniapp in VS Code
superapp.previewInIOSSimulator: Preview the Miniapp in iOS Simulator
superapp.publishMiniapp: Build the Miniapp and publish it to the Application Open Platform
superapp.bindApp: Bind the Miniapp to Application Open Platform
superapp.howToDebug: Show how to debug Miniapp
superapp.clearAllState: Clear all user state
superapp.viewAppInfo: View Application information