1.0.0 • Published 2 years ago
@wakeful-cloud/penpot-uploader v1.0.0
Penpot Uploader
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
- ES module support only (No CommonJS support)
- SVGs are ran through SVGO, which may alter SVGs undesirably
Installation
- Install NodeJS V16+
- 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
Name | Default/Required | Example | Description |
---|---|---|---|
i / input | ./**/*.svg | --input /path/to/icon/library/**/*.svg | Input glob |
n / name | Library | --name "My Super Awesome Icons" | Bundle name (The name shown in Penpot) |
t / team-id | Required | --team-id c005ab2e-f66d-4635-956e-808d1d612ed9 | Account/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.penpot | Output 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).
1.0.0
2 years ago