Create json config from js file