Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(*): fix deps and build process #434

Merged
merged 2 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions docs/components/card-catalog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Card Catalog

:::tip Note
The `KCardCatalog` component requires the [`@vue/composition-api`](https://github.com/vuejs/composition-api) package as a `peerDependency`. You must **manually** add the package to your host project by running the following

``` shell
yarn add @vue/composition-api
```

:::

**KCardCatalog** - A grid view of KCards

<KCardCatalog :items="getItems(5)" />
Expand Down Expand Up @@ -88,7 +97,7 @@ See [the State section](#loading) about `isLoading`
### fetcher

Use a custom fetcher function to fetch card catalog items and leverage server-side pagination.
::: tip Note:
::: tip Note
All fetcher functions should take a single param. This parameter is a JSON
object supporting the following properties:

Expand All @@ -97,7 +106,7 @@ object supporting the following properties:
- `pageSize`: the number of items to display per page
:::

::: tip Note:
::: tip Note
All fetcher functions should return a JSON object. This JSON object should contain the following properties:

- `total` - the total count of catalog items (if using pagination)
Expand Down Expand Up @@ -175,7 +184,7 @@ Set this to `true` to limit pagination navigation to `previous` / `next` page on
```vue
<template>
<KCardCatalog
:fetcher="fetcher"
:fetcher="fetcher"
:disablePaginationPageJump="true" />
</template>
```
Expand Down
17 changes: 13 additions & 4 deletions docs/components/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ pageClass: table-docs
---
# Table

:::tip Note
The `KTable` component requires the [`@vue/composition-api`](https://github.com/vuejs/composition-api) package as a `peerDependency`. You must **manually** add the package to your host project by running the following

``` shell
yarn add @vue/composition-api
```

:::

Pass a fetcher function to build a slot-able table.

```vue
Expand Down Expand Up @@ -93,7 +102,7 @@ This functionality may be flaky.

Use a custom fetcher function to fetch table data and leverage server-side search, sort and pagination.

::: tip Note:
::: tip Note
All fetcher functions should take a single param. This parameter is a JSON
object supporting the following properties:

Expand All @@ -107,7 +116,7 @@ object supporting the following properties:
- `query`: a text string to filter table data on
:::

::: tip Note:
::: tip Note
All fetcher functions should return a JSON object. This JSON object should contain the following properties:

- `total` - the total count of items (if using pagination)
Expand Down Expand Up @@ -211,8 +220,8 @@ object these features should be explicitly disabled.
}
}"
:headers="[
{ label: 'Title', key: 'title', sortable: true },
{ label: 'Description', key: 'description', sortable: true },
{ label: 'Name', key: 'name', sortable: true },
{ label: 'Id', key: 'id', sortable: true },
{ label: 'Enabled', key: 'enabled', sortable: false }
]"
disablePagination
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
"scripts": {
"build": "yarn build:styles && yarn build:utils && yarn docs:build && yarn build:cli",
"build:postcss": "postcss packages/styles/styles.css --dir packages/styles",
"build:cli": "lerna exec --ignore @kongponents/styles --ignore @kongponents/utils \"ln -f ../../vue.config.js ./vue.config.js && ln -f ../../postcss-custom-properties.config.js ./postcss.config.js && yarn vue-cli-service build --target lib ./\\$(cat package.json | jq -r .source) --name \\$(cat package.json | jq -r .componentName) --dest dist && rm ./vue.config.js ./postcss.config.js\"",
"build:cli": "yarn create:package-configs && lerna exec --ignore @kongponents/styles --ignore @kongponents/utils \"yarn vue-cli-service build --target lib ./\\$(cat package.json | jq -r .source) --name \\$(cat package.json | jq -r .componentName) --dest ./dist\" && yarn delete:package-configs",
"build:styles": "yarn node-sass packages/styles/styles.scss -o packages/styles && yarn build:postcss",
"build:utils": "yarn vue-cli-service build --target lib --name utils --entry ./packages/utils/utils.js --dest ./packages/utils/dist && rm ./packages/utils/dist/demo.html",
"create:package-configs": "lerna exec --ignore @kongponents/styles --ignore @kongponents/utils \"ln -f ../../vue.config.js ./vue.config.js && ln -f ../../postcss-custom-properties.config.js ./postcss.config.js && ln -f ../../tailwind-custom-properties.config.js ./tailwind.config.js\"",
"delete:package-configs": "lerna exec --ignore @kongponents/styles --ignore @kongponents/utils \"rm -f ./vue.config.js ./postcss.config.js ./tailwind.config.js\"",
"docs:dev": "yarn build:styles && vuepress dev docs",
"docs:build": "vuepress build docs",
"publish:ci": "lerna publish --conventional-commits --yes --force-publish",
Expand Down
7 changes: 4 additions & 3 deletions packages/KCardCatalog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"@kongponents/kemptystate": "^6.1.16",
"@kongponents/kpagination": "^6.1.16",
"@kongponents/kskeleton": "^6.1.16",
"@kongponents/utils": "^6.1.16",
"@vue/composition-api": "^1.2.4",
"vue": "2.6.10"
"@kongponents/utils": "^6.1.16"
},
"peerDependencies": {
"@vue/composition-api": "^1.2.4"
}
}
5 changes: 3 additions & 2 deletions packages/KTable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"@kongponents/kpagination": "^6.1.16",
"@kongponents/kskeleton": "^6.1.16",
"@kongponents/utils": "^6.1.16",
"@vue/composition-api": "^1.2.4",
"vue": "2.6.10",
"vue-uuid": "^2.0.2"
},
"peerDependencies": {
"@vue/composition-api": "^1.2.4"
}
}
4 changes: 3 additions & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
"access": "public"
},
"dependencies": {
"@vue/composition-api": "^1.2.4",
"swrv": "0.9.4",
"vue": "2.6.10"
},
"peerDependencies": {
"@vue/composition-api": "^1.2.4"
}
}
17 changes: 17 additions & 0 deletions tailwind-custom-properties.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
purge: [
'./**/*.vue'
],
theme: {
extend: {
screens: {
'2xl': '1390px'
},
maxWidth: {
'screen-2xl': '1390px'
}
}
},
variants: {},
plugins: []
}