@explorable-viz/fluid 0.7.43 → 0.7.44

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.
@@ -5,7 +5,7 @@ require('http-shutdown').extend();
5
5
 
6
6
  const app = express();
7
7
 
8
- const root = __dirname + '/dist/' + process.argv[3];
8
+ const root = process.cwd() + '/dist/' + process.argv[3];
9
9
  app.use(serve(root));
10
10
 
11
11
  const server = app.listen(8080, function() {
@@ -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 = process.cwd() + '/dist/' + 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.43",
3
+ "version": "0.7.44",
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": {
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "bin": {
81
81
  "fluid": "./dist/fluid/fluid.mjs",
82
- "puppeteer": "./dist/fluid/puppeteer.js"
82
+ "test-website": "./dist/fluid/puppeteer.js"
83
83
  },
84
84
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
85
85
  }
@@ -2,13 +2,19 @@
2
2
  # run from project root
3
3
  set -xe
4
4
 
5
+ PREFIX=""
6
+
7
+ if [ -n "${2:-}" ]; then
8
+ PREFIX=$2
9
+ fi
10
+
5
11
  MODULE=$1
6
12
  SRC_PATH=${MODULE//./\/}
7
- SRC_PATH_LISP_CASE=$(./script/util/lisp-case.sh "$SRC_PATH")
13
+ SRC_PATH_LISP_CASE=$(./$PREFIX/script/util/lisp-case.sh "$SRC_PATH")
8
14
  echo "$SRC_PATH -> $SRC_PATH_LISP_CASE"
9
15
 
10
16
  if [[ -e "website/$SRC_PATH.purs" ]]; then
11
- ./script/util/bundle.sh $SRC_PATH_LISP_CASE Website.$MODULE
17
+ . "${PREFIX:+$PREFIX}/script/util/bundle.sh" $SRC_PATH_LISP_CASE Website.$MODULE
12
18
 
13
19
  if [[ -e "website/$SRC_PATH.html" ]]; then
14
20
  cp website/$SRC_PATH.html dist/$SRC_PATH_LISP_CASE/index.html
@@ -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
- . "${PREFIX:+$PREFIX/}script/bundle-page.sh" $WEBSITE
17
+ . "${PREFIX:+$PREFIX/}script/bundle-page.sh" $WEBSITE ${PREFIX:+$PREFIX}
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
- . "${PREFIX:+$PREFIX/}script/bundle-page.sh" $WEBSITE.$PAGE
29
+ . "${PREFIX:+$PREFIX/}script/bundle-page.sh" $WEBSITE.$PAGE ${PREFIX:+$PREFIX}
30
30
  done
31
31
 
32
32
  echo "Processing other static files:"
@@ -47,7 +47,7 @@ for CHILD in "${TO_COPY[@]}"; do
47
47
  done
48
48
 
49
49
  echo "Processing load-figure.js:"
50
- cp ${PREFIX}dist/fluid/load-figure.js dist/$WEBSITE_LISP_CASE/shared
50
+ cp "${PREFIX:+$PREFIX/}dist/fluid/load-figure.js" dist/$WEBSITE_LISP_CASE/shared
51
51
 
52
52
  cp -r fluid dist/$WEBSITE_LISP_CASE
53
53
  echo "Bundled website $WEBSITE"