From 9871a4b11dad7ad820c251c20d4d7a6f46373890 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Wed, 20 Sep 2017 11:01:47 -0700 Subject: [PATCH] Feat: add translations to default build source paths (#48) * feat: add translations path to build included by default, to better match what's in the elastic products and even the plugin template also add a translations path to the mock plugin for tests * chore: add script to run tests with linting --- lib/plugin_config.js | 2 +- package.json | 1 + tasks/build/__fixtures__/test_plugin/translations/es.json | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tasks/build/__fixtures__/test_plugin/translations/es.json diff --git a/lib/plugin_config.js b/lib/plugin_config.js index bf44c73..d2afa5c 100644 --- a/lib/plugin_config.js +++ b/lib/plugin_config.js @@ -11,7 +11,7 @@ module.exports = function (root) { const buildSourcePatterns = [ 'package.json', 'index.js', - '{lib,public,server,webpackShims}/**/*', + '{lib,public,server,webpackShims,translations}/**/*', ]; // add shrinkwrap and lock files, if they exist diff --git a/package.json b/package.json index 4d9fc8e..f1d542f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "license": "Apache-2.0", "scripts": { "test": "npm run lint && npm run jest", + "test:only": "npm run jest", "jest": "jest", "lint": "eslint bin/ help/ tasks/" }, diff --git a/tasks/build/__fixtures__/test_plugin/translations/es.json b/tasks/build/__fixtures__/test_plugin/translations/es.json new file mode 100644 index 0000000..2f0e09a --- /dev/null +++ b/tasks/build/__fixtures__/test_plugin/translations/es.json @@ -0,0 +1,4 @@ +{ + "UI-WELCOME_MESSAGE": "Cargando Kibana", + "UI-WELCOME_ERROR": "Kibana no se cargó correctamente. Heck la salida del servidor para obtener más información." +} \ No newline at end of file