Skip to content

Commit

Permalink
README: Instructions for shell redirection of output
Browse files Browse the repository at this point in the history
+ LICENCE
  • Loading branch information
AliSoftware committed Jul 19, 2015
1 parent 4d74315 commit d2c9430
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
9 changes: 9 additions & 0 deletions LICENSE
@@ -0,0 +1,9 @@
- MIT LICENSE -

Copyright (c) 2015 Olivier Halligon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -22,6 +22,7 @@ This will generate standalone executables into the `bin/` directory.
### Using the binaries & play with the Playground

* The built tools will be located in `bin/`. Simply invoke them with the necessary arguments from the command line (see doc of each tool below).
* Each tool generates the code to `stdout`, so you'll probably use a shell redirection to write that to a file (e.g. `./swiftgen-assets /path/to/Images.xcassets >Assets.swift`)
* The `SwiftGen.playground` will allow you to play around with the various `EnumBuilders` classes used by the compiled tools and see some usage examples.

> Note: The playground is in the Xcode 7 format, and uses its new concept of "Playground pages" to regroup multiple playground pages in a single Playground.
Expand Down
Expand Up @@ -33,7 +33,7 @@ public final class SwiftGenAssetsEnumBuilder {
}

public func build(enumName enumName : String = "Asset", indentation indent : SwiftGenIndentation = .Spaces(4)) -> String {
var text = "// AUTO-GENERATED FILE, DO NOT EDIT\n\n"
var text = "// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen\n\n"
let t = indent.string

text += "import Foundation\n"
Expand Down
2 changes: 1 addition & 1 deletion SwiftGen.playground/Sources/SwiftGenColorEnumBuilder.swift
Expand Up @@ -36,7 +36,7 @@ public final class SwiftGenColorEnumBuilder {
}

public func build(enumName enumName: String = "Name", indentation indent: SwiftGenIndentation = .Spaces(4)) -> String {
var text = "// AUTO-GENERATED FILE, DO NOT EDIT\n\n"
var text = "// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen\n\n"
let t = indent.string
text += commonCode(indentationString: t)

Expand Down
2 changes: 1 addition & 1 deletion SwiftGen.playground/Sources/SwiftGenL10nEnumBuilder.swift
Expand Up @@ -20,7 +20,7 @@ public final class SwiftGenL10nEnumBuilder {
}

public func build(enumName enumName : String = "L10n", indentation indent : SwiftGenIndentation = .Spaces(4)) -> String {
var text = "// AUTO-GENERATED FILE, DO NOT EDIT\n\n"
var text = "// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen\n\n"
let t = indent.string

text += "enum \(enumName.asSwiftIdentifier()) {\n"
Expand Down
Expand Up @@ -71,7 +71,7 @@ public final class SwiftGenStoryboardEnumBuilder {
}

public func build(enumName enumName: String? = "Name", indentation indent : SwiftGenIndentation = .Spaces(4)) -> String {
var text = "// AUTO-GENERATED FILE, DO NOT EDIT\n\n"
var text = "// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen\n\n"
let t = indent.string
text += commonCode(indentationString: t)

Expand Down

0 comments on commit d2c9430

Please sign in to comment.