Skip to content

Commit 70e06bc

Browse files
Update README.md
1 parent a8b683c commit 70e06bc

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
11
# ImmutableSwift
22

3-
A description of this package.
3+
ImmutableSwift is a tool that generates swift model that supports immutability, coding(Coding and NSCoding), value comparions, hashing and copying. Directly inspired by [facebook/remodel](https://github.com/facebook/remodel).
4+
5+
## Download
6+
You can download the latest release from here: https://github.com/hackthehackerman/ImmutableSwift/releases
7+
8+
## Build
9+
```sh
10+
$ git clone [email protected]:hackthehackerman/ImmutableSwift.git
11+
$ cd ImmutableSwift
12+
$ swift build -c release
13+
```
14+
15+
## Usage
16+
To generate a model, you must first create a `.value` file that contains the modle schema. Here is an example:
17+
```
18+
Friend {
19+
String name
20+
Int daySinceFirstMet
21+
}
22+
```
23+
Once you created the schema file, you can generate the desired swift model with
24+
```
25+
./ImmutableSwift Path/To/ModelDirectory/Friend.value
26+
```
27+
28+
To generate models for every .value files in a directory, subtitute the file path with a directory path
29+
```
30+
# this will also generate every .value files in any sub-directories recursively
31+
./ImmutableSwift Path/To/ModelDirectory/
32+
```
33+

0 commit comments

Comments
 (0)