From a281ec42e26f1d6fb24f08ee6448a1cf1d082bfd Mon Sep 17 00:00:00 2001 From: evansiroky Date: Sat, 1 Sep 2018 10:39:49 -0700 Subject: [PATCH 1/2] fix(lint): add new error rule for sorting flowtype definitions --- lib/eslintrc.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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": { From 3dedc35ccbc16335c0ab3b975ea53c4df9e68dcb Mon Sep 17 00:00:00 2001 From: evansiroky Date: Tue, 4 Sep 2018 13:44:28 -0700 Subject: [PATCH 2/2] feat(build): add some useful environment variables --- lib/js-transform.js | 5 +++++ 1 file changed, 5 insertions(+) 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) },