NPM Package Management

The developer can manage easily all NPM dependencies in the current project within the Mini Program Studio. The entry is shown in the figure below.

NPM Package Management

Configuration Workspace

Default Workspace

The Mini Program Studio automatically creates default workspace on basis of the path of the package.json file under the current directory. If the package.json is found in the current project, it will show the default workspace as shown above. If the package.json is not found in the root path of the project, it will show an empty workspace. Then you need to click the Add Folder to add the root path manually. Then the Mini Program Studio will create a package.json file in the root path automatically.

NPM Package Management

Dependency Management

In the npm package management interface, you can manage the dependencies.

  • Install specific dependency: input the dependency name in the input box and press enter to install the dependency. There are two options to install dependencies. The npm packages installed in the Dependencies area will go to production and the npm packages installed in the DEV DEPENDENCIES only work for development environment.
  • Install all dependencies: click the install all dependencies button to install all dependencies.  NPM Package Management
  • Delete dependency: click the delete button to delete specific dependency.

 NPM Package Management