var fs = require('fs');

function getVersion() {
  var packageContents = fs.readFileSync('./package.json', 'utf8');
  var packageJson = JSON.parse(packageContents);
  return packageJson.version;
}

function getStringToInput() {
  let version = getVersion();
  return `
  window.tripleOUiConfig = window.tripleOUiConfig || {};
  window.tripleOUiConfig.version = '${version}';
  `;
}

module.exports = function(content) {
  content = content + getStringToInput();
  return content;
};

'use strict';

var fs = require('fs');

function getVersion() {
  var packageContents = fs.readFileSync('./package.json', 'utf8');
  var packageJson = JSON.parse(packageContents);
  return packageJson.version;
}

function getStringToInput() {
  let version = getVersion();
  return `
  window.tripleOUiConfig = window.tripleOUiConfig || {};
  window.tripleOUiConfig.version = '${version}';
  `;
}

module.exports = function(content) {
  content = content + getStringToInput();
  return content;
};

Fix Error on Version loader
Fix Error on Version loader

Closes-Bug: 1613719
Change-Id: If68fb2a1d1229d0920dcff540bea63f63652aa36
