-
Notifications
You must be signed in to change notification settings - Fork 47
Move framer-plugin-tools into monorepo as workspace package #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,304
−255
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5ac02e0
Move framer-plugin-tools into monorepo as workspace package
niekert 02f18bf
node22 target
niekert df3274c
Add tests for packPlugin
niekert 907c959
rename to zipPluginDistribution
niekert 8f0ba01
support relative and absolute paths
niekert 80256cd
check if distPath is a directory
niekert eb17893
fix CLI program name
niekert 2d5e5c5
Improve description for --help
niekert 67a1e3e
update code-link with new pack command
niekert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-106 KB
.yarn/cache/@babel-generator-npm-8.0.0-beta.4-ab401a2835-79a2130a45.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-416 KB
.yarn/cache/@babel-parser-npm-8.0.0-beta.4-b610635771-41ea150c87.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+14.8 KB
.yarn/cache/@commander-js-extra-typings-npm-13.1.0-360957fb64-cdb7f854ac.zip
Binary file not shown.
Binary file removed
BIN
-8.17 KB
.yarn/cache/@oxc-project-types-npm-0.110.0-2eb76fb91a-427a130ca2.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-6.92 MB
.yarn/cache/@rolldown-binding-darwin-arm64-npm-1.0.0-rc.1-4132962059-10.zip
Binary file not shown.
Binary file added
BIN
+6.87 MB
.yarn/cache/@rolldown-binding-darwin-arm64-npm-1.0.0-rc.3-c3196f4d78-10.zip
Binary file not shown.
Binary file removed
BIN
-7.38 MB
.yarn/cache/@rolldown-binding-darwin-x64-npm-1.0.0-rc.1-e1b0f227a4-10.zip
Binary file not shown.
Binary file added
BIN
+7.31 MB
.yarn/cache/@rolldown-binding-darwin-x64-npm-1.0.0-rc.3-edaa9164af-10.zip
Binary file not shown.
Binary file removed
BIN
-7.22 MB
.yarn/cache/@rolldown-binding-linux-arm64-gnu-npm-1.0.0-rc.1-bae23cc55a-10.zip
Binary file not shown.
Binary file added
BIN
+7.14 MB
.yarn/cache/@rolldown-binding-linux-arm64-gnu-npm-1.0.0-rc.3-194ce4c287-10.zip
Binary file not shown.
Binary file removed
BIN
-7.21 MB
.yarn/cache/@rolldown-binding-linux-arm64-musl-npm-1.0.0-rc.1-848846c606-10.zip
Binary file not shown.
Binary file added
BIN
+7.14 MB
.yarn/cache/@rolldown-binding-linux-arm64-musl-npm-1.0.0-rc.3-fd6342d84f-10.zip
Binary file not shown.
Binary file renamed
BIN
+7.77 MB
...-x64-gnu-npm-1.0.0-rc.1-7e87daaa07-10.zip → ...-x64-gnu-npm-1.0.0-rc.3-fb6aa24536-10.zip
Binary file not shown.
Binary file renamed
BIN
+7.73 MB
...x64-musl-npm-1.0.0-rc.1-ce157db0ca-10.zip → ...x64-musl-npm-1.0.0-rc.3-b285db285c-10.zip
Binary file not shown.
Binary file removed
BIN
-7.22 MB
.yarn/cache/@rolldown-binding-win32-arm64-msvc-npm-1.0.0-rc.1-e5e5323bfb-10.zip
Binary file not shown.
Binary file added
BIN
+7.16 MB
.yarn/cache/@rolldown-binding-win32-arm64-msvc-npm-1.0.0-rc.3-9076c881e2-10.zip
Binary file not shown.
Binary file renamed
BIN
+7.69 MB
...x64-msvc-npm-1.0.0-rc.1-d378dd46eb-10.zip → ...x64-msvc-npm-1.0.0-rc.3-cda6ed4bb8-10.zip
Binary file not shown.
Binary file renamed
BIN
+10.7 KB
...-npm-1.0.0-rc.1-c71b2c5059-b8fdae059c.zip → ...-npm-1.0.0-rc.3-790b1e278c-b181a693b7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+774 KB
.yarn/cache/@rollup-rollup-linux-arm64-gnu-npm-4.57.1-fd27dea33b-10.zip
Binary file not shown.
Binary file added
BIN
+788 KB
.yarn/cache/@rollup-rollup-linux-arm64-musl-npm-4.57.1-3dce1fd7b1-10.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+857 KB
.yarn/cache/@rollup-rollup-linux-x64-musl-npm-4.57.1-1bc4af3cb5-10.zip
Binary file not shown.
Binary file added
BIN
+779 KB
.yarn/cache/@rollup-rollup-win32-arm64-msvc-npm-4.57.1-36312bb667-10.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+902 KB
.yarn/cache/@rollup-rollup-win32-x64-msvc-npm-4.57.1-57e2356b3a-10.zip
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+465 KB
...ode-npm-22.19.6-c82ef0b745-a5bac443b2.zip → ...ode-npm-22.19.7-d4e0361572-0a5c9cc3bd.zip
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+24.1 KB
...pect-npm-4.0.17-b015851278-f260fefea5.zip → ...pect-npm-4.0.18-03919ccd0b-2115bff1bb.zip
Binary file not shown.
Binary file renamed
BIN
+40.1 KB
...cker-npm-4.0.17-3277b0d6dc-4d938c298d.zip → ...cker-npm-4.0.18-118c87f90e-46f584a4c1.zip
Binary file not shown.
Binary file removed
BIN
-12.4 KB
.yarn/cache/@vitest-pretty-format-npm-4.0.17-fb47e1d906-e50925f441.zip
Binary file not shown.
Binary file added
BIN
+12.5 KB
.yarn/cache/@vitest-pretty-format-npm-4.0.18-a73855e4a4-4cafc7c985.zip
Binary file not shown.
Binary file renamed
BIN
+40.5 KB
...nner-npm-4.0.17-d25da0ba46-75c62ac09b.zip → ...nner-npm-4.0.18-3dbdf3fb30-d7deebf086.zip
Binary file not shown.
Binary file renamed
BIN
+22.2 KB
...shot-npm-4.0.17-10d3668aa3-0cda8970f4.zip → ...shot-npm-4.0.18-35134202ed-50aa5fb7fc.zip
Binary file not shown.
Binary file renamed
BIN
+10 KB
...-spy-npm-4.0.17-85c387d906-23313980c5.zip → ...-spy-npm-4.0.18-296c59dce4-f7b1618ae1.zip
Binary file not shown.
Binary file renamed
BIN
+56.1 KB
...tils-npm-4.0.17-9f377c3c9c-b8b96f8c2c.zip → ...tils-npm-4.0.18-b1c99a49e0-e8b2ad7bc3.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16.7 KB
.yarn/cache/fix-dts-default-cjs-exports-npm-1.0.1-421fe0399f-3324418bb6.zip
Binary file not shown.
Binary file removed
BIN
-1.51 KB
.yarn/cache/framer-plugin-tools-npm-1.0.0-09c6263530-5f6b731038.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+2.1 MB
...ttier-npm-3.7.4-78f94d4194-b4d00ea13b.zip → ...ttier-npm-3.8.1-04022a855f-3da1cf8c1e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-29.1 KB
.yarn/cache/rolldown-plugin-dts-npm-0.21.8-261945d964-a26149f786.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+19.7 KB
.yarn/cache/ts-interface-checker-npm-0.1.13-0c7b064494-9f7346b9e2.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+400 KB
...test-npm-4.0.17-5c1875fbc1-792cf5ecdb.zip → ...test-npm-4.0.18-52f42bdace-6c6464ebcf.zip
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| .PHONY: build publish publish-alpha | ||
|
|
||
| build: | ||
| yarn build | ||
|
|
||
| publish: | ||
| yarn npm publish | ||
|
|
||
| publish-alpha: | ||
| yarn npm publish --tag alpha |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # framer-plugin-tools | ||
|
|
||
| CLI tools for building and packaging Framer plugins. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| npm install -g framer-plugin-tools | ||
| ``` | ||
|
|
||
| Or use directly with npx: | ||
|
|
||
| ```bash | ||
| npx framer-plugin-tools pack | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### `pack` | ||
|
|
||
| Builds your plugin and creates a `plugin.zip` file ready for submission to the Framer Marketplace. | ||
|
|
||
| ```bash | ||
| framer-plugin-tools pack | ||
| ``` | ||
|
|
||
| This command will: | ||
|
|
||
| 1. Run `npm run build` in the current directory | ||
| 2. Create a `plugin.zip` from the `dist/` folder | ||
|
|
||
| For custom options (e.g., custom build command, different output directory), run: | ||
|
|
||
| ```bash | ||
| framer-plugin-tools pack --help | ||
| ``` | ||
|
|
||
|
|
||
| ## Submitting Your Plugin | ||
|
|
||
| After running `pack`, submit your plugin at: | ||
| https://www.framer.com/marketplace/dashboard/plugins/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| { | ||
| "name": "framer-plugin-tools", | ||
| "version": "1.1.0", | ||
| "description": "CLI Tools for Framer Plugins", | ||
| "type": "module", | ||
| "main": "dist/index.js", | ||
| "types": "dist/index.d.ts", | ||
| "bin": "dist/cli.js", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "import": "./dist/index.js", | ||
| "default": "./dist/index.js" | ||
| } | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/framer/plugins.git", | ||
| "directory": "packages/plugin-tools" | ||
| }, | ||
| "scripts": { | ||
| "build": "tsup", | ||
| "check-vitest": "run g:check-vitest", | ||
| "check-biome": "run g:check-biome", | ||
| "check-eslint": "run g:check-eslint", | ||
| "check-typescript": "run g:check-typescript", | ||
| "prepublishOnly": "yarn run build" | ||
| }, | ||
| "author": "", | ||
| "license": "MIT", | ||
| "engines": { | ||
| "node": ">=22" | ||
| }, | ||
| "dependencies": { | ||
| "@commander-js/extra-typings": "^13.1.0", | ||
| "adm-zip": "^0.5.16", | ||
| "commander": "^13.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/adm-zip": "^0.5.7", | ||
| "@types/node": "^22.0.0", | ||
| "tsup": "^8.0.0", | ||
| "typescript": "^5.9.2", | ||
| "vitest": "^3.2.4" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import path from "node:path" | ||
| import { program } from "@commander-js/extra-typings" | ||
| import { runPluginBuildScript, zipPluginDistribution } from "./lib" | ||
|
|
||
| const defaultDistDir = "dist" | ||
| const defaultOutputFilename = "plugin.zip" | ||
| const defaultCWD = process.cwd() | ||
|
|
||
| program.name("framer-plugin-tools").description("CLI tools for Framer Plugins").version("1.1.0") | ||
|
|
||
| program | ||
| .command("pack") | ||
| .alias("prepare") // Backwards compatibility but was never documented | ||
| .description("Build and package your plugin into a zip file for submission to the Framer Marketplace") | ||
| // Uppercase -C matches familiar git shorthands | ||
| .option("-C, --cwd <dir>", "plugin project directory", defaultCWD) | ||
| .option("-d, --dist-dir <dir>", "output directory of the build output", defaultDistDir) | ||
| .option("-b, --build-command <cmd>", "custom build command (e.g., 'npm run build:plugin')") | ||
| .option("--prebuilt", "skip the build step and only create the zip") | ||
| .option("-o, --output <filename>", "output zip filename", defaultOutputFilename) | ||
| .action(async options => { | ||
| if (!options.prebuilt) { | ||
| console.log("Building your Plugin…") | ||
| await runPluginBuildScript(options.cwd, options.buildCommand) | ||
| } | ||
|
|
||
| console.log(`Creating ${options.output} file…`) | ||
|
|
||
| const zipFilePath = zipPluginDistribution({ | ||
| cwd: options.cwd, | ||
| distPath: options.distDir, | ||
| zipFileName: options.output, | ||
| }) | ||
|
|
||
| const fileName = path.basename(zipFilePath) | ||
| const dirName = path.dirname(zipFilePath) | ||
|
|
||
| console.log( | ||
| `\n⚡️ ${fileName} file has been created in ${dirName} \n Submit your Plugin on the Framer Marketplace: https://www.framer.com/marketplace/dashboard/plugins/` | ||
| ) | ||
| }) | ||
|
|
||
| program.parse(process.argv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { runPluginBuildScript, zipPluginDistribution } from "./lib" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.