- theming support added
- not caching fake input color as private var because it doesn't work with themes
This commit is contained in:
parent
8469c688d1
commit
6574b8465a
7 changed files with 31 additions and 10 deletions
|
|
@ -11,6 +11,7 @@ var argv = require('yargs')
|
|||
'l':{alias:'load',type:'string',describe:'session file to load'},
|
||||
'p':{alias:'port',describe:'osc input port (for synchronization)'},
|
||||
'n':{alias:'nogui',describe:'disable default gui and makes the app availabe through http on specified port'},
|
||||
't':{alias:'theme',type:'string',describe:'theme name or file'}
|
||||
})
|
||||
.check(function(a,x){if(a.port==undefined || !isNaN(a.p)&&a.p>1023&&parseInt(a.p)===a.p){return true}else{throw 'Error: Port must be an integer >= 1024'}})
|
||||
.check(function(a,x){if(a.n==undefined || !isNaN(a.n)&&a.n>1023&&parseInt(a.n)===a.n){return true}else{throw 'Error: Port must be an integer >= 1024'}})
|
||||
|
|
@ -28,10 +29,18 @@ module.exports = function(fs) {
|
|||
appName: 'Open Stage Control',
|
||||
syncTargets: argv.s || false,
|
||||
oscInPort: argv.p || false,
|
||||
compileScss: argv.c!==undefined || false,
|
||||
lightTheme: argv.c && argv.c.match(/light/),
|
||||
sessionFile: argv.l || false,
|
||||
noGui: argv.n || false,
|
||||
theme: function(){
|
||||
if (!argv.t) return
|
||||
try {return fs.readFileSync(__dirname + '/themes/' + argv.t + '.css','utf-8')}
|
||||
catch(err) {
|
||||
try {return fs.readFileSync(argv.t,'utf-8')}
|
||||
catch(err) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
return {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue