I am developing an app using node-webkit and for testing i use
https://github.com/mllrsohn/grunt-node-webkit-builder
However, it requires the presence of an environment variable named NODEWEBKIT_BIN
.
Since i want my project to be runnable for anyone, i would like to set this environment variable temporarily, for the duration of the testing/building phase.
package.json
but it is not (and it is also not recommended). karma set environment variable
but that yields nothing useful as well.Basically, is this even possible? Or should i just demand that anyone cloning my project sets this environment variable?
[edit] i am currently looking into setting process.env.NODEWEBKIT_BIN
directly inside the karma.conf.js file on the first line, it looks like it might just work.
Awesome, this works, for anyone wondering:
// temp set environment variable for node-webkit
process.env.NODEWEBKIT_BIN = '/Applications/node-webkit.app/Contents/MacOS/node-webkit';
module.exports = function(config){
config.set({
basePath : './',
files : [
...
'App/scripts/tests/**/*.js'
...
],
frameworks: ['jasmine'],
browsers : ['NodeWebkit'],
singleRun: true
});
};