DotEnv component

Swift MIT License Actions Status Codacy Badge codecov Contributing Twitter

Installation

Swift

Download and install Swift

Swift Package

mkdir MyApp
cd MyApp
swift package init --type executable // Creates an executable app named "MyApp"

Package.swift

// swift-tools-version:5.3

import PackageDescription

let package = Package(
    name: "MyApp",
    dependencies: [
        .package(name: "chaqmoq-dotenv", url: "https://github.com/chaqmoq/dotenv.git", .branch("master"))
    ],
    targets: [
        .target(name: "MyApp", dependencies: [
            .product(name: "DotEnv", package: "chaqmoq-dotenv")
        ]),
        .testTarget(name: "MyAppTests", dependencies: [
            .target(name: "MyApp")
        ])
    ]
)

Build

swift build -c release

Tests

swift test --enable-test-discovery --sanitize=thread