-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
55 lines (51 loc) · 1.08 KB
/
BUILD.bazel
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
49
50
51
52
53
54
55
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "npm_package_bin")
load("@npm//nuxt:index.bzl", "nuxt")
filegroup(
name = "nuxt-srcs",
srcs =
["nuxt.config.js"] +
glob(
[
"assets/**",
"components/**/*.vue",
"layouts/*.vue",
"middleware/*.js",
"pages/**/*.vue",
"plugins/*.js",
"static/*",
"store/*.js",
],
# specifically exclude test files
exclude = [
],
),
)
filegroup(
name = "package_json",
srcs = ["package.json"],
)
# Build nuxt.js for production
nuxt(
name = ".nuxt",
args = [
"generate",
"--buildDir=$@",
],
data = [
":nuxt-srcs",
":package_json",
"@npm//:node_modules",
],
output_dir = True,
)
## run in production mode the generated directory
nuxt(
name = "nuxt_start",
args = [
"start",
],
data = [
":.nuxt",
"@npm//:node_modules",
],
)