Skip to content

Commit ffdf507

Browse files
committed
Merge branch 'feat-sc-site'
2 parents d18943f + a8978c2 commit ffdf507

33 files changed

Lines changed: 710 additions & 16 deletions

File tree

.github/workflows/site.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Site building and deploying
2+
run-name: Building and deploying site...
3+
on:
4+
push:
5+
branches: master
6+
7+
jobs:
8+
Building-And-Deploying-Site:
9+
runs-on: ubuntu-latest
10+
name: Site Building And Deploying
11+
env:
12+
github_sha: $GITHUB_SHA
13+
workspace: $GITHUB_WORKSPACE
14+
steps:
15+
- name: Checkout master branch
16+
uses: actions/checkout@v4
17+
with:
18+
path: main
19+
- name: Generating documentation
20+
run: |
21+
cd ${{env.workspace}}/main/stack-control-site
22+
cargo run --manifest-path ../stack-control-doc/Cargo.toml -- ./resources/documentation.json
23+
- name: Building wasm
24+
run: |
25+
cd ${{env.workspace}}/main/stack-control-site
26+
cargo install wasm-pack
27+
wasm-pack build ../stack-control-wasm --out-dir ../stack-control-site/resources/stack-control-wasm-module
28+
- name: Building and installing
29+
run: |
30+
cd ${{env.workspace}}/main/stack-control-site
31+
npm install
32+
npm run build
33+
- name: Checkout gen-site
34+
uses: actions/checkout@v4
35+
with:
36+
ref: 'gen-site'
37+
path: site
38+
- name: Publishing site
39+
run: |
40+
cd ${{env.workspace}}/site
41+
cp -R ${{env.workspace}}/main/stack-control-site/dist ${{env.workspace}}/site
42+
git config --global user.name 'CREAsTIVE'
43+
git config --global user.email 'CREAsTIVE@users.noreply.github.com'
44+
git commit -am "docs: documentation update for ${{env.github_sha}}"
45+
git push

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
debug/
2-
target/
2+
target/
3+
.vscode

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// This file was commited intentionaly
2+
{
3+
"typescript.tsdk": "stack-control-site\\node_modules\\typescript\\lib"
4+
}

Cargo.lock

Lines changed: 113 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[workspace]
2-
members=[ "stack-control", "stack-control-doc", "stack-control-shell"]
2+
members=[ "stack-control", "stack-control-doc", "stack-control-shell", "stack-control-wasm"]

stack-control-shell/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use itertools::Itertools;
22
use prompted::input;
3-
use stack_control::{bytecode::commands::core::bind_default_commands, compiletime::{compiler::Scope, lexer::split_string_to_tokens}, runtime::stack::Stack, utils::execution::{execute_code, join, simplify, ExecutionException}};
3+
use stack_control::{bytecode::commands::core::bind_default_commands, compiletime::{compiler::Scope, lexer::split_string_to_tokens}, runtime::stack::Stack, utils::execution::{execute_code, join, simplify_tokens, ExecutionException}};
44

55
fn main() {
66
loop {
@@ -13,7 +13,7 @@ fn main() {
1313
let mut stack = Stack::new();
1414

1515
let tokens = split_string_to_tokens(&input);
16-
println!("< {}", simplify(&tokens, &scope.command_map).map(|e| e.to_string()).join(""));
16+
println!("< {}", simplify_tokens(&tokens, &scope.command_map).map(|e| e.to_string()).join(""));
1717

1818

1919
match execute_code(&input, &mut stack) {

stack-control-site/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
node_modules
3+
package-lock.json

stack-control-site/README.MD

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Stack control site
2+
---
3+
4+
### Building:
5+
1. Generate documentation:
6+
```
7+
cargo run --manifest-path ../stack-control-doc/Cargo.toml -- ./resources/documentation.json
8+
```
9+
2. Build wasm:
10+
```
11+
wasm-pack build ../stack-control-wasm --out-dir ../stack-control-site/resources/stack-control-wasm-module
12+
```
13+
3. Install all modules:
14+
```
15+
npm install
16+
```
17+
4. Build:
18+
```
19+
npm run build
20+
```

stack-control-site/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Loading...</title>
6+
<style>
7+
body, html, .root {
8+
margin: 0;
9+
height: 100%;
10+
}
11+
</style>
12+
</head>
13+
<body>
14+
<div id="root" class="root"></div>
15+
<script src="bundle.js"></script>
16+
</body>
17+
</html>

stack-control-site/package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "stack-control-site",
3+
"version": "0.1.0",
4+
"private": "true",
5+
"scripts": {
6+
"build": "webpack --disable-interpret -c ./webpack.config.ts",
7+
"start": "webpack-dev-server --disable-interpret -c ./webpack.config.ts"
8+
},
9+
"keywords": [],
10+
"author": "CREAsTIVE",
11+
"license": "MIT",
12+
"description": "",
13+
"devDependencies": {
14+
"@babel/core": "^7.27.1",
15+
"@babel/preset-env": "^7.27.2",
16+
"@types/lodash": "^4.17.17",
17+
"@types/react": "^18.3.22",
18+
"@types/react-dom": "^18.3.7",
19+
"babel-loader": "^10.0.0",
20+
"copy-webpack-plugin": "^13.0.0",
21+
"css-loader": "^7.1.2",
22+
"imports-loader": "^5.0.0",
23+
"style-loader": "^4.0.0",
24+
"ts-loader": "^9.5.2",
25+
"ts-node": "^10.9.2",
26+
"tsconfig-paths-webpack-plugin": "^4.2.0",
27+
"typescript": "^5.8.3",
28+
"typescript-plugin-css-modules": "^5.1.0",
29+
"webpack": "^5.99.9",
30+
"webpack-cli": "^6.0.1",
31+
"webpack-dev-server": "^5.2.1"
32+
},
33+
"dependencies": {
34+
"lodash": "^4.17.21",
35+
"react": "^19.1.0",
36+
"react-dom": "^19.1.0",
37+
"sass-loader": "^16.0.5",
38+
"stack-control-wasm": "file:resources/stack-control-wasm-module"
39+
}
40+
}

0 commit comments

Comments
 (0)