0.2.3 • Published 8 months ago

unplugin-actions-kit v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

unplugin-actions-kit

npm version npm downloads

Generate TypeSafety for GitHub Actions. Powered by unplugin.

!NOTE Documentation is available here

Installation

pnpm install -D unplugin-actions-kit

Usage

// vite.config.ts
import ActionsKitPlugin from "unplugin-actions-kit/vite";

export default defineConfig({
  plugins: [
    ActionsKitPlugin({
      /* options */
    }),
  ],
});

// rollup.config.js
import ActionsKitPlugin from "unplugin-actions-kit/rollup";

export default {
  plugins: [
    ActionsKitPlugin({
      /* options */
    }),
  ],
};

// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require("unplugin-actions-kit/webpack").default({
      /* options */
    }),
  ],
};

// esbuild.config.js
import { build } from "esbuild";
import ActionsKitPlugin from "unplugin-actions-kit/esbuild";

build({
  /* ... */
  plugins: [
    ActionsKitPlugin({
      /* options */
    }),
  ],
});

// rspack.config.mjs
import ActionsKitPlugin from "unplugin-actions-kit/rspack";

/** @type {import("@rspack/core").Configuration} */
export default {
  plugins: [
    ActionsKitPlugin({
      /* options */
    }),
  ],
};

// rolldown.config.js
import { defineConfig } from "rolldown";
import ActionsKitPlugin from "unplugin-actions-kit/rolldown";

export default defineConfig({
  input: "./index.js",
  plugins: [
    ActionsKitPlugin({
      /* options */
    }),
  ],
});

Configuration

actionPath

The path to the action.yml or action.yaml file.
If not provided, it will look for action.yml or action.yaml in the root directory.

  • Type: string
  • Default: null

inject

Inject inputs and outputs into the global scope.

  • Type: boolean | "inputs" | "outputs"
  • Default: null

autocomplete

Enable Autocomplete.

  • Type: boolean
  • Default: true

outputPath

The output path for the generated TypeScript file.
If not provided, it will use the directory where the action.yml or action.yaml file is located.

  • Type: string
  • Default: null

📄 License

Published under MIT License.