Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Merging v0.2.0 into master! #13

Merged
merged 22 commits into from
Jul 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9a6a43d
Feature plan for v0.2.0
owensd Jul 6, 2015
6bf68ff
Added initial test target.
owensd Jul 6, 2015
b53cb58
Minor project updates
owensd Jul 6, 2015
b1af46f
Merge branch 'master' of github.com:owensd/apous into v0.2.0-dev
owensd Jul 6, 2015
94b7eea
Apous now creates a binary .apousscript.
owensd Jul 6, 2015
2c06ba5
Apous now only works by specifying the root path of your scripts inst…
owensd Jul 6, 2015
7bad340
Basic support for auto-versioning - issue #6.
owensd Jul 6, 2015
d931298
Cleaned up the hacks a bit and simplified tool creation with some hel…
owensd Jul 6, 2015
da4b149
Updated README.md with some badges.
owensd Jul 6, 2015
a07a70f
Place the badges inline with title. Fix for LICENSE link.
owensd Jul 6, 2015
e8ad6db
Removed the "Known Issues" section.
owensd Jul 6, 2015
434e10c
Refactoring!
owensd Jul 7, 2015
c6fafab
Add support for specifying a "main.swift" file; this allows for #! su…
owensd Jul 7, 2015
d7b4574
Added a sample for #! support.
owensd Jul 7, 2015
bf07359
Fixed a typo in a comment.
owensd Jul 7, 2015
e0e7427
Added description on how to run scripts as a #!.
owensd Jul 7, 2015
3ff31f2
Fix indentation for proper numbering.
owensd Jul 7, 2015
100175e
Fixed typo.
owensd Jul 7, 2015
88c5c98
Refactored apous logic into a tool. Also makes testing easier.
owensd Jul 7, 2015
8e189ec
Removed the generated version file from the repo.
owensd Jul 7, 2015
62e3756
Added a package to zip step for GitHub deployment.
owensd Jul 7, 2015
4203823
I had to comment out the NSTask/sdtdout redirection code as it didn't…
owensd Jul 7, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ Carthage/

# Apous
bin/
.apous.swift

.apousscript
VersionInfo.swift
releases/
9 changes: 9 additions & 0 deletions Features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Features Planned for v0.2.0:

1. Refactoring project to support unit tests
2. Support nested directories for the script

Possible for v0.2.0:

1. Creation of implicit Xcode file for Xcode authoring support

47 changes: 31 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,75 @@
|::.|:. |
`--- ---'

# Apous [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://raw.githubusercontent.com/owensd/apous/master/LICENSE) [![GitHub release](https://img.shields.io/github/release/owensd/apous.svg)](https://github.com/owensd/Apous/releases)


Apous is a simple tool that allows for easier authoring of Swift scripts.

Primary features:

1. Allow the breaking up of scripts into multiple files.
2. Dependency management through [Carthage](https://github.com/Carthage/Carthage) or [CocoaPods](https://github.com/CocoaPods/CocoaPods/).

# How it Works
## How it Works

Apous works by first checking for a `Cartfile` or `Podfile` in your script's directory. If one is
present, then `carthage update` or `pod install --no-integrate` will be run.

Next, all of your Swift files are combined into a single `.apous.swift` file that can
then be run by the `swift` REPL.
Next, all of your Swift files are compiled into a single `.apousscript` binary that will then be
run automatically for you.

It's really that simple.

# Getting Started
## Getting Started

First, you need to install the latest build of Apous.

1. Download the latest version of `apous` from "Releases".
2. Copy it to a location in your path, such as `/usr/local/bin/`.

# Creating Your First Script
## Creating Your First Script

1. Create a new directory for your scripts, say `mkdir demo`
2. Change to that directory: `cd demo`
3. Create a new script file: `touch demo.swift`
4. Change the contents of the file to:

```swift
import Foundation
```swift
import Foundation

print("Welcome to Apous!")
```
print("Welcome to Apous!")
```

5. Run the script: `apous demo.swift`
5. Run the script: `apous .`

This will output:

Welcome to Apous!

You can see some other samples here: [Samples](https://github.com/owensd/apous/tree/master/samples).

### Alternatively

Apous also supports running scripts with `#!`. Note that your entry point script **must** be named `main.swift`.

```swift
#!/usr/local/bin/apous

import Foundation

print("Welcome to Apous!")
```

# Known Issues
Then run:

> chmod +x main.swift
> ./main.swift
Welcome to Apous!

Currently there are some design limitations:

* [Issue #1](https://github.com/owensd/apous/issues/1) - Support for nested directories.
* [Issue #2](https://github.com/owensd/apous/issues/2) - Support for folder structure packages.
## FAQ

# FAQ
**Q: What is Apous mean?**

Q: What is Apous mean?
A: It's from the ancient Greek απους, meaning "without feet".
Loading