Skip to content

Commit ae8ac2d

Browse files
committed
70%
1 parent 907c0dd commit ae8ac2d

12 files changed

+41
-13
lines changed

package.json

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
{
2-
"name": "nullresponsive",
3-
"version": "0.0.0",
2+
"name": "null-responsive",
3+
"version": "0.0.1",
4+
"files": ["dist"],
5+
"main": "./dist/null-responsive.umd.js",
6+
"module": "./dist/null-responsive.es.js",
7+
"exports":{
8+
".":{
9+
"import":"./dist/null-responsive.es.js",
10+
"require": "./dist/null-responsive.umd.js"
11+
}
12+
},
13+
"types": "./dist/types/index.d.ts",
414
"scripts": {
515
"dev": "vite",
6-
"build": "run-p type-check build-only",
16+
"build": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
717
"preview": "vite preview --port 4173",
818
"build-only": "vite build",
919
"type-check": "vue-tsc --noEmit",
1020
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
1121
"format": "prettier --write src/"
1222
},
1323
"dependencies": {
14-
"vue": "^3.2.37"
24+
"vue": "^3.2.37",
25+
"null-responsive":"null-responsive-0.0.1.tgz"
1526
},
1627
"devDependencies": {
1728
"@rushstack/eslint-patch": "^1.1.0",

public/favicon.ico

-4.19 KB
Binary file not shown.

src/App.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<script setup lang="ts">
2-
import Nullresponsive from "./components/ nullResponsive.vue";
3-
2+
// import Nullresponsive from "./components/ null-responsive.vue";
43
const nullconfig = {
54
inputText: "input text",
6-
imgPath: "logo.svg",
75
breakpoint: 1000,
86
bg_color: "purple",
97
text_color: "white",
@@ -12,7 +10,7 @@ const nullconfig = {
1210

1311
<template>
1412
<div>
15-
<Nullresponsive :config="nullconfig" />
13+
<nullResponsive :config="nullconfig" />
1614
</div>
1715
</template>
1816

src/assets/logo.svg

-1
This file was deleted.

src/components/ nullResponsive.vue src/components/ null-responsive.vue

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
</template>
1111

1212
<script lang="ts" setup>
13+
import '/node_modules/null-responsive/dist/style.css';
1314
import { ref } from "@vue/reactivity";
1415
import { onMounted } from "@vue/runtime-core";
1516
const showScreen = ref(false);

src/components/index.js

Whitespace-only changes.

src/components/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as nullResponsive } from "./ null-responsive.vue";

src/main.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { createApp } from "vue";
22
import App from "./App.vue";
3+
import nullResponsive from "./nullResponsive"
34

4-
createApp(App).mount("#app");
5+
6+
createApp(App).use(nullResponsive).mount("#app");

src/nullResponsive.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { App} from "vue"
2+
import { nullResponsive } from "./components";
3+
4+
export default {
5+
install: (app: App)=>{
6+
app.component("nullResponsive", nullResponsive)
7+
}
8+
}
9+
10+
11+
12+
export { nullResponsive};

tsconfig.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"composite": true,
66
"types": ["node"]
77
}
8-
}
8+
}

tsconfig.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"extends": "@vue/tsconfig/tsconfig.web.json",
33
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
4+
45
"compilerOptions": {
6+
"strictNullChecks": false,
57
"baseUrl": ".",
68
"paths": {
79
"@/*": ["./src/*"]
8-
}
10+
},
11+
"outDir": "dist",
12+
"declaration": true
913
},
1014

1115
"references": [

vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default defineConfig({
1212
},
1313
build: {
1414
lib: {
15-
entry: path.resolve(__dirname, "src/components/index.js"),
15+
entry: path.resolve(__dirname, "src/components/index.ts"),
1616
name: "nullResponsive",
1717
fileName: (format) => `null-responsive.${format}.js`,
1818
},

0 commit comments

Comments
 (0)