Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

sor4chi/twrangler

Repository files navigation

TWrangler

Important

This project is now archived as the wrangler package now provides the json schema.

TWrangler is a simple tool to help you to manage wrangler.toml file for Cloudflare Stacks.

TWrangler means (T)ype-safe (Wrangler).toml.

Enhance your DX with configure your wrangler.toml file.

Usage

npm install -D twrangler

Write your wrangler.config.ts file.

import { defineConfig } from "twrangler";

export default defineConfig({
  name: "my-project",
  main: "src/index.ts",
  compatibility_date: "2022-03-21",
});
npx twrangler build

prefer to add "prepare": "twrangler build" in your package.json scripts.

You can get generated wrangler.toml file in cwd.

Features (Roadmap)

  • ⚡ Configure wrangler.toml file in TypeScript with type support.
  • 🚀 Generate wrangler.toml file from TypeScript.
  • 🔑 Built-in .env and .vars support.
  • 🌎 Multiple environment support.

License

MIT