Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed May 4, 2018
0 parents commit 0a5c780
Show file tree
Hide file tree
Showing 33 changed files with 6,411 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# editorconfig.org
root = true

[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/dist
/build
/node_modules
/public/assets/main.js
/public/cloud.lua
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 SquidDev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 47 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
export PATH := $(shell npm bin):$(PATH)

TS := $(shell find src -type f \( -name '*.ts' -or -name '*.tsx' \) )
LUA := $(shell find src -type f -name '*.lua')
BUILD_TS := $(TS:src/%=build/%)

.PHONEY: lint serve all clean

all: public/assets/main.js build

clean:
rm -rf build dist

dist: package.json package-lock.json build public/index.html public/assets/main.css public/assets/main.js public/assets/termFont.png public/cloud.lua
rm -rf dist
mkdir dist
cp package.json package-lock.json dist

mkdir dist/build
cp -r build/*.js build/server dist/build

mkdir -p dist/public/assets
cp public/index.html dist/public
cp public/cloud.lua dist/public
cp public/assets/termFont.png dist/public/assets
uglifycss public/assets/main.css > dist/public/assets/main.css
uglifyjs public/assets/main.js > dist/public/assets/main.js

lint: $(TS) tsconfig.json tslint.json
tslint --project tsconfig.json

build: $(TS) tsconfig.json
tsc --project tsconfig.json
touch build

public/assets/main.js: build
rollup -c

public/cloud.lua: $(LUA)
cd src/host; \
lua _make.lua ../../public/cloud.lua

serve: build
tsc --project tsconfig.json --watch & \
rollup -c --watch & \
node -r esm build/server & \
wait
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Cloud Catcher

A web interface for ComputerCraft computers


## Getting started
- Visit https://cloud-catcher.squiddev.cc/
- Follow the instructions there
- One can run `cloud edit <filename>` to edit a file remotely.
Loading

0 comments on commit 0a5c780

Please sign in to comment.