Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit

Permalink
feat: add BalmUI to UI framework (#636)
Browse files Browse the repository at this point in the history
Co-authored-by: Xin Du (Clark) <[email protected]>
  • Loading branch information
elf-mouse and clarkdo authored Nov 25, 2020
1 parent f031282 commit d57c992
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ yarn create nuxt-app <my-project>
1. UI framework:
- None (feel free to add one later)
- [Ant Design Vue](https://github.com/vueComponent/ant-design-vue)
- [BalmUI](https://material.balmjs.com/)
- [Bootstrap](https://github.com/bootstrap-vue/bootstrap-vue)
- [Buefy](https://buefy.org)
- [Bulma](https://github.com/jgthms/bulma)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"balm-ui": "^8.7.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Vue from 'vue'
import BalmUI from 'balm-ui'
import BalmUIPlus from 'balm-ui/dist/balm-ui-plus'

Vue.use(BalmUI)
Vue.use(BalmUIPlus)
4 changes: 4 additions & 0 deletions packages/cna-template/template/nuxt/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
'iview/dist/styles/iview.css'
<%_ } else if (ui === 'ant-design-vue') { _%>
'ant-design-vue/dist/antd.css'
<%_ } else if (ui === 'balm-ui') { _%>
'balm-ui/dist/balm-ui.css'
<%_ } else if (ui === 'tachyons') { _%>
'tachyons/css/tachyons.css'
<%_ } else if (ui === 'framevuerk') { _%>
Expand All @@ -63,6 +65,8 @@
'@/plugins/iview'
<%_ } else if (ui === 'ant-design-vue') { _%>
'@/plugins/antd-ui'
<%_ } else if (ui === 'balm-ui') { _%>
'@/plugins/balm-ui'
<%_ } else if (ui === 'framevuerk') { _%>
'@/plugins/framevuerk'
<%_ } else if (ui === 'vuesax') { _%>
Expand Down
1 change: 1 addition & 0 deletions packages/create-nuxt-app/lib/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = [
choices: [
{ name: 'None', value: 'none' },
{ name: 'Ant Design Vue', value: 'ant-design-vue' },
{ name: 'BalmUI', value: 'balm-ui' },
{ name: 'Bootstrap Vue', value: 'bootstrap' },
{ name: 'Buefy', value: 'buefy' },
{ name: 'Bulma', value: 'bulma' },
Expand Down
89 changes: 89 additions & 0 deletions packages/create-nuxt-app/test/snapshots/index.test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -2820,6 +2820,95 @@ Generated by [AVA](https://avajs.dev).
}␊
`

## verify ui: BalmUI

> Generated files
[
'.editorconfig',
'.gitignore',
'README.md',
'assets/README.md',
'components/Logo.vue',
'components/README.md',
'layouts/README.md',
'layouts/default.vue',
'middleware/README.md',
'nuxt.config.js',
'package.json',
'pages/README.md',
'pages/index.vue',
'plugins/README.md',
'plugins/balm-ui.js',
'static/README.md',
'static/favicon.ico',
'store/README.md',
]

> package.json
{
dependencies: {
'balm-ui': '^8.7.1',
'core-js': '^3.6.5',
nuxt: '^2.14.7',
},
devDependencies: {},
private: true,
scripts: {
build: 'nuxt build',
dev: 'nuxt',
generate: 'nuxt generate',
start: 'nuxt start',
},
}

> Generated nuxt.config.js
`export default {␊
// Global page headers (https://go.nuxtjs.dev/config-head)␊
head: {␊
title: 'output',␊
htmlAttrs, {␊
lang: 'en'␊
},␊
meta: [␊
{ charset: 'utf-8' },␊
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },␊
{ hid: 'description', name: 'description', content: '' }␊
],␊
link: [␊
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊
]␊
},␊
// Global CSS (https://go.nuxtjs.dev/config-css)␊
css: [␊
'balm-ui/dist/balm-ui.css'␊
],␊
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)␊
plugins: [␊
'@/plugins/balm-ui'␊
],␊
// Auto import components (https://go.nuxtjs.dev/config-components)␊
components: true,␊
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)␊
buildModules: [␊
],␊
// Modules (https://go.nuxtjs.dev/config-modules)␊
modules: [␊
],␊
// Build Configuration (https://go.nuxtjs.dev/config-build)␊
build: {␊
}␊
}␊
`

## verify ui: Bootstrap Vue

> Generated files
Expand Down
Binary file modified packages/create-nuxt-app/test/snapshots/index.test.js.snap
Binary file not shown.
21 changes: 8 additions & 13 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
{
"extends": [
"@nuxtjs"
],
"extends": ["@nuxtjs"],
"lockFileMaintenance": {
"enabled": true
},
"ignoreDeps": [
"vue-jest"
],
"ignoreDeps": ["vue-jest"],
"postUpgradeTasks": {
"commands": [
"ava --verbose --update-snapshots"
],
"fileFilters": [
"**/*.snap",
"**/*.md"
]
"commands": ["ava --verbose --update-snapshots"],
"fileFilters": ["**/*.snap", "**/*.md"]
},
"packageRules": [
{
Expand All @@ -34,6 +25,10 @@
"packagePatterns": ["ava"],
"groupName": "ava packages"
},
{
"packagePatterns": ["balm-ui"],
"groupName": "balm-ui packages"
},
{
"packagePatterns": ["bootstrap"],
"groupName": "bootstrap packages"
Expand Down

0 comments on commit d57c992

Please sign in to comment.