owensd / apous Goto Github PK
View Code? Open in Web Editor NEWLet's make Swift scripting a reality.
License: MIT License
Let's make Swift scripting a reality.
License: MIT License
Add support for nest folders as packages and package dependencies.
main.swift
io/
path/
sys/
Each of the folders could be packages and/or dependencies, and most importantly, not require and Xcode project to build.
Currently only OS X is supported for the script; support iOS too.
The CLI interface is a hack, needs to have proper support for commands:
apous update
apous help
apous run [path/to/scripts]
apous edit
apous init
etc...
A script that hasn't changed shouldn't need to be recompiled. Make sure this recompile isn't happening.
For example, if I were to create a file called main.swift
and fill it with:
#!/usr/local/bin/apous
print("Hello, World!")
then executing the following:
$ chmod +x main.swift
$ ./main.swift
Would simply output
Hello, World!
However, if I were to rename it to just main
, or main1.swift
, it starts throwing errors:
$ ./main
<unknown>:0: error: no input files
$ ./main1.swift
Only a 'main.swift' file can be specified.
If I wanted to, for example, have a build script created through apous, calling the file main.swift
would be sort of ridiculous, setup
or install
makes much more sense.
Just a few thoughts - I really like apous either way ๐
I've got Carthage installed but I haven't used it enough to know what this is referring to in particular.
This would help by allowing scripters to use Xcode to edit the scripts without actually requiring projects to be built and maintained.
It may be advantageous to be able to store scripts in nested folders.
main.swift
/utils
util1.swift
util2.swift
Currently, these will be ignored. This will likely tie into issue #2 as we think about free-floating packages that are not tied to an Xcode project.
I created the following script:
#!/usr/local/bin/apous
import Foundation
import CommonMark
import LiterateSwift
print("Hello")
And the following Podfile:
platform :osx, 10.9
plugin 'cocoapods-rome'
use_frameworks!
pod 'CommonMark'
pod 'LiterateSwift'
However, when I run it, I get the following error (regardless of whether I take the hasbang approach or compile everything).
<unknown>:0: error: cannot load underlying module for CoreGraphics
<unknown>:0: note: did you forget to set an SDK using -sdk or SDKROOT?
<unknown>:0: note: use "xcrun -sdk macosx swift" to select the default OS X SDK installed with Xcode
Maybe add it to homebrew or just have a simple script that can be run.
I think the only real consideration here is Xcode.app
and Xcode-beta.app
. Supporting arbitrary versions of Swift seems like something that wouldn't even be feasible.
Maybe mark scripts as requiring at least a particular version of Swift? Still problematic as Swift is still not source-compatible between versions yet.
In the title.
OMG!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.