1.0.15 • Published 7 years ago
vue-cli-plugin-uikit v1.0.15
vue-cli-plugin-uikit
A vue-cli plugin to add UIKit to a Vue project.
Requires @vue/cli
Make sure @vue/cli is installed globally
yarn global add @vue/cliAdd this plugin to an existing project
vue add uikit— Or —
yarn add --dev vue-cli-plugin-uikit
vue invoke uikitChanges to your project made by this plugin
When installing any vue-cli plugin, you should first commit any other changes you’ve made to your project, so you can diff this plugin’s changes.
This plugin makes the following changes to your project, which you can review in /generator:
- Adds
uikittopackage.jsondependencies - Adds the
UIkitglobal topackage.jsoneslint globals includes UIKit (and optionally UIKit Icons) insrc/main.js- Adds
src/assets/styles/styles.scssandincludes that insrc/main.js - Sets the global
window.UIkitinsrc/main.jsto allow UIKit’s JavaScript components to be used globally
Customize styles.scss
This plugin creates src/assets/styles/styles.scss which @includes the UIKit sass styles in the right order. You can customize the styles / theme according to the UIKit documentation, or switch the src/main.js include to include the less styles or rendered css styles as you wish.
TODO:
- Prompt for desired style language (scss, less, css)
- Detect if eslint is enabled before adding global
- Detect if separate config files are used and make changes appropriately?