1. Home
  2. Docs
  3. What is a package

What is a package

In Polypad, a package, as name suggests, are simply set of script files, config files, etc. developed by programmers to perform specific tasks. They often include information about the bundle scripts and sometimes third-party library dependencies.

Structure of a package

In Polypad, a package contains 3 files:

  1. script_name.js
  2. scriptist.json
  3. README.md

Scriptist.json

{
    "name": "Hello Polypad",
    "description": "Example script created for polypad",
    "version": "1.0.0",
    "tags": [
        "scripts",
        "polypad",
        "hello-world"
    ],
    "homepage": "https://polypad.io",
    "license": "GPL",
    "type": "script",
    "authors": [
        {
            "name": "Marcell Purham",
            "email": "m@marcell.me",
            "homepage": "marcell.me"
        }
    ],
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/mpurham/hello-polypad"
        }
    ]
}

helloPolypad.js

/*
    name: Hello Polypad
    description: Example script created for polypad
    author: Marcell Purham
    tags: script,polypad,hello
*/

function main(input) {
    input.text = "Hello Polypad!";
}

README

# Hello Polypad

This package is pretty basic. It simply outputs `Hello Polypad` to the textpad.

## Usage

## Features and compatability

## Contributing

Any pull requests with bugfixes or efficiency improvements is greatly appreciated.

Was this article helpful to you? Yes No

How can we help?