{"id":13725046,"url":"https://github.com/rexxars/sanipack","last_synced_at":"2025-03-16T10:31:56.661Z","repository":{"id":49211076,"uuid":"255514969","full_name":"rexxars/sanipack","owner":"rexxars","description":"Enhanced Sanity.io plugin development","archived":false,"fork":false,"pushed_at":"2021-10-12T15:29:47.000Z","size":303,"stargazers_count":54,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T16:04:04.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rexxars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-14T05:04:58.000Z","updated_at":"2024-01-03T00:48:15.000Z","dependencies_parsed_at":"2022-09-17T00:11:08.683Z","dependency_job_id":null,"html_url":"https://github.com/rexxars/sanipack","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexxars%2Fsanipack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexxars%2Fsanipack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexxars%2Fsanipack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexxars%2Fsanipack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rexxars","download_url":"https://codeload.github.com/rexxars/sanipack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814898,"owners_count":20352037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:02:10.820Z","updated_at":"2025-03-16T10:31:56.140Z","avatar_url":"https://github.com/rexxars.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# sanipack\n\n[![npm version](https://img.shields.io/npm/v/sanipack.svg?style=flat-square)](https://www.npmjs.com/package/sanipack)[![Build Status](https://img.shields.io/github/workflow/status/rexxars/sanipack/CI/main.svg?style=flat-square)](https://github.com/rexxars/sanipack/actions?query=workflow%3ACI)\n\nAn opinionated, enhanced [Sanity.io](https://www.sanity.io/) plugin development experience.\n\n## Features\n\n- Bootstrap new plugins with (opinionated) tooling:\n  - [ESLint](https://eslint.org/) (with [Sanity config](https://github.com/sanity-io/sanity/tree/next/packages/eslint-config-sanity))\n  - [Prettier](https://prettier.io/) (with Sanity settings)\n  - [EditorConfig](https://editorconfig.org/) (with Sanity settings)\n  - [.gitignore](https://git-scm.com/docs/gitignore) + [.npmignore](https://docs.npmjs.com/cli/v6/using-npm/developers#keeping-files-out-of-your-package)\n  - Build scripts (pre-publish build + verify)\n- Verifies plugin conventions before publishing:\n  - No unused dependencies\n  - No undeclared dependencies\n  - Referenced files exist, has correct casing and is publishable\n  - Has an [SPDX](https://spdx.org/licenses/) compatible license definition\n  - Has a valid plugin config, if present\n  - `react`/`react-dom` declared as peer dependencies, if used\n  - ... and more ...\n- Compiles plugin source code using Babel\n\n## Quick start\n\n```bash\n# Initialize a new plugin (outside of your Sanity studio folder)\nnpx sanipack init sanity-plugin-spotify\n\n# Make your plugin linkable, and compile an initial version\ncd sanity-plugin-spotify\nnpm link\nnpm run build\n\n# Link the plugin to your Sanity studio and start it\ncd /path/to/my-studio\nnpm link sanity-plugin-spotify\nsanity start\n\n# In another terminal, start a watch task for your plugin\ncd /path/to/sanity-plugin-spotify\nnpm run watch\n```\n\n## Usage\n\n```\nEnhanced Sanity.io plugin development experience\n\nUsage\n  $ sanipack [--help] [--debug] \u003ccommand\u003e [\u003cargs\u003e]\n\n  These are common commands used in various situations:\n\n    build    Compile a Sanity plugin (prior to publishing)\n    init     Create a new Sanity plugin\n    splat    Inject sanipack into an existing Sanity plugin\n    verify   Verify a Sanity plugin prior to publishing\n    version  Show the version of sanipack currently installed\n\n  Options\n    --silent      Do not print info and warning messages\n    --verbose     Log everything. This option conflicts with --silent\n    --debug       Print stack trace on errors\n    --version     Output the version number\n    --help        Output usage information\n\n  Examples\n    # Build a Sanity plugin for publishing\n    $ sanipack build\n\n    # Verify that a Sanity plugin is ready to be published\n    # (great for pre-publish step!)\n    $ sanipack verify\n```\n\nUse the `--help` flag on each command for more information on their usage, eg `sanipack build --help`.\n\n## Publishing a plugin\n\n**Note:** If you're writing a plugin that is only useful for yourself or your company, you might want to either put the plugin inside of the `plugins` folder of your Sanity studio (saves you from having to publish at all), or if shared across multiple \"private\" studios: register an organization on npm and make sure your module is [prefixed with the organization scope](https://docs.npmjs.com/creating-and-publishing-private-packages), eg `@your-company/plugin-name`.\n\nAlso; you cannot easily remove modules/versions from npm once published. Take a good look at your `package.json` to see that the fields in there makes sense to you, and make sure there are no \"secrets\" (authorization tokens, API keys or similar) in the plugin directory - anything not listed in `.npmignore` will be part of the published module.\n\nWhen you're ready to publish, run `npm publish` (or `yarn publish` if you prefer). The `prepublishOnly` task should kick in and compile the source files, then verify the built output to ensure it looks good.\n\nIf you have not published any modules to npm before, you will be asked to create a user first.\n\n## FAQ\n\n**Q:** Do I _have_ to use this for developing Sanity plugins?\n\n**A:** Absolutely not! Make sure your Sanity plugin is ES5-compatible and that your `sanity.json` file and any references parts refer to the right directories, and you're good to go. This package was created to make it easier to set up the build toolchain and prevent common mistakes. If you know what you're doing and don't like any magic, roll your own thing! :)\n\n## License\n\nMIT © [Espen Hovlandsdal](https://espen.codes/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexxars%2Fsanipack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexxars%2Fsanipack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexxars%2Fsanipack/lists"}