From 1dfe1b37df6de9d4dfc4daf67358d494898fde35 Mon Sep 17 00:00:00 2001 From: Walker Leite Date: Wed, 16 May 2018 11:03:42 -0300 Subject: [PATCH] feat(styleguide): add global file and enable vue devtools --- template/package.json | 1 + template/styleguide.config.js | 6 +++++- template/styleguide.global.js | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 template/styleguide.global.js diff --git a/template/package.json b/template/package.json index 620f9c0..02df7f1 100644 --- a/template/package.json +++ b/template/package.json @@ -40,6 +40,7 @@ "poi": "^9.5.2", "poi-preset-karma": "^9.2.1", "typescript": "^2.6.1", + "vue": "^2.5.16", "vue-styleguidist": "^1.4.4", "vue-webpack-loaders": "^1.0.6", "webpack": "^3.1.0" diff --git a/template/styleguide.config.js b/template/styleguide.config.js index 2679086..c692705 100644 --- a/template/styleguide.config.js +++ b/template/styleguide.config.js @@ -1,6 +1,7 @@ const loaders = require('vue-webpack-loaders'); const glob = require('glob').sync; const basename = require('path').basename; +const join = require('path').join; function getDocSections() { b = p => basename(p, '.md'); @@ -33,5 +34,8 @@ module.exports = { }, devtool: 'inline-source-map' }, - serverPort: 6062 + serverPort: 6062, + require: [ + join(__dirname, 'styleguide.global.js'), + ] }; diff --git a/template/styleguide.global.js b/template/styleguide.global.js new file mode 100644 index 0000000..739d448 --- /dev/null +++ b/template/styleguide.global.js @@ -0,0 +1,5 @@ +const Vue = require('vue'); + +module.exports = function() { + Vue.config.devtools = true; +}