File: 0002-Improve-building-of-example.patch

package info (click to toggle)
node-browserify 17.0.0%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,416 kB
  • sloc: javascript: 5,646; makefile: 27; sh: 10
file content (48 lines) | stat: -rw-r--r-- 1,785 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Mon, 16 Mar 2020 17:42:31 +0100
Subject: Improve building of example

Use environment variable for building browserify
---
 example/multiple_bundles/build.sh | 9 +++++----
 example/source_maps/build.js      | 2 +-
 example/source_maps/build.sh      | 6 ++++--
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/example/multiple_bundles/build.sh b/example/multiple_bundles/build.sh
index 1066a86..8fe7d92 100755
--- a/example/multiple_bundles/build.sh
+++ b/example/multiple_bundles/build.sh
@@ -1,4 +1,5 @@
-#!/bin/bash
-browserify -r ./robot.js > static/common.js
-browserify -x ./robot.js beep.js > static/beep.js
-browserify -x ./robot.js boop.js > static/boop.js
+#!/bin/sh
+BROWSERIFY=${BROWSERIFY:-browserify}
+$BROWSERIFY -r ./robot.js > static/common.js
+$BROWSERIFY -x ./robot.js beep.js > static/beep.js
+$BROWSERIFY -x ./robot.js boop.js > static/boop.js
diff --git a/example/source_maps/build.js b/example/source_maps/build.js
index e65bc7e..9d291f9 100644
--- a/example/source_maps/build.js
+++ b/example/source_maps/build.js
@@ -1,4 +1,4 @@
-var browserify = require('../..'),
+var browserify = require('browserify'),
     path = require('path'),
     fs = require('fs'),
     bundlePath = path.join(__dirname, 'js', 'build', 'bundle.js');
diff --git a/example/source_maps/build.sh b/example/source_maps/build.sh
index 6ae19fb..2f2c644 100755
--- a/example/source_maps/build.sh
+++ b/example/source_maps/build.sh
@@ -1,4 +1,6 @@
-#!/bin/bash
-../../bin/cmd.js --debug -e ./js/main.js > js/build/bundle.js
+#!/bin/sh
+BROWSERIFY=${BROWSERIFY:-browserify}
+
+${BROWSERIFY} --debug -e ./js/main.js > js/build/bundle.js
 
 echo bundle was generated with source maps, you can now open index.html