Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
loicbourgois committed Aug 1, 2021
1 parent 5c8ccfe commit 98dc4fa
Show file tree
Hide file tree
Showing 21 changed files with 92 additions and 49 deletions.
15 changes: 15 additions & 0 deletions docs/404.html
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Gouttelettes</title>
<link id="style" rel="stylesheet" type="text/css" href="/index.css"/>
<link id="theme" rel="stylesheet" type="text/css"/>
<!-- TODO: invert icon by 180 degree, like page header icon-->
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
</head>
<body>
<noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>
<script src="/bootstrap.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/bootstrap.js
Expand Up @@ -483,4 +483,4 @@ eval("// A dependency graph that contains any wasm must all be imported\n// asyn

/***/ })

/******/ });
/******/ });
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added docs/flags/flag-france.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/flags/flag-united-kingdom.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/index_dark.css
@@ -0,0 +1,8 @@
* {
color: #aaf;
background: #0000;
}

body {
background: #111;
}
8 changes: 8 additions & 0 deletions docs/index_light.css
@@ -0,0 +1,8 @@
* {
color: #aaf;
background: #0000;
}

body {
background: #eee;
}
16 changes: 0 additions & 16 deletions front/examples/000_hello_world.gf.test

This file was deleted.

26 changes: 0 additions & 26 deletions front/examples/001_hello_someone.gf.test

This file was deleted.

File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions front/src/flow/format.rs
Expand Up @@ -103,12 +103,12 @@ pub fn format_flow_as_yaml(x: &str) -> String {
fn test_format_flow() {
let examples = vec!["000_hello_world", "001_hello_someone"];
for example in examples {
let content = read_to_string(format!("examples/{}.gf", example))
let content = read_to_string(format!("static/examples/{}.gf", example))
.expect("Something went wrong reading the file");
let content_flat = read_to_string(format!("examples_flat/{}.gf", example))
.expect("Something went wrong reading the file");
write(
format!("examples/{}.gf.test", example),
format!("examples_test/{}.test.gf", example),
format_flow(&content_flat),
)
.unwrap();
Expand All @@ -119,7 +119,7 @@ fn test_format_flow() {
fn test_flatten() {
let examples = vec!["000_hello_world", "001_hello_someone"];
for example in examples {
let content = read_to_string(format!("examples/{}.gf", example))
let content = read_to_string(format!("static/examples/{}.gf", example))
.expect("Something went wrong reading the file");
let content_flat = read_to_string(format!("examples_flat/{}.gf", example))
.expect("Something went wrong reading the file");
Expand All @@ -135,7 +135,7 @@ fn test_flatten() {
fn test_format_flow_as_yaml() {
let examples = vec!["000_hello_world", "001_hello_someone"];
for example in examples {
let content = read_to_string(format!("examples/{}.gf", example))
let content = read_to_string(format!("static/examples/{}.gf", example))
.expect("Something went wrong reading the file");
let content_yaml = read_to_string(format!("examples_yaml/{}.yaml", example))
.expect("Something went wrong reading the file");
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 8 additions & 1 deletion front/webpack.config.js
Expand Up @@ -13,7 +13,14 @@ module.exports = {
},
mode: "development",
plugins: [
new CopyWebpackPlugin(['index.html', 'favicon.svg', 'examples', 'index.css'])
new CopyWebpackPlugin([
'index.html',
'favicon.svg',
'static',
'index.css',
'index_dark.css',
'index_light.css'
])
],
devServer: {
// reference: https://webpack.js.org/configuration/dev-server/#devserverhttps
Expand Down
49 changes: 48 additions & 1 deletion mir/src/main.rs
Expand Up @@ -65,7 +65,7 @@ fn release() -> bool {
== 0
{
println!("[ok] webpack");
return copy_release();
return delete_release();
} else {
println!("[error] webpack");
}
Expand All @@ -74,12 +74,59 @@ fn release() -> bool {
}
return false;
}
fn delete_release() -> bool {
if let Ok(mut child) = Command::new("rm")
.arg("-r")
.arg("-f")
.arg("/Users/loicbourgois/github.com/gouttelettes/gouttelettes/docs")
.spawn()
{
if child
.wait()
.expect("rm wasn't running")
.code()
.unwrap()
== 0
{
println!("[ok] rm");
return copy_release();
} else {
println!("[error] rm");
}
} else {
println!("rm didn't start");
}
return false;
}
fn copy_release() -> bool {
if let Ok(mut child) = Command::new("cp")
.arg("-R")
.arg("/Users/loicbourgois/github.com/gouttelettes/gouttelettes/front/dist")
.arg("/Users/loicbourgois/github.com/gouttelettes/gouttelettes/docs")
.spawn()
{
if child
.wait()
.expect("cp wasn't running")
.code()
.unwrap()
== 0
{
println!("[ok] cp");
return copy_404();
} else {
println!("[error] cp");
}
} else {
println!("cp didn't start");
}
return false;
}
fn copy_404() -> bool {
if let Ok(mut child) = Command::new("cp")
.arg("/Users/loicbourgois/github.com/gouttelettes/gouttelettes/docs/index.html")
.arg("/Users/loicbourgois/github.com/gouttelettes/gouttelettes/docs/404.html")
.spawn()
{
if child
.wait()
Expand Down

0 comments on commit 98dc4fa

Please sign in to comment.