Skip to content
This repository was archived by the owner on Feb 13, 2020. It is now read-only.

Commit 4a1a592

Browse files
committed
Added 'addWatch' option to top up the Default watch list.
BUG: Fixed missing 'version' property from schema that prevented --version command line option
1 parent 0ebb9e3 commit 4a1a592

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.stlive.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Schema version. Required to detect out of date .stlive.json files.
33
"_schema": "2.0",
44

5-
// ALL the properties in this file can be used as 'stlive' command line options
6-
// Example: --run will set options.run = true)
5+
// ALL the properties in this file can be used as 'stlive' command line options
6+
// Example: --run will set options.run = true)
77

88
// ** `stlive create` AND `stlive build` OPTIONS **
99

@@ -161,12 +161,15 @@
161161
]
162162
},
163163

164+
// Array of additional file patterns added to the default watch list by projects.
165+
addWatch: null,
166+
164167
// ** Development options **
165168
"logLevel": 2, // 1=DEBUG, 2=INFO, 3=WARN, 4=ERROR, 5=CRITICAL
166169

167170
// WARNING: stlive create: Kills Android 'adb' and deletes existing project if it exists
168171
"deleteAppDir": false,
169-
170-
// Allows use of --version
171-
"version": false
172+
173+
// Allows use of --version
174+
"version": false
172175
}

lib/serve.js

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ function addServerOptions(options) {
3232
return;
3333
}
3434

35+
// Add project specific watch list
36+
if (Array.isArray(options.addWatch)) {
37+
options.watches = options.watches.concat(options.addWatch);
38+
}
39+
3540
// PhoneGap/Cordova platforms configured
3641
var platformsDir = path.join(dirs.pgDir, 'platforms');
3742
fs.readdirSync(platformsDir).forEach(function(platform) {

0 commit comments

Comments
 (0)