1.0.0 • Published 2 years ago

@wakeful-cloud/penpot-uploader v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Penpot Uploader

GitHub Continuous Deployment Status NPM Status

A utility to help bulk-upload SVG files to Penpot as components. Designed primarily for importing entire icon libraries, though it may work for other use-cases.

Documentation

Limitations

  1. ES module support only (No CommonJS support)
  2. SVGs are ran through SVGO, which may alter SVGs undesirably

Installation

  1. Install NodeJS V16+
  2. Install this package:
# Install as a binary and run (For end users)
npx @wakeful-cloud/penpot-uploader [Arguments]

# Install as a library (For other developers)
npm install @wakeful-cloud/penpot-uploader

Arguments

NameDefault/RequiredExampleDescription
i / input./**/*.svg--input /path/to/icon/library/**/*.svgInput glob
n / nameLibrary--name "My Super Awesome Icons"Bundle name (The name shown in Penpot)
t / team-idRequired--team-id c005ab2e-f66d-4635-956e-808d1d612ed9Account/team ID (You can get this from Penpot URLs; eg: https://design.penpot.app/#/dashboard/team/[TEAM ID]/projects)
o / output./library.penpot--output /path/to/output/my-super-awesome-icons.penpotOutput path (You'll probably want to use the .penpot file extension)

Note: this utility does not use positional arguments.

How it works

This utility works by running all inputted SVGs through SVGO to normalize and add special metadata required by Penpot to them. Then, it combines the SVGs and writes them to a ZIP file along with a manifest file and a blank page (Also required by Penpot).