@sanity/plugin-kit
7.0.28.0.0
dist/inject-CargN-jD.js−
dist/inject-CargN-jD.jsDeleted−62
Index: package/dist/inject-CargN-jD.js
===================================================================
--- package/dist/inject-CargN-jD.js
+++ package/dist/inject-CargN-jD.js
@@ -1,62 +0,0 @@
-import { t as cliName } from "./constants-BDxElAZy.js";
-import { t as log_default } from "./log-DgQL-Rv9.js";
-import { i as presetHelpList, n as initFlags, r as inject } from "./init-HxqT5UQG.js";
-import { u as findStudioV3Config } from "./package-YDElb3ND.js";
-import { t as loadPackageConfig } from "./load-package-config-CNQRvdGW.js";
-import meow from "meow";
-import path from "path";
-const help = `
-Usage
- $ ${cliName} inject [dir] [<args>]
-
-Options
- --no-eslint Disables ESLint config and dependencies from being added
- --no-prettier Disables prettier config and dependencies from being added
- --no-typescript Disables typescript config and dependencies from being added
- --no-license Disables LICENSE + package.json license field from being added
- --no-editorconfig Disables .editorconfig from being added
- --no-gitignore Disables .gitignore from being added
- --no-scripts Disables scripts from being added to package.json
-
- --license [spdx] Use the license with the given SPDX identifier
- --force No prompt when overwriting files
-
- --preset [preset-name] Adds config and files from a named preset. --preset can be supplied multiple times.
- The following presets are available:
-${presetHelpList(30)}
- --preset-only Skips the default inject steps. Use this to apply a preset to an otherwise complete plugin.
-
-Examples
- # Inject configuration into the plugin in the current directory
- $ ${cliName} inject
-
- # Inject configuration into the plugin in ~/my-plugin
- $ ${cliName} inject ~/my-plugin
-
- # Don't inject eslint or prettier
- $ ${cliName} inject --no-eslint --no-prettier
-
- # Inject plugin configuration and semver-workflow into the plugin in the current directory
- $ @sanity/plugin-kit inject --preset semver-workflow
-
- # Only inject semver-workflow and renovatebot config from presets
- $ ${cliName} inject --preset-only --preset semver-workflow --preset renovatebot
-
-`;
-async function run({ argv }) {
- let cli = meow(help, {
- flags: initFlags,
- argv,
- description: "Inject configuration into a Sanity plugin"
- }), basePath = path.resolve(cli.input[0] || process.cwd()), outDir = (await loadPackageConfig({ basePath }))?.dist ?? "dist", { v3ConfigFile } = await findStudioV3Config(basePath);
- if (v3ConfigFile) throw Error(`${v3ConfigFile} exists - are you trying to INJECT into a studio instead of a plugin?`);
- log_default.info("Inject config into plugin in \"%s\"", basePath), await inject({
- basePath,
- outDir,
- flags: cli.flags,
- validate: !1
- }), log_default.info("Done!");
-}
-export { run as default };
-
-//# sourceMappingURL=inject-CargN-jD.js.map
\ No newline at end of file