Webtask

Documentation

Adding NPM Modules with the Webtask Editor

Use the NPM Modules tool to easily add your favorite NPM Module

For customized documentation and ready to run samples, please log in.

Working with NPM Modules

The Webtask Editor allows you to easily manage the list of NPM modules that your code depends upon. You can add, edit, or remove NPM module dependencies by clicking on the tools icon in the editor toolbar and then selecting the NPM Modules option to open the NPM Modules panel.

NPM Modules side panel

Adding a module

With the NPM Modules panel open, click on the Add Module link to launch the search dialogue box. You can then search for and select any NPM module from the public NPM repository.

Adding a NPM module

After selecting an NPM module, you will notice that the NPM module name and version will be automatically added to the list of dependencies in the NPM Modules panel.

The new NPM module listed

Note: After adding a new module the editor may show the webtask as dirty. This is because the dependencies are only saved when the webtask is saved.

Editing a module

If you have already added an NPM module as a dependency, you can select a different version of the module. Click on the edit icon next to the NPM module entry to launch a dialog box that lists all of the available versions of that given NPM module. After selecting the new version of the module, click on the save button to update the module version.

Changing the version of a NPM module

Note: The module version is only updated when the webtask is saved.

Removing a module

To remove an NPM module that was previously added as a dependency, click on the delete icon next to the NPM module entry. A dialogue box will ask you to confirm that you want to remove that given module from the list of dependencies. Click 'yes' to remove the NPM module.

Removing a NPM module

Note: The module is removed when the webtask is saved.