From cd59085d27304a3d47158e7453b917bd1b526073 Mon Sep 17 00:00:00 2001 From: Nick Cappadona Date: Wed, 21 Mar 2018 17:02:00 -0400 Subject: [PATCH] Upgrade to production Nuxt release (1.4.0) (#71) * Jump to node 9.8.0 Use .nvmrc to indicate desired version for now. The `engines` object is pretty much useless to anything outside of Heroku since it doesn't enforce a strict requirement. Investigated using the node package [1] to install a specific version of the node binary as a requirement, but there's controversy over bloat factor [2, 3] and it is not yet fully compatible with yarn [4]. [1] https://www.npmjs.com/package/node [2] https://twitter.com/housecor/status/962347301456015360 [3] https://twitter.com/maybekatz/status/958157474397171712 [4] https://github.com/aredridel/node-bin-gen/issues/44 * Bump to node-sass 4.7.2 Node 9.8.0 was not happy with previous version lock (4.5.3). * Upgrade to Nuxt 1.4.0 Previously running pre-production release. Includes following adjustments: * Tweak Nuxt config for eslint (passing context) * Swap in `eslint-plugin-vue` for `eslint-plugin-html` & use it along with standard for base rules * Fix alias for components to align with Nuxt 1.x [1] * Export state as function for Vuex store, since using modules mode [2] [1] https://nuxtjs.org/guide/directory-structure#aliases [2] https://nuxtjs.org/guide/vuex-store#modules-mode * Replace nuxt-helpers/axios with axios module As indicated in initial implementation of fetching data back in 42d0f7e. Nuxt modules have come a long way in the past year. Basically follow the documentation [1] to swap out the helper for the module. The module makes axios widely available across the app: * plugins * vuex store * pages * middleware * other modules But notice this does not include external utility files, which is a necessity here for `utils/libcal.js`. The workaround was to pass `this.$axios` from the store to the util as a param. Not sure this will be the longterm solution since there are ongoing discussions in the module repo on potential options on better sharing the configured axios instance with external files. [1] https://axios.nuxtjs.org * Drop add package Never used. Mistakenly introduced in ca06ecd as part of #20. * Upgrade packages to latest And satisfy unmet peer dependencies. * Bump app version to 0.2.0 --- .eslintrc.js | 14 +- .gitignore | 3 - .nvmrc | 1 + components/oku-circ.vue | 6 +- nuxt.config.js | 15 +- package.json | 27 +- pages/oku/_location.vue | 2 +- store/consultDesk.js | 8 +- store/laptops.js | 7 +- store/phoneChargers.js | 7 +- utils/libcal.js | 17 +- yarn.lock | 4628 ++++++++++++++++++++++++++++----------- 12 files changed, 3439 insertions(+), 1296 deletions(-) create mode 100644 .nvmrc diff --git a/.eslintrc.js b/.eslintrc.js index b44e099..fe3b8b7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,16 +1,22 @@ module.exports = { root: true, - parser: 'babel-eslint', env: { browser: true, node: true }, - extends: 'standard', + parserOptions: { + parser: 'babel-eslint' + }, + extends: [ + 'standard', + // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention + // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. + 'plugin:vue/essential' + ], // required to lint *.vue files plugins: [ - 'html' + 'vue' ], // add your custom rules here rules: {}, - globals: {} } diff --git a/.gitignore b/.gitignore index aef900e..7ee6115 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,3 @@ npm-debug.log # Nuxt generate dist - -# Nuxt helpers -.nuxt-helpers diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..834eb3f --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +9.8.0 diff --git a/components/oku-circ.vue b/components/oku-circ.vue index 98c67c5..d99dc8e 100644 --- a/components/oku-circ.vue +++ b/components/oku-circ.vue @@ -21,13 +21,13 @@ - + -