Skip to content

barraponto/neutrino-preset-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neutrino Vue preset

Greenkeeper badge NPM version NPM downloads Join Slack

neutrino-preset-vue is a Neutrino preset that adds basic support for Vue components.

Documentation

Install this preset to your development dependencies, then set it in .neutrinorc.js. It should go after neutrino-preset-web, though it just needs something to give it an entry point.

  module.exports = {
    use: [
      "neutrino-preset-web",
      "neutrino-preset-vue"
    ],
    ...
  };

If you're using neutrino-preset-lint or any preset based on it, this preset will add eslint plugin and rules for Vue components.

If you're using neutrino-preset-stylelint or any preset based on it, this preset will add support for <style> tags in Vue components.

Just ensure the linter presets are loaded before this one.

Support Object spread syntax

Vuex makes heavy use of object rest/spread, which is still a stage 3 ECMAScript proposal. If you want to use it, you have to add the babel plugin for it. Neutrino Web Preset users can just add it to that preset through an option in .neutrinorc.js.

  module.exports = {
    use: [
      ["neutrino-preset-web", {
        babel: {
          plugins: [require.resolve('babel-plugin-transform-object-rest-spread')]
       }
      }],
      "neutrino-preset-vue"
    ],
    ...
  };