@explorable-viz/fluid 0.7.41 → 0.7.43

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ const server = app.listen(8080, function() {
15
15
  (async () => {
16
16
  try {
17
17
  if (process.argv.length == 5 && process.argv[4] == "-l") {
18
- module = __dirname + process.argv[2]
18
+ module = __dirname + '/' + process.argv[2]
19
19
  } else {
20
20
  module = process.argv[2]
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorable-viz/fluid",
3
- "version": "0.7.41",
3
+ "version": "0.7.43",
4
4
  "description": "Fluid is an experimental programming language which integrates a bidirectional dynamic analysis to connect outputs to data sources in a fine-grained way. Fluid is implemented in PureScript and runs in the browser.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -20,6 +20,7 @@
20
20
  "files": [
21
21
  "dist/fluid/",
22
22
  "script/bundle-website.sh",
23
+ "script/bundle-page.sh",
23
24
  "script/util/clean.sh",
24
25
  "script/util/lisp-case.sh"
25
26
  ],
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+ # run from project root
3
+ set -xe
4
+
5
+ MODULE=$1
6
+ SRC_PATH=${MODULE//./\/}
7
+ SRC_PATH_LISP_CASE=$(./script/util/lisp-case.sh "$SRC_PATH")
8
+ echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
9
+
10
+ if [[ -e "website/$SRC_PATH.purs" ]]; then
11
+ ./script/util/bundle.sh $SRC_PATH_LISP_CASE Website.$MODULE
12
+
13
+ if [[ -e "website/$SRC_PATH.html" ]]; then
14
+ cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
15
+ else
16
+ cp website/template.html dist/$SRC_PATH_LISP_CASE/index.html
17
+ fi
18
+ fi
19
+
20
+ if [[ -e "website/$SRC_PATH.json" ]]; then
21
+ mkdir -p dist/$SRC_PATH_LISP_CASE
22
+ cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
23
+ cp website/$SRC_PATH.json dist/$SRC_PATH_LISP_CASE/spec.json
24
+ fi
@@ -14,7 +14,7 @@ WEBSITE_LISP_CASE=$(./$PREFIX/script/util/lisp-case.sh "$WEBSITE")
14
14
  echo "$WEBSITE -> $WEBSITE_LISP_CASE"
15
15
  mkdir -p "dist/$WEBSITE_LISP_CASE"
16
16
 
17
- . script/bundle-page.sh $WEBSITE
17
+ . "${PREFIX:+$PREFIX/}script/bundle-page.sh" $WEBSITE
18
18
 
19
19
  shopt -s nullglob
20
20
 
@@ -26,7 +26,7 @@ done | sort -u))
26
26
  set -x
27
27
 
28
28
  for PAGE in "${PAGES[@]}"; do
29
- . script/bundle-page.sh $WEBSITE.$PAGE
29
+ . "${PREFIX:+$PREFIX/}script/bundle-page.sh" $WEBSITE.$PAGE
30
30
  done
31
31
 
32
32
  echo "Processing other static files:"