wrangler 1.21.0

Command-line interface for all things Cloudflare Workers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{commands, settings::toml::TargetType};
use anyhow::Result;

pub fn init(name: Option<String>, site: bool, target_type: Option<TargetType>) -> Result<()> {
    let target_type = if site {
        // Workers Sites projects are always webpack for now
        Some(TargetType::Webpack)
    } else {
        target_type
    };

    commands::init(name.as_deref(), target_type, site)
}