diff --git a/lib/eslintrc.json b/lib/eslintrc.json index f97bc50..c68471e 100644 --- a/lib/eslintrc.json +++ b/lib/eslintrc.json @@ -24,7 +24,14 @@ "prefer-const": ["warn", { "destructuring": "all", "ignoreReadBeforeAssign": false - }] + }], + "flowtype/sort-keys": [ + "error", + "asc", { + "caseSensitive": true, + "natural": false + } + ] }, "settings": { "flowtype": { diff --git a/lib/js-transform.js b/lib/js-transform.js index e288bd1..a47bfee 100644 --- a/lib/js-transform.js +++ b/lib/js-transform.js @@ -1,6 +1,8 @@ const babelify = require('babelify') const envify = require('envify/custom') const markdown = require('browserify-markdown') +const pkg = require('../lib/pkg') +const commit = require('this-commit')() const through = require('through2') const YAML = require('yamljs') @@ -11,9 +13,12 @@ module.exports = function transform ({ config, env }) { {}, process.env, { + BUILD_TIMESTAMP: (new Date()).getTime(), + COMMIT_SHA: commit, CONFIG_PATH: config.path, MESSAGES: JSON.stringify(config.messages), NODE_ENV: env, + REPO_URL: pkg.repository && pkg.repository.url && pkg.repository.url.replace('.git', ''), SETTINGS: JSON.stringify(config.settings), STORE: JSON.stringify(config.store) },