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

Commit d57c992

Browse files
elf-mouseclarkdo
andauthored
feat: add BalmUI to UI framework (#636)
Co-authored-by: Xin Du (Clark) <[email protected]>
1 parent f031282 commit d57c992

File tree

8 files changed

+114
-13
lines changed

8 files changed

+114
-13
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ yarn create nuxt-app <my-project>
3939
1. UI framework:
4040
- None (feel free to add one later)
4141
- [Ant Design Vue](https://github.com/vueComponent/ant-design-vue)
42+
- [BalmUI](https://material.balmjs.com/)
4243
- [Bootstrap](https://github.com/bootstrap-vue/bootstrap-vue)
4344
- [Buefy](https://buefy.org)
4445
- [Bulma](https://github.com/jgthms/bulma)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"balm-ui": "^8.7.1"
4+
}
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Vue from 'vue'
2+
import BalmUI from 'balm-ui'
3+
import BalmUIPlus from 'balm-ui/dist/balm-ui-plus'
4+
5+
Vue.use(BalmUI)
6+
Vue.use(BalmUIPlus)

Diff for: packages/cna-template/template/nuxt/nuxt.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
'iview/dist/styles/iview.css'
4747
<%_ } else if (ui === 'ant-design-vue') { _%>
4848
'ant-design-vue/dist/antd.css'
49+
<%_ } else if (ui === 'balm-ui') { _%>
50+
'balm-ui/dist/balm-ui.css'
4951
<%_ } else if (ui === 'tachyons') { _%>
5052
'tachyons/css/tachyons.css'
5153
<%_ } else if (ui === 'framevuerk') { _%>
@@ -63,6 +65,8 @@
6365
'@/plugins/iview'
6466
<%_ } else if (ui === 'ant-design-vue') { _%>
6567
'@/plugins/antd-ui'
68+
<%_ } else if (ui === 'balm-ui') { _%>
69+
'@/plugins/balm-ui'
6670
<%_ } else if (ui === 'framevuerk') { _%>
6771
'@/plugins/framevuerk'
6872
<%_ } else if (ui === 'vuesax') { _%>

Diff for: packages/create-nuxt-app/lib/prompts.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = [
3232
choices: [
3333
{ name: 'None', value: 'none' },
3434
{ name: 'Ant Design Vue', value: 'ant-design-vue' },
35+
{ name: 'BalmUI', value: 'balm-ui' },
3536
{ name: 'Bootstrap Vue', value: 'bootstrap' },
3637
{ name: 'Buefy', value: 'buefy' },
3738
{ name: 'Bulma', value: 'bulma' },

Diff for: packages/create-nuxt-app/test/snapshots/index.test.js.md

+89
Original file line numberDiff line numberDiff line change
@@ -2820,6 +2820,95 @@ Generated by [AVA](https://avajs.dev).
28202820
}␊
28212821
`
28222822

2823+
## verify ui: BalmUI
2824+
2825+
> Generated files
2826+
2827+
[
2828+
'.editorconfig',
2829+
'.gitignore',
2830+
'README.md',
2831+
'assets/README.md',
2832+
'components/Logo.vue',
2833+
'components/README.md',
2834+
'layouts/README.md',
2835+
'layouts/default.vue',
2836+
'middleware/README.md',
2837+
'nuxt.config.js',
2838+
'package.json',
2839+
'pages/README.md',
2840+
'pages/index.vue',
2841+
'plugins/README.md',
2842+
'plugins/balm-ui.js',
2843+
'static/README.md',
2844+
'static/favicon.ico',
2845+
'store/README.md',
2846+
]
2847+
2848+
> package.json
2849+
2850+
{
2851+
dependencies: {
2852+
'balm-ui': '^8.7.1',
2853+
'core-js': '^3.6.5',
2854+
nuxt: '^2.14.7',
2855+
},
2856+
devDependencies: {},
2857+
private: true,
2858+
scripts: {
2859+
build: 'nuxt build',
2860+
dev: 'nuxt',
2861+
generate: 'nuxt generate',
2862+
start: 'nuxt start',
2863+
},
2864+
}
2865+
2866+
> Generated nuxt.config.js
2867+
2868+
`export default {␊
2869+
// Global page headers (https://go.nuxtjs.dev/config-head)␊
2870+
head: {␊
2871+
title: 'output',␊
2872+
htmlAttrs, {␊
2873+
lang: 'en'␊
2874+
},␊
2875+
meta: [␊
2876+
{ charset: 'utf-8' },␊
2877+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },␊
2878+
{ hid: 'description', name: 'description', content: '' }␊
2879+
],␊
2880+
link: [␊
2881+
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊
2882+
]␊
2883+
},␊
2884+
2885+
// Global CSS (https://go.nuxtjs.dev/config-css)␊
2886+
css: [␊
2887+
'balm-ui/dist/balm-ui.css'␊
2888+
],␊
2889+
2890+
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)␊
2891+
plugins: [␊
2892+
'@/plugins/balm-ui'␊
2893+
],␊
2894+
2895+
// Auto import components (https://go.nuxtjs.dev/config-components)␊
2896+
components: true,␊
2897+
2898+
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)␊
2899+
buildModules: [␊
2900+
],␊
2901+
2902+
// Modules (https://go.nuxtjs.dev/config-modules)␊
2903+
modules: [␊
2904+
],␊
2905+
2906+
// Build Configuration (https://go.nuxtjs.dev/config-build)␊
2907+
build: {␊
2908+
}␊
2909+
}␊
2910+
`
2911+
28232912
## verify ui: Bootstrap Vue
28242913

28252914
> Generated files
170 Bytes
Binary file not shown.

Diff for: renovate.json

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
{
2-
"extends": [
3-
"@nuxtjs"
4-
],
2+
"extends": ["@nuxtjs"],
53
"lockFileMaintenance": {
64
"enabled": true
75
},
8-
"ignoreDeps": [
9-
"vue-jest"
10-
],
6+
"ignoreDeps": ["vue-jest"],
117
"postUpgradeTasks": {
12-
"commands": [
13-
"ava --verbose --update-snapshots"
14-
],
15-
"fileFilters": [
16-
"**/*.snap",
17-
"**/*.md"
18-
]
8+
"commands": ["ava --verbose --update-snapshots"],
9+
"fileFilters": ["**/*.snap", "**/*.md"]
1910
},
2011
"packageRules": [
2112
{
@@ -34,6 +25,10 @@
3425
"packagePatterns": ["ava"],
3526
"groupName": "ava packages"
3627
},
28+
{
29+
"packagePatterns": ["balm-ui"],
30+
"groupName": "balm-ui packages"
31+
},
3732
{
3833
"packagePatterns": ["bootstrap"],
3934
"groupName": "bootstrap packages"

0 commit comments

Comments
 (0)