@@ -0,0 +1,6 @@
+import { withInstall } from '@kankan/utils';
+import Audio from './src/index.vue';
+
+export const KKAudio = withInstall(Audio);
+export default KKAudio;
@@ -16,7 +16,7 @@
const randoms = ref([1, 0.5, 1, 0.5]);
const playIng = ref(false);
- let timeout;
+ let timeout: number;
const rotation = () => {
if (!playIng.value) return;
for (let i = 0; i < randoms.value.length; i++) {
@@ -51,6 +51,6 @@
});
</script>
-<script>
+<!-- <script>
export default { name: 'UiAudio' };
-</script>
+</script> -->
@@ -0,0 +1,14 @@
+// For this project development
+import '@vue/runtime-core';
+declare module '@vue/runtime-core' {
+ // GlobalComponents for Volar
+ export interface GlobalComponents {
+ KKAudio: typeof import('./component/audio');
+ }
+ // interface ComponentCustomProperties {
+ // }
+}
+export {};
@@ -0,0 +1 @@
+export * from './audio';
@@ -1,8 +1,10 @@
{
"name": "@kankan/components",
"version": "1.0.0",
- "main": "dist/index",
- "types": "dist/index",
+ "main": "index.ts",
+ "module": "index.ts",
+ "unpkg": "index.js",
+ "types": "index.d.ts",
"files": [
"dist"
],
@@ -18,9 +20,11 @@
"prepublishOnly": "pnpm run build"
},
"peerDependencies": {
+ "@kankan/utils": "workspace:^1.0.0",
"vue": "^3.2.0"
"devDependencies": {
"@rollup/plugin-typescript": "~8.3.4",
"rimraf": "~3.0.2",
"rollup": "~2.77.3",
+export * from './vue';
@@ -1 +0,0 @@
-export * from './vue';
@@ -59,6 +59,7 @@ importers:
packages/components:
specifiers:
+ '@kankan/utils': workspace:^1.0.0
'@rollup/plugin-typescript': ~8.3.4
rimraf: ~3.0.2
rollup: ~2.77.3
@@ -69,6 +70,7 @@ importers:
dependencies:
vue: 3.2.39
devDependencies:
+ '@kankan/utils': link:../utils
'@rollup/plugin-typescript': 8.3.4_z6zeof5eklcd4ck5cj6ien7gzy
rimraf: 3.0.2
rollup: 2.77.3
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "outDir": "dist",
+ "target": "es2018",
+ "module": "esnext",
+ "baseUrl": ".",
+ "sourceMap": false,
+ "moduleResolution": "node",
+ "allowJs": false,
+ "strict": true,
+ "noUnusedLocals": true,
+ "resolveJsonModule": true,
+ "allowSyntheticDefaultImports": true,
+ "esModuleInterop": true,
+ "removeComments": false,
+ "rootDir": ".",
+ "types": [],
+ "paths": {
+ "@kankan/*": ["packages/*"]
@@ -1,20 +0,0 @@
-{
- "compilerOptions": {
- "module": "esnext",
- "target": "es2018",
- "sourceMap": true,
- "moduleResolution": "node",
- "declaration": true,
- "declarationMap": true,
- "noEmitOnError": true,
- "skipLibCheck": true,
- "esModuleInterop": true,
- "types": [],
- "rootDir": ".",
- "noEmit": false
- },
- "exclude": ["node_modules", "dist"],
- "paths": {
- "@kankan/*": ["packages/*"]
- }
-}
@@ -1,12 +1,10 @@
- "extends": "./tsconfig.build.json",
-
- "baseUrl": ".",
- "@nighttrax/components/*": ["packages/components/src/*"],
- "@nighttrax/*": ["packages/*/src"]
- "noEmit": true
+ "files": [],
+ "references": [
+ { "path": "./tsconfig.web.json" }
+ // { "path": "./tsconfig.play.json" },
+ // { "path": "./tsconfig.node.json" },
+ // { "path": "./tsconfig.vite-config.json" },
+ // { "path": "./tsconfig.vitest.json" }
+ ]
}
@@ -0,0 +1,20 @@
+ "extends": "./tsconfig.base.json",
+ "composite": true,
+ "jsx": "preserve",
+ "lib": ["ES2018", "DOM", "DOM.Iterable"],
+ "types": ["unplugin-vue-macros/macros-global"],
+ "skipLibCheck": true
+ },
+ "include": ["packages", "typings/components.d.ts", "typings/env.d.ts"],
+ "exclude": [
+ "node_modules",
+ "**/dist",
+ "**/__tests__/**/*",
+ "**/gulpfile.ts",
+ "**/test-helper",
+ "packages/test-utils",
+ "**/*.md"