Skip to content

Commit

Permalink
code linted
Browse files Browse the repository at this point in the history
  • Loading branch information
gbezyuk committed Dec 12, 2016
1 parent 26dab89 commit 85929af
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build/dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ module.exports = function setupDevServer (app, onUpdate) {
stats.warnings.forEach(err => console.warn(err))
onUpdate(mfs.readFileSync(outputPath, 'utf-8'))
})
}
}
2 changes: 1 addition & 1 deletion build/vue-loader.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
module.exports = {
}
}
12 changes: 6 additions & 6 deletions build/webpack.base.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
const projectRoot = path.resolve(__dirname, '../')
// const projectRoot = path.resolve(__dirname, '../')
const vueConfig = require('./vue-loader.config')

module.exports = {
Expand All @@ -9,7 +9,7 @@ module.exports = {
vendor: ['vue', 'vue-router', 'vuex', 'vuex-router-sync', 'axios']
},
resolve: {
modules: [path.resolve(__dirname, "src"), "node_modules"],
modules: [path.resolve(__dirname, 'src'), 'node_modules'],
extensions: ['.js', '.vue'],
alias: {
'src': path.resolve(__dirname, '../src'),
Expand All @@ -27,15 +27,15 @@ module.exports = {
module: {
rules: [
{
enforce: "pre",
enforce: 'pre',
test: /\.js$/,
loader: "eslint-loader",
loader: 'eslint-loader',
exclude: /node_modules/
},
{
enforce: "pre",
enforce: 'pre',
test: /\.vue$/,
loader: "eslint-loader",
loader: 'eslint-loader',
exclude: /node_modules/
},
{
Expand Down
4 changes: 2 additions & 2 deletions build/webpack.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if (process.env.NODE_ENV === 'production') {

vueConfig.loaders = {
css: ExtractTextPlugin.extract({
loader: "css-loader",
fallbackLoader: "vue-style-loader"
loader: 'css-loader',
fallbackLoader: 'vue-style-loader'
})
}

Expand Down
2 changes: 2 additions & 0 deletions src/components/Topics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { mapGetters } from 'vuex'
const fetchInitialData = store => {
return store.dispatch(`getTopics`)
}
export default {
prefetch: fetchInitialData,
computed: {
Expand All @@ -20,6 +21,7 @@ export default {
})
},
mounted () {
// TODO: skip in browser on the first render if already fetched during SSR
fetchInitialData(this.$store)
}
}
Expand Down

0 comments on commit 85929af

Please sign in to comment.