File tree Expand file tree Collapse file tree 8 files changed +17
-29
lines changed Expand file tree Collapse file tree 8 files changed +17
-29
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ export NP_PATCHED_NODEJS=" /Users/thesayyn/Documents/bazel/rules_nodejs/internal/node/_node_bin"
3
+ export PATH=" /Users/thesayyn/Documents/bazel/rules_nodejs/internal/node/_node_bin" :$PATH
4
+ if [[ ! " ${@ } " =~ " node_patches.js" ]]; then
5
+ exec /private/var/tmp/_bazel_thesayyn/a9a36d475d03232bfeced54055fb3183/external/nodejs_darwin_amd64/bin/nodejs/bin/node --require " /Users/thesayyn/Documents/bazel/rules_nodejs/internal/node/node_patches.js" " $@ "
6
+ else
7
+ exec /private/var/tmp/_bazel_thesayyn/a9a36d475d03232bfeced54055fb3183/external/nodejs_darwin_amd64/bin/nodejs/bin/node " $@ "
8
+ fi
9
+
Original file line number Diff line number Diff line change 1
1
load ("@build_bazel_rules_nodejs//:index.bzl" , "pkg_web" )
2
- load ("@npm_bazel_jasmine//:index.from_src. bzl" , "jasmine_node_test " )
2
+ load ("//internal/golden_file_test:golden_file_test. bzl" , "golden_file_test " )
3
3
4
4
package (default_visibility = ["//visibility:public" ])
5
5
6
6
pkg_web (
7
7
name = "pkg" ,
8
8
srcs = [
9
- "index.html " ,
9
+ "index.js " ,
10
10
],
11
11
substitutions = {
12
12
"THIS_SHOULD_BE_REPLACED" : "THIS_SHOULD_BE_REPLACED_WITH_THIS" ,
13
13
},
14
14
)
15
15
16
- jasmine_node_test (
16
+ golden_file_test (
17
17
name = "test" ,
18
- srcs = ["spec.js" ],
19
- data = [
20
- "index_golden.html_" ,
21
- ":pkg" ,
22
- ],
23
- tags = [
24
- "fix-windows" ,
25
- ],
18
+ actual = ":pkg" ,
19
+ golden = "index_golden.js_" ,
26
20
)
Original file line number Diff line number Diff line change
1
+ const a = 'THIS_SHOULD_BE_REPLACED' ;
Original file line number Diff line number Diff line change
1
+ const a = 'THIS_SHOULD_BE_REPLACED_WITH_THIS';
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ _ATTRS = {
26
26
doc = """Files which should be copied into the package""" ,
27
27
),
28
28
"substitutions" : attr .string_dict (
29
- doc = """Key-value pairs which are replaced in all the files while building the package.""" ,
29
+ doc = """Key-value pairs are replaced in all files while building the package.""" ,
30
30
),
31
31
"_assembler" : attr .label (
32
32
default = "@build_bazel_rules_nodejs//internal/pkg_web:assembler" ,
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments