Skip to content

Instantly share code, notes, and snippets.

@darrenmothersele
Created February 21, 2020 10:13
Show Gist options
  • Save darrenmothersele/09fb17ab4dcb157819b1424411b23381 to your computer and use it in GitHub Desktop.
Save darrenmothersele/09fb17ab4dcb157819b1424411b23381 to your computer and use it in GitHub Desktop.
Setup for a Vue CLI project

1. Create project

npm install -g @vue/cli
vue create project-name

Manually select features:

  • Babel
  • Router
  • Vuex
  • Linter / Formatter
  • Unit Testing

Use history mode for router? Y

  • ESLint with error prevention only
  • Lint on save

Pick a unit testing solution:

  • Jest

Where do you prefer placing config for Babel, ESLint, etc?

  • In dedicated config files

Save this as a preset for future projects? N

2. Add packages

cd project-name
vue add tailwind
npm install --save-dev autoprefixer @tailwindcss/custom-forms
npm install --save vuelidate firebase

3. Config postcss.config.js

module.exports = {
  plugins: {
    tailwindcss: {},
    'vue-cli-plugin-tailwind/purgecss': {},
    autoprefixer: {},
  }
};

4. Configure tailwind.config.js

plugins: [
  require('@tailwindcss/custom-forms'),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment