Go to file
Max Desiatov e6aec262b3
Implement rebuilds and reloads for `carton dev`
2020-06-08 20:41:40 +01:00
.github Fix OpenCombine build error on Linux 2020-06-06 19:51:55 +01:00
.vscode Improve logging, add basic WebSocket handling 2020-06-07 19:25:08 +01:00
Sources/carton Implement rebuilds and reloads for `carton dev` 2020-06-08 20:41:40 +01:00
TestApp Implement rebuilds and reloads for `carton dev` 2020-06-08 20:41:40 +01:00
Tests Fix Linux build: rename cartonTests to CartonTests 2020-06-06 10:52:12 +01:00
entrypoint Implement rebuilds and reloads for `carton dev` 2020-06-08 20:41:40 +01:00
.gitignore Add basic Vapor server for the dev command 2020-05-05 23:02:06 +01:00
.pre-commit-config.yaml Add empty package with basic dependencies 2020-05-04 18:00:18 +01:00
.swift-version Basic parsing of package info on carton dev 2020-06-04 10:38:51 +01:00
.swiftformat Specify operators in .swiftformat 2020-05-04 18:08:00 +01:00
.swiftlint.yml Add empty package with basic dependencies 2020-05-04 18:00:18 +01:00
Brewfile Start implementing checkDevDependencies function 2020-06-05 17:55:10 +01:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md 2020-06-05 23:05:04 +01:00
LICENSE Update LICENSE 2020-05-04 18:01:52 +01:00
Package.resolved Remove ShellOut package dependency 2020-06-06 22:04:04 +01:00
Package.swift Remove ShellOut package dependency 2020-06-06 22:04:04 +01:00
README.md Rename `carton dist` to `carton bundle` in README 2020-06-08 11:50:38 +01:00
output.log Remove HypertextLiteral dependency 2020-06-06 21:02:37 +01:00
package-lock.json Add basic Vapor server for the dev command 2020-05-05 23:02:06 +01:00
package.json Improve logging, add basic WebSocket handling 2020-06-07 19:25:08 +01:00
webpack.config.js Rename index.js polyfill to dev.js to disambiguate 2020-06-05 16:18:13 +01:00

README.md

carton 📦

carton is a watcher, bundler, and test runner for your SwiftWasm apps. The main goal of carton is to provide a smooth zero-config experience when developing for WebAssembly. It is still in development, but it aims to support these features:

  • Creating basic package boilerplate for apps built with SwiftWasm with carton init.
  • Watching the app for source code changes and reloading it in your browser with carton dev.
  • Running your XCTest suite in the full JavaScript/DOM environment with carton test.
  • Optimizing and packaging the app for distribution with carton bundle.

When using carton you don't have to install Node.js or to write your own webpack configs. carton itself uses webpack as a dev dependency to precompile and minify the required WASI polyfill and the reload-on-rebuild code, but you won't need webpack or Node.js when using carton as an end user. The polyfill is distributed to you precompiled.

It is currently work in progress, so watch the repository for imminent updates!

Contributing

Sponsorship

If this tool saved you any amount of time or money, please consider sponsoring the work of its maintainer. While some of the sponsorship tiers give you priority support or even consulting time, any amount is appreciated and helps in maintaining the project.

Coding Style

This project uses SwiftFormat and SwiftLint to enforce formatting and coding style. We encourage you to run SwiftFormat within a local clone of the repository in whatever way works best for you either manually or automatically via an Xcode extension, build phase or git pre-commit hook etc.

To guarantee that these tools run before you commit your changes on macOS, you're encouraged to run this once to set up the pre-commit hook:

brew bundle # installs SwiftLint, SwiftFormat and pre-commit
pre-commit install # installs pre-commit hook to run checks before you commit

Refer to the pre-commit documentation page for more details and installation instructions for other platforms.

SwiftFormat and SwiftLint also run on CI for every PR and thus a CI build can fail with incosistent formatting or style. We require CI builds to pass for all PRs before merging.

Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to conduct@carton.dev.