1.0.15 • Published 5 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/cli
Add this plugin to an existing project
vue add uikit
— Or —
yarn add --dev vue-cli-plugin-uikit
vue invoke uikit
Changes 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
uikit
topackage.json
dependencies - Adds the
UIkit
global topackage.json
eslint globals include
s UIKit (and optionally UIKit Icons) insrc/main.js
- Adds
src/assets/styles/styles.scss
andinclude
s that insrc/main.js
- Sets the global
window.UIkit
insrc/main.js
to 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?