Skip to content

Commit a23953f

Browse files
committed
Comments and docs
...
1 parent c5e1b30 commit a23953f

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ declarative DSL to setup MacroExpress routes.
2828

2929
The Macro [Examples](https://github.com/Macro-swift/Examples) package
3030
contains a few examples which all can run straight from the source as
31-
swift-sh scripts.
31+
[swift-sh](https://github.com/mxcl/swift-sh) scripts.
3232

3333
```swift
3434
#!/usr/bin/swift sh
@@ -80,5 +80,10 @@ app.listen(1337)
8080
We like feedback, GitHub stars, cool contract work,
8181
presumably any form of praise you can think of.
8282

83-
There is a `#microexpress` channel on the
84-
[Noze.io Slack](http://slack.noze.io/). Feel free to join!
83+
**Want to support my work**?
84+
Buy an app:
85+
[Code for SQLite3](https://apps.apple.com/us/app/code-for-sqlite3/id1638111010),
86+
[Past for iChat](https://apps.apple.com/us/app/past-for-ichat/id1554897185),
87+
[SVG Shaper](https://apps.apple.com/us/app/svg-shaper-for-swiftui/id1566140414),
88+
[HMScriptEditor](https://apps.apple.com/us/app/hmscripteditor/id1483239744).
89+
You don't have to use it! 😀

Sources/dotenv/dotenv.swift

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// MacroExpress
44
//
55
// Created by Helge Heß on 02.07.20.
6-
// Copyright © 2020 ZeeZide GmbH. All rights reserved.
6+
// Copyright © 2020-2024 ZeeZide GmbH. All rights reserved.
77
//
88

99
#if os(Linux)
@@ -17,13 +17,25 @@ import func MacroCore.__dirname
1717
import func fs.accessSync
1818
import let fs.R_OK
1919

20+
/**
21+
* How to use:
22+
*
23+
* ```swift
24+
* import dotenv
25+
*
26+
* dotenv.config()
27+
* ```
28+
*
29+
* This reads the `.env` file (located using `__dirname`),
30+
* and adds the contents to the environment of the running process.
31+
*/
2032
public enum dotenv {}
2133

2234
public extension dotenv {
2335

2436
#if swift(>=5.3) // oh this mess
2537
/**
26-
* Read the .env config file, apply it to the environment, and return the
38+
* Read the .env config file, apply it on the environment, and return the
2739
* parsed values.
2840
*
2941
* Important: Remember to call this as early as possible, otherwise Foundation

0 commit comments

Comments
 (0)