Browse Source

top level re-org + shell scripts replaced by Makefile

master
Inderjit Gill 1 month ago
parent
commit
0958083686
31 changed files with 53 additions and 52 deletions
  1. +51
    -0
      Makefile
  2. +0
    -13
      client/build.bat
  3. +0
    -12
      client/build.sh
  4. +0
    -5
      client/css-build.bat
  5. +0
    -2
      client/css-build.sh
  6. +0
    -11
      client/ts/build.bat
  7. +0
    -8
      client/ts/build.sh
  8. +0
    -0
      stylesheets/.gitignore
  9. +0
    -0
      stylesheets/Cargo.toml
  10. +0
    -0
      stylesheets/scss/_bones.scss
  11. +0
    -0
      stylesheets/scss/_codemirror.scss
  12. +0
    -0
      stylesheets/scss/_stylesheet.scss
  13. +0
    -0
      stylesheets/scss/_variables.scss
  14. +0
    -0
      stylesheets/scss/seni.scss
  15. +0
    -0
      stylesheets/src/main.rs
  16. +0
    -0
      typescript/src/Controller.ts
  17. +0
    -0
      typescript/src/History.ts
  18. +0
    -0
      typescript/src/Job.ts
  19. +0
    -0
      typescript/src/JobType.ts
  20. +0
    -0
      typescript/src/Log.ts
  21. +0
    -0
      typescript/src/Matrix.ts
  22. +1
    -0
      typescript/src/Renderer.ts
  23. +0
    -0
      typescript/src/SeniMode.ts
  24. +0
    -0
      typescript/src/Timer.ts
  25. +0
    -0
      typescript/src/codemirror-seni.js
  26. +0
    -0
      typescript/src/editor.js
  27. +0
    -0
      typescript/src/index.js
  28. +0
    -0
      typescript/src/sketch.js
  29. +0
    -0
      typescript/src/utils.js
  30. +1
    -1
      typescript/tsconfig-main.json
  31. +0
    -0
      typescript/tsconfig-sketch.json

+ 51
- 0
Makefile View File

@@ -0,0 +1,51 @@
# 'make' will build:
# - css from scss
# - wasm from rust
# - js from typescript
#
# 'make release' will build the release version of the wasm
#

all: css wasm index
.PHONY: all

# client
#
# todo: also add sketch to all

CSS_SRC=$(wildcard stylesheets/scss/*.scss)
CLIENT_RUST_SRC=$(wildcard client/src/*.rs)
CORE_RUST_SRC=$(wildcard core/src/*.rs) $(wildcard core/src/geometry/*.rs)
TYPESCRIPT_SRC=$(wildcard typescript/src/*)

release: css wasm-release index
css: www/stylesheet.css
wasm: www/client_bg.wasm
index: www/index.js
sketch: www/sketch.js

www/stylesheet.css: $(CSS_SRC)
cargo run --manifest-path stylesheets/Cargo.toml -- stylesheets/scss/seni.scss www/stylesheet.css

www/client_bg.wasm: $(CLIENT_RUST_SRC) $(CORE_RUST_SRC)
cargo build --manifest-path client/Cargo.toml --target wasm32-unknown-unknown
wasm-bindgen client/target/wasm32-unknown-unknown/debug/client.wasm --out-dir www --no-typescript --no-modules

www/index.js: $(TYPESCRIPT_SRC) typescript/tsconfig-main.json
tsc --project typescript/tsconfig-main.json

www/sketch.js: $(TYPESCRIPT_SRC) typescript/tsconfig-sketch.json
tsc --project typescript/tsconfig-sketch.json

wasm-release:
cargo build --manifest-path client/Cargo.toml --release --target wasm32-unknown-unknown
wasm-bindgen client/target/wasm32-unknown-unknown/release/client.wasm --out-dir www --no-typescript --no-modules

# clean
#
clean:
rm -f www/stylesheet.css
rm -f www/client_bg.wasm
rm -f www/client.js
rm -f www/index.js
rm -f www/sketch.js

+ 0
- 13
client/build.bat View File

@@ -1,13 +0,0 @@
@echo off

setlocal EnableDelayedExpansion

rem builds a release build by default

if "%1" == "debug" (
cargo build --target wasm32-unknown-unknown
wasm-bindgen target/wasm32-unknown-unknown/debug/client.wasm --out-dir ..\www --no-typescript --no-modules
) else (
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen target/wasm32-unknown-unknown/release/client.wasm --out-dir ..\www --no-typescript --no-modules
)

+ 0
- 12
client/build.sh View File

@@ -1,12 +0,0 @@
#!/bin/sh

# builds a release build by default

if [ "$1" = "debug" ]
then
cargo build --target wasm32-unknown-unknown
wasm-bindgen target/wasm32-unknown-unknown/debug/client.wasm --out-dir ../www --no-typescript --no-modules
else
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen target/wasm32-unknown-unknown/release/client.wasm --out-dir ../www --no-typescript --no-modules
fi

+ 0
- 5
client/css-build.bat View File

@@ -1,5 +0,0 @@
@echo off

setlocal EnableDelayedExpansion

cargo run --manifest-path scss\Cargo.toml -- scss\scss\seni.scss ..\www\stylesheet.css

+ 0
- 2
client/css-build.sh View File

@@ -1,2 +0,0 @@
#!/bin/sh
cargo run --manifest-path scss/Cargo.toml -- scss/scss/seni.scss ../www/stylesheet.css

+ 0
- 11
client/ts/build.bat View File

@@ -1,11 +0,0 @@
@echo off

setlocal EnableDelayedExpansion

rem builds index.js by default

if "%1" == "sketch" (
tsc --project tsconfig-sketch.json
) else (
tsc --project tsconfig-main.json
)

+ 0
- 8
client/ts/build.sh View File

@@ -1,8 +0,0 @@
#!/bin/sh

if [ "$1" = "sketch" ]
then
tsc --project tsconfig-sketch.json
else
tsc --project tsconfig-main.json
fi

client/scss/.gitignore → stylesheets/.gitignore View File


client/scss/Cargo.toml → stylesheets/Cargo.toml View File


client/scss/scss/_bones.scss → stylesheets/scss/_bones.scss View File


client/scss/scss/_codemirror.scss → stylesheets/scss/_codemirror.scss View File


client/scss/scss/_stylesheet.scss → stylesheets/scss/_stylesheet.scss View File


client/scss/scss/_variables.scss → stylesheets/scss/_variables.scss View File


client/scss/scss/seni.scss → stylesheets/scss/seni.scss View File


client/scss/src/main.rs → stylesheets/src/main.rs View File


client/ts/src/Controller.ts → typescript/src/Controller.ts View File


client/ts/src/History.ts → typescript/src/History.ts View File


client/ts/src/Job.ts → typescript/src/Job.ts View File


client/ts/src/JobType.ts → typescript/src/JobType.ts View File


client/ts/src/Log.ts → typescript/src/Log.ts View File


client/ts/src/Matrix.ts → typescript/src/Matrix.ts View File


client/ts/src/Renderer.ts → typescript/src/Renderer.ts View File

@@ -25,6 +25,7 @@ enum TextureUnit {
maskTexture,
}


enum RPCommand {
geometry = 1,
mask,

client/ts/src/SeniMode.ts → typescript/src/SeniMode.ts View File


client/ts/src/Timer.ts → typescript/src/Timer.ts View File


client/ts/src/codemirror-seni.js → typescript/src/codemirror-seni.js View File


client/ts/src/editor.js → typescript/src/editor.js View File


client/ts/src/index.js → typescript/src/index.js View File


client/ts/src/sketch.js → typescript/src/sketch.js View File


client/ts/src/utils.js → typescript/src/utils.js View File


client/ts/tsconfig-main.json → typescript/tsconfig-main.json View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"target": "es6",
"lib": ["ES2018", "DOM"],
"outFile": "../../www/index.js",
"outFile": "../www/index.js",
"allowJs": true,
"sourceMap": true,
"noImplicitAny": true,

client/ts/tsconfig-sketch.json → typescript/tsconfig-sketch.json View File


Loading…
Cancel
Save