DEV Community

Derrick Sherrill for WayScript

Posted on

Using Third Party Libraries with WayScript's Code Editors

Introduction

In today’s article, we are going to use WayScript to import libraries in different programming languages. In fact, it's about the requirements of each programming language. When you want to use each language, there are some specific libraries to be precise.

It's easy to reference it when you are programming normally. However, with WayScript, there is always a file somewhere you can put the name of the libraries as dependencies and WayScript will automatically download it.

Prerequisites

Here are some content you might find useful:

Python, Java and JavaScript

While working with WayScript and writing a script, you can have access to the current directory of the project.

WayScript provides JavaScript, Python, and Java modules to write scripts. Add all the modules and I’ll show you how to add dependencies for the scripts.

Adding Scripts

After adding the modules, you can see the editors of each language. And if you look closely in the files system, you can see the files which we’ll use to write the dependencies of each project. If you want to add dependencies, these requirements as you would in a pip Requirements File, using the Requirements File Format.

Adding Python Scripts

If you want to add dependencies, you can use the format you would for an npm-install command. Just write the dependencies in the js.dependencies file.

Adding JavaScript Scripts

WayScript uses Maven to install dependencies. Declare these dependencies as you would any mvn dependency, in the format of groupId:artifactId:version. You can add these dependencies in the java.dependencies file.

Adding Java Scripts

Conclusion

Questions about this script or anything else? Join our Discord. We're always around to help. If you want to work with the full script template, just find it here.

Top comments (0)