@explorable-viz/fluid 0.7.23 → 0.7.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorable-viz/fluid",
3
- "version": "0.7.23",
3
+ "version": "0.7.24",
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": {
@@ -2,15 +2,29 @@
2
2
  set -xe
3
3
 
4
4
  WEBSITE="Misc"
5
+ SCRIPT_ROOT=false
5
6
 
6
- while getopts "w:" opt; do
7
+
8
+ while getopts "w:r:" opt; do
7
9
  case $opt in
8
10
  w) WEBSITE="$OPTARG";;
11
+ r) SCRIPT_ROOT="$OPTARG";;
9
12
  esac
10
13
  done
11
14
 
15
+ if [[ "$SCRIPT_ROOT" = true ]]; then
16
+ CLEAN=./node_modules/@explorable-viz/fluid/script/util/clean.sh
17
+ LISP_CASE=./node_modules/@explorable-viz/fluid/script/util/lisp-case.sh
18
+ DIST="node_modules/@explorable-viz/fluid/dist"
19
+ else
20
+ CLEAN=./script/util/clean.sh
21
+ LISP_CASE=./script/util/lisp-case.sh
22
+ DIST="dist"
23
+ fi
24
+
25
+
12
26
  SRC_PATH=${WEBSITE//./\/}
13
- SRC_PATH_LISP_CASE=$(./script/util/lisp-case.sh "$SRC_PATH")
27
+ SRC_PATH_LISP_CASE=$($LISP_CASE "$SRC_PATH")
14
28
  echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
15
29
 
16
30
  shopt -s nullglob
@@ -23,16 +37,16 @@ set -x
23
37
  for PAGE in "${PAGES[@]}"; do
24
38
  MODULE=$WEBSITE.$PAGE
25
39
  SRC_PATH=${MODULE//./\/}
26
- SRC_PATH_LISP_CASE=$(./script/util/lisp-case.sh "$SRC_PATH")
40
+ SRC_PATH_LISP_CASE=$($LISP_CASE "$SRC_PATH")
27
41
  echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
28
42
 
29
43
  if [[ ! -e "website/$SRC_PATH.purs" ]]; then
30
- ./script/util/clean.sh $SRC_PATH_LISP_CASE
44
+ $CLEAN $SRC_PATH_LISP_CASE
31
45
 
32
46
  cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
33
47
  else
34
48
  if [[ -e "website/$SRC_PATH.html" ]]; then
35
- ./script/util/clean.sh $SRC_PATH_LISP_CASE
49
+ $CLEAN $SRC_PATH_LISP_CASE
36
50
 
37
51
  cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
38
52
  fi
@@ -49,7 +63,7 @@ for PAGE in "${PAGES[@]}"; do
49
63
  done
50
64
 
51
65
 
52
- WEBSITE_LISP_CASE=$(./script/util/lisp-case.sh "$WEBSITE")
66
+ WEBSITE_LISP_CASE=$($LISP_CASE "$WEBSITE")
53
67
 
54
68
  set +x
55
69
  TO_COPY=()
@@ -62,12 +76,12 @@ done
62
76
  set -x
63
77
 
64
78
  echo "Processing shared files:"
65
- cp -r dist/fluid/shared dist/$WEBSITE_LISP_CASE/shared
66
- cp dist/fluid/load-fig.js dist/$WEBSITE_LISP_CASE/shared/load-fig.js
79
+ cp -r $DIST/fluid/shared dist/$WEBSITE_LISP_CASE/shared
80
+ cp $DIST/fluid/load-fig.js dist/$WEBSITE_LISP_CASE/shared/load-fig.js
67
81
 
68
- cp -r dist/fluid/font dist/$WEBSITE_LISP_CASE/font
69
- cp -r dist/fluid/css dist/$WEBSITE_LISP_CASE/css
70
- cp dist/fluid/favicon.ico dist/$WEBSITE_LISP_CASE/favicon.ico
82
+ cp -r $DIST/fluid/font dist/$WEBSITE_LISP_CASE/font
83
+ cp -r $DIST/fluid/css dist/$WEBSITE_LISP_CASE/css
84
+ cp $DIST/fluid/favicon.ico dist/$WEBSITE_LISP_CASE/favicon.ico
71
85
 
72
86
  echo "Processing static files:"
73
87