Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "featurama", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Enable/Disable features via JS config files.", | ||
@@ -5,0 +5,0 @@ "main": "src/featurama.js", |
@@ -144,10 +144,10 @@ 'use strict'; | ||
/** | ||
* Wrap the flags in either a variable declaration or module | ||
* Wrap the flags in either a variable declaration or module | ||
* | ||
* @param {String} flags - The list of flags to save to file | ||
* @param {String} type - The type of output ['var', 'ES6'] | ||
* @param {String} flags - The list of flags to save to file | ||
* @param {String} type - The type of output ['var', 'ES6'] | ||
*/ | ||
function flagWrapper(flags, type) { | ||
if (type.toLowerCase() === 'es6') { | ||
return `const featuramaRunTimeFlags = ${flags}\n\nexport {featuramaRunTimeFlags};`; | ||
function flagWrapper(flags, outputType) { | ||
if (outputType.toLowerCase() === 'es6') { | ||
return `export default ${flags}`; | ||
} else { | ||
@@ -158,2 +158,8 @@ return `var featuramaRunTimeFlags = ${flags}`; | ||
/** | ||
* Create the file to load client side that will determine the on/off state of featuresPath | ||
* | ||
* @param {String} outputFolder The location to store the feature flag file | ||
* @param {String} outputType - The type of output ['var', 'ES6'] | ||
*/ | ||
function buildRunTimeConfigFile(outputFolder, outputType) { | ||
@@ -160,0 +166,0 @@ const files = _getFeatureFiles(); |
5867
257098
67