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

Commit

Permalink
Merge pull request #13 from owensd/v0.2.0-dev
Browse files Browse the repository at this point in the history
Merging v0.2.0 into master!
  • Loading branch information
owensd committed Jul 7, 2015
2 parents b0f08d0 + 4203823 commit 034ecf1
Show file tree
Hide file tree
Showing 19 changed files with 576 additions and 275 deletions.
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

0 comments on commit 034ecf1

Please sign in to comment.