forked from patternfly/patternfly-elements
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspandx.config.js
More file actions
31 lines (29 loc) · 910 Bytes
/
Copy pathspandx.config.js
File metadata and controls
31 lines (29 loc) · 910 Bytes
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
// If we have a .env file respect the LOCALHOST setting
// If not default to localhost
require("dotenv").config();
// Check the command input for any component names, filter those out
const COMPONENTS = process.argv.filter(input => input.startsWith("pfe-"));
module.exports = {
host: process.env.LOCALHOST || "localhost",
port: "auto",
open: true,
// If only 1 component is listed, open that demo page specifically, otherwise, show the listing
startPath: COMPONENTS.length === 1 ? `/elements/${COMPONENTS[0]}/demo` : "/examples",
verbose: false,
routes: {
"/elements": "./elements",
"/examples": "./examples",
"/favicon.ico": "./favicon.ico",
"/": "./",
"/webassets": {
host: "https://access.redhat.com"
}
},
bs: {
watchOptions: {
ignoreInitial: true,
ignored: ["node_modules", "_temp"]
},
middleware: [require("compression")()]
}
};