aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhkal <[email protected]>2014-05-05 20:45:20 -0400
committerhkal <[email protected]>2014-05-05 20:45:20 -0400
commit78931726a0adb15fca588754e37dff9962a80ea6 (patch)
treeb7b26150a6a3cdb37707730faa7906420d360705
parent74a2fcca7eb3c15da21e13506d283a93e6edaf6a (diff)
downloadfaker-78931726a0adb15fca588754e37dff9962a80ea6.tar.xz
faker-78931726a0adb15fca588754e37dff9962a80ea6.zip
better version handling:
* 'Faker.version' will now be populated by the version property in 'package.json'
-rwxr-xr-xBUILD/BUILD.js4
-rw-r--r--BUILD/main.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/BUILD/BUILD.js b/BUILD/BUILD.js
index dc3063a0..f9787c17 100755
--- a/BUILD/BUILD.js
+++ b/BUILD/BUILD.js
@@ -5,7 +5,7 @@ var sys = require('sys')
, M = require('./Mustache')
, compressor = require('node-minify');
-
+var package = require('../package.json');
var code = '';
var docs = {};
@@ -15,7 +15,7 @@ docs.copyrightYear = new Date().getFullYear();
// read in the the main.js file as our main boilerplate code
code += fs.readFileSync('./main.js', encoding = 'utf8');
-code = M.Mustache.to_html(code, {"today": new Date().getTime()});
+code = M.Mustache.to_html(code, {'today': new Date().getTime(), 'version': package.version});
docs.main += fs.readFileSync('./docs.js', encoding = 'utf8');
diff --git a/BUILD/main.js b/BUILD/main.js
index e7bc6176..e627dbbc 100644
--- a/BUILD/main.js
+++ b/BUILD/main.js
@@ -57,4 +57,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// exported module
var Faker = {};
-Faker.version = "0.5.5";
+Faker.version = "{{version}}";