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

feat: add meta data for http/theme/svg plugin #509

Merged
merged 6 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/http/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import metaData from './meta'

export default {
...metaData
}
4 changes: 4 additions & 0 deletions packages/http/meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
id: 'engine.http',
type: 'http'
}
2 changes: 2 additions & 0 deletions packages/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
"homepage": "https://opentiny.design/tiny-engine",
"dependencies": {
"@opentiny/tiny-engine-utils": "workspace:*",
"@opentiny/tiny-engine-entry": "workspace:*",
"@vueuse/core": "^9.6.0",
"axios": "~0.28.0",
"axios-mock-adapter": "^1.21.5"
},
"devDependencies": {
"@opentiny/vite-plugin-generate-comments": "workspace:*",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"vite": "^4.3.7"
Expand Down
3 changes: 2 additions & 1 deletion packages/http/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import { defineConfig } from 'vite'
import path from 'path'
hexqi marked this conversation as resolved.
Show resolved Hide resolved
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import generateComment from '@opentiny/vite-plugin-generate-comments'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), vueJsx()],
plugins: [generateComment(), vue(), vueJsx()],
publicDir: false,
resolve: {},
build: {
Expand Down
3 changes: 2 additions & 1 deletion packages/svgs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
*/

import SvgIcon from './src/Main.vue'
import metaData from './meta.js'

export default (app) => {
app.component('SvgIcon', SvgIcon)
app.component('SvgIcon', { ...metaData, SvgIcon })
}
4 changes: 4 additions & 0 deletions packages/svgs/meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
id: 'engine.svgs',
type: 'svgs'
}
5 changes: 4 additions & 1 deletion packages/svgs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
"author": "OpenTiny Team",
"license": "MIT",
"homepage": "https://opentiny.design/tiny-engine",
"dependencies": {},
"dependencies": {
"@opentiny/tiny-engine-entry": "workspace:*"
},
hexqi marked this conversation as resolved.
Show resolved Hide resolved
"devDependencies": {
"@opentiny/vite-plugin-generate-comments": "workspace:*",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"vite": "^4.3.7"
Expand Down
3 changes: 2 additions & 1 deletion packages/svgs/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import { defineConfig } from 'vite'
import path from 'path'
hexqi marked this conversation as resolved.
Show resolved Hide resolved
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import generateComment from '@opentiny/vite-plugin-generate-comments'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), vueJsx()],
plugins: [generateComment(), vue(), vueJsx()],
publicDir: false,
resolve: {},
build: {
Expand Down
5 changes: 5 additions & 0 deletions packages/theme/dark/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import metaData from './meta'

export default {
...metaData
}
5 changes: 5 additions & 0 deletions packages/theme/dark/meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
id: 'engine.theme.dark',
title: '主题',
type: 'theme'
}
4 changes: 4 additions & 0 deletions packages/theme/dark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"author": "OpenTiny Team",
"license": "MIT",
"homepage": "https://opentiny.design/tiny-engine",
"dependencies": {
"@opentiny/tiny-engine-entry": "workspace:*"
},
"devDependencies": {
"@opentiny/vite-plugin-generate-comments": "workspace:*",
"rimraf": "^3.0.2",
"vite": "^4.3.7"
}
Expand Down
22 changes: 12 additions & 10 deletions packages/theme/dark/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
/**
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

import { defineConfig } from 'vite'
import path from 'path'
import generateComment from '@opentiny/vite-plugin-generate-comments'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [generateComment()],
publicDir: false,
build: {
lib: {
Expand Down
5 changes: 5 additions & 0 deletions packages/theme/light/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import metaData from './meta'

export default {
...metaData
}
5 changes: 5 additions & 0 deletions packages/theme/light/meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
id: 'engine.theme.light',
title: '主题',
type: 'theme'
}
4 changes: 4 additions & 0 deletions packages/theme/light/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"author": "OpenTiny Team",
"license": "MIT",
"homepage": "https://opentiny.design/tiny-engine",
"dependencies": {
"@opentiny/tiny-engine-entry": "workspace:*"
},
"devDependencies": {
"@opentiny/vite-plugin-generate-comments": "workspace:*",
"rimraf": "^3.0.2",
"vite": "^4.3.7"
}
Expand Down
22 changes: 12 additions & 10 deletions packages/theme/light/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
/**
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

import { defineConfig } from 'vite'
import path from 'path'
import generateComment from '@opentiny/vite-plugin-generate-comments'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [generateComment()],
publicDir: false,
build: {
lib: {
Expand Down
5 changes: 5 additions & 0 deletions packages/utils/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import metaData from './meta'

export default {
...metaData
}
4 changes: 4 additions & 0 deletions packages/utils/meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
id: 'engine.utils',
type: 'utils'
}
5 changes: 4 additions & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@
"license": "MIT",
"homepage": "https://opentiny.design/tiny-engine",
"devDependencies": {
"@opentiny/vite-plugin-generate-comments": "workspace:*",
"vite": "^4.3.7",
"vitest": "^1.4.0"
},
"dependencies": {},
"dependencies": {
"@opentiny/tiny-engine-entry": "workspace:*"
},
"peerDependencies": {
"@opentiny/vue-renderless": "^3.14.0",
"vue": "^3.4.15"
Expand Down
3 changes: 2 additions & 1 deletion packages/utils/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@

import { defineConfig } from 'vite'
import path from 'path'
hexqi marked this conversation as resolved.
Show resolved Hide resolved
import generateComment from '@opentiny/vite-plugin-generate-comments'
hexqi marked this conversation as resolved.
Show resolved Hide resolved

// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
plugins: [generateComment()],
publicDir: false,
resolve: {},
build: {
Expand Down
5 changes: 5 additions & 0 deletions packages/vue-generator/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import metaData from './meta'

export default {
...metaData
}
4 changes: 4 additions & 0 deletions packages/vue-generator/meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
id: 'engine.vueGenerator',
type: 'vueGenerator'
}
2 changes: 2 additions & 0 deletions packages/vue-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"license": "MIT",
"homepage": "https://opentiny.design/tiny-engine",
"dependencies": {
"@opentiny/tiny-engine-entry": "workspace:*",
"@opentiny/tiny-engine-builtin-component": "workspace:*",
"@opentiny/tiny-engine-controller": "workspace:*",
"@vue/compiler-sfc": "3.2.45",
Expand All @@ -38,6 +39,7 @@
"vue-eslint-parser": "8.3.0"
},
"devDependencies": {
"@opentiny/vite-plugin-generate-comments": "workspace:*",
"@rushstack/eslint-patch": "^1.1.1",
"@vitest/coverage-v8": "^1.4.0",
"@vue/eslint-config-prettier": "^7.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/vue-generator/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import { defineConfig } from 'vite'
import path from 'path'
import { viteStaticCopy } from 'vite-plugin-static-copy'
import generateComment from '@opentiny/vite-plugin-generate-comments'

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -26,6 +27,7 @@ export default defineConfig({
}
},
plugins: [
generateComment(),
viteStaticCopy({
targets: [
{
Expand Down