INNER CODE UNIT · JavaScript

addons

madlabsinc/mevn-cli · src/commands/add/index.js:205

    const addons = installCandidate.filter((dep) => nuxtAddons.includes(dep));

    // Configure vuex-store for Nuxt.js template
    const configureNuxtVuexStore = () => {
      const vuexNuxtStoreTemplate = [
        'export const state = () => ({',
        '  counter: 0,',
        '})',
        '',
        'export const mutations = {',
        '  increment (state) {',
        '\tstate.counter++',
        '  },',
        '}',
      ];

      // Navigate to the store directory and create a basic store template file
      const storeFilePath = path.join('client', 'store', 'index.js');

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…