Online Swift Playground
Clone or download
Permalink
Failed to load latest commit information.
.vscode Add VSCode settings Jan 31, 2018
Frameworks Initial commit Jan 8, 2018
OnlinePlayground 4.2 Release Sep 26, 2018
Sources Default to Swift 4.2 Sep 26, 2018
Tests Initial commit Jan 8, 2018
Views Update Monaco. Install with MonacoWebpackPlugin Jun 10, 2018
config Initial commit Jan 8, 2018
frontend Default to Swift 4.2 Sep 26, 2018
static Remove generated files from static Jun 10, 2018
.babelrc Update 4.2 snapshot Jul 23, 2018
.cfignore Initial commit Jan 8, 2018
.dockerignore Install nvm+node+npm in Docker. Generate app.js Jun 11, 2018
.gitignore Update Monaco. Install with MonacoWebpackPlugin Jun 10, 2018
BuildVersioningForSSL.xcconfig Initial commit Jan 8, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jan 8, 2018
CONTRIBUTING.md Initial commit Jan 8, 2018
Dockerfile Install nvm+node+npm in Docker. Generate app.js Jun 11, 2018
LICENSE.txt Specify CC-BY-NC-4.0 License Jan 21, 2018
Package.resolved Remove Github Cretentials (Authentication.swift). Update dependencies. Jul 1, 2018
Package.swift Remove Github Cretentials (Authentication.swift). Update dependencies. Jul 1, 2018
README.md Minor refactoring Jun 9, 2018
bootstrap.sh 4.2 Release Sep 26, 2018
kubernetes-deployment.yaml 4.2 Release Sep 26, 2018
package-lock.json npm audit fix Aug 27, 2018
package.json Update Monaco. Install with MonacoWebpackPlugin Jun 10, 2018
run.sh Install nvm+node+npm in Docker. Generate app.js Jun 11, 2018
webpack.config.js Update Monaco. Install with MonacoWebpackPlugin Jun 10, 2018

README.md

SwiftPlayground.run

Platform Twitter

Online Swift Playground. Implemented in Swift.

TBA. Checkout http://SwiftPlayground.run

SwiftPlayground.run

Installation & Run

$ git clone https://github.com/krzyzanowskim/OnlineSwiftPlayground.git
$ cd swiftplayground
$ ./run.sh

The run.sh script will generate Xcode project (on macOS) and bootstrap the environment. Bootstraping involves

  1. Download Swift Toochains supported by the playground
  2. Pre-build support module using the toolchains
  3. Install dependencies

Development

Xcode

Generate Xcode project

$ swift package generate-xcodeproj

React

Web user interface is build with React and webpack.

$ npm run build

Docker

krzyzanowskim/onlineswiftplayground

Download the latest image:

$ docker pull krzyzanowskim/onlineswiftplayground

or build docker image by yourself:

$ git clone https://github.com/krzyzanowskim/OnlineSwiftPlayground.git
$ cd OnlineSwiftPlayground
$ docker build . -t krzyzanowskim/onlineswiftplayground .

then run container:

$ docker run -d -p 8080:8080 --name onlineswiftplayground -t onlineswiftplayground

and wait until docker container is up (usually several seconds).

Playground is available at http://localhost:8080. If the docker setup uses VirtualBox, the you can get the IP address from docker-machine ip command.

$ open http://$(docker-machine ip):8080

Config

Third party frameworks should be copied to Frameworks directory (Frameworks are for macOS host only)

See config/ for GitHub auth. sample config.

Author

SwiftPlayground.run is owned and maintained by Marcin Krzyzanowski

You can follow me on Twitter at @krzyzanowskim for project updates and releases.

License

Creative Commons Attribution Non Commercial 4.0. See LICENSE file.