diff --git a/.eslintrc.js b/.eslintrc.cjs
similarity index 100%
rename from .eslintrc.js
rename to .eslintrc.cjs
diff --git a/babel.config.js b/babel.config.js
deleted file mode 100644
index d25d19a..0000000
--- a/babel.config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- presets: ['@babel/preset-typescript', '@babel/preset-env'],
- plugins: [
- '@babel/plugin-transform-runtime'
- ]
-};
diff --git a/commitlint.config.js b/commitlint.config.cjs
similarity index 100%
rename from commitlint.config.js
rename to commitlint.config.cjs
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..dde16aa
--- /dev/null
+++ b/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Vite + Vue + TS
+
+
+
+
+
+
diff --git a/package.json b/package.json
index 73eb29d..328917b 100644
--- a/package.json
+++ b/package.json
@@ -7,9 +7,10 @@
"src/*",
"types/*"
],
+ "type": "module",
"module": "dist/vue3-datepicker.js",
"scripts": {
- "dev": "vite",
+ "dev": "vite --config vite.config.project.ts",
"cz": "git-cz",
"precommit": "lint-staged",
"build": "vue-tsc && vite build --config vite.config.project.ts",
@@ -64,8 +65,7 @@
"vue-tsc": "^1.8.5"
},
"lint-staged": {
- "*.ts": "eslint --cache --fix",
- "*.vue": "eslint --cache --fix"
+ "*.ts": "eslint --cache --fix"
},
"types": "./types/index.d.ts",
"keywords": [
diff --git a/public/assets/icons/chevron-down.svg b/public/assets/icons/chevron-down.svg
deleted file mode 100644
index 278c6a3..0000000
--- a/public/assets/icons/chevron-down.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100644
index df36fcf..0000000
Binary files a/public/favicon.ico and /dev/null differ
diff --git a/public/index.html b/public/index.html
deleted file mode 100644
index 52cb3e9..0000000
--- a/public/index.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
- <%= htmlWebpackPlugin.options.title %>
-
-
-
-
-
-
-
diff --git a/public/vite.svg b/public/vite.svg
new file mode 100644
index 0000000..e7b8dfb
--- /dev/null
+++ b/public/vite.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index b83c779..9c2bbf2 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,9 +1,9 @@
-
+
import { computed, defineComponent, ref, watch } from 'vue';
import IconView from '../iconview/IconView.vue';
-import { formatDate, stringToDate } from './utils/DateUtils';
+import { formatDate, stringToDate } from './utils/DateUtils.ts';
export default defineComponent({
name: 'DateInput',
@@ -85,6 +85,7 @@ export default defineComponent({
},
resetTypedDate: {
type: [Date as new () => Date],
+ default: new Date()
},
format: {
type: [String, Function],
@@ -303,4 +304,4 @@ export default defineComponent({
.cursor-na {
cursor: 'not-allowed';
}
-
\ No newline at end of file
+
diff --git a/src/main.ts b/src/main.ts
index 2425c0f..e0ac16c 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,3 +1,9 @@
+// import { createApp } from 'vue'
+// import './style.css'
+// import App from './App.vue'
+
+// createApp(App).mount('#app')
+
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'