diff --git a/package.json b/package.json index ea986bc..e5c0527 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "assets-loader": "^0.5.2", "connect-history-api-fallback": "^1.5.0", "element-ui": "^2.4.7", "gsap": "^2.0.2", @@ -31,6 +30,7 @@ "@vue/cli-plugin-pwa": "^3.0.3", "@vue/cli-service": "^3.0.3", "@vue/eslint-config-standard": "^3.0.3", + "assets-loader": "^0.5.2", "favicons-webpack-plugin": "0.0.9", "node-sass": "^4.9.3", "pug": "^2.0.3", diff --git a/src/components/core/Loader.vue b/src/components/core/Loader.vue new file mode 100644 index 0000000..84e26cc --- /dev/null +++ b/src/components/core/Loader.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/store/index.js b/src/store/index.js index e333eca..a06af59 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -5,12 +5,14 @@ import Vue from 'vue' import Vuex from 'vuex' -import modules from './modules' +import global from './modules/global' Vue.use(Vuex) const store = new Vuex.Store({ - modules + modules: { + global + } }) export default store diff --git a/src/store/modules/global.js b/src/store/modules/global.js index 94daffb..9c23b2c 100644 --- a/src/store/modules/global.js +++ b/src/store/modules/global.js @@ -4,18 +4,18 @@ const state = { loaded: false } -const getters = { - isLoaded: state => { - return state.loaded - } -} - const mutations = { [types.SET_LOADING] (state, loadedState) { state.loaded = loadedState } } +const getters = { + isLoaded: state => { + return state.loaded + } +} + export default { state, getters, diff --git a/src/store/modules/index.js b/src/store/modules/index.js deleted file mode 100644 index 08e5b1a..0000000 --- a/src/store/modules/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Register each file as a corresponding Vuex module. Module nesting - * will mirror [sub-]directory hierarchy and modules are namespaced - * as the camelCase equivalent of their file name. - * - * Credits: https://github.com/chrisvfritz/vue-enterprise-boilerplate - * - */ - -import camelCase from 'lodash/camelCase' - -const requireModule = require.context('.', true, /^((?!\.unit\.).)*\.js$/) -const root = { modules: {} } - -requireModule.keys().forEach(fileName => { - if (fileName === './index.js') return - - const modulePath = fileName - .replace(/^\.\//, '') - .replace(/\.\w+$/, '') - .split(/\//) - .map(camelCase) - - const { modules } = getNamespace(root, modulePath) - - modules[modulePath.pop()] = { - namespaced: true, - ...requireModule(fileName) - } - - function getNamespace(subtree, path) { - if (path.length === 1) return subtree - - const namespace = path.shift() - subtree.modules[namespace] = { modules: {}, ...subtree.modules[namespace] } - return getNamespace(subtree.modules[namespace], path) - } -}) - -export default root.modules