Browse Source

Build correctly when no modules

rfm69
Xose Pérez 6 years ago
parent
commit
894e19124d
2 changed files with 10 additions and 11 deletions
  1. +3
    -4
      code/extra_scripts.py
  2. +7
    -7
      code/gulpfile.js

+ 3
- 4
code/extra_scripts.py View File

@ -61,10 +61,9 @@ def check_size(source, target, env):
def build_webui(source, target, env):
config = util.load_project_config()
try:
os.environ['MODULES'] = config.get("env:" + env.get('PIOENV'), "modules")
except:
None
kv = dict(config.items("env:" + env.get('PIOENV')))
if 'modules' in kv:
os.environ['MODULES'] = kv["modules"]
call(["gulp"])
# ------------------------------------------------------------------------------


+ 7
- 7
code/gulpfile.js View File

@ -113,20 +113,20 @@ gulp.task('buildfs_inline', function() {
light: false,
rfbridge: false
};
var modules = process.env.MODULES || false;
if (modules) {
var modules = 'MODULES' in process.env ? process.env.MODULES : false;
if (false === modules) {
for (var i in remover_config) {
remover_config[i] = true;
}
} else {
var list = modules.split(' ');
for (var i in list) {
if (list[i] != "") {
remover_config[list[i]] = true;
}
}
} else {
for (var i in remover_config) {
remover_config[i] = true;
}
}
log.info("[WEBUI] " + JSON.stringify(remover_config));
log.info("Modules: " + JSON.stringify(remover_config));
return gulp.src('html/*.html').
pipe(htmllint({


Loading…
Cancel
Save