Skip to content

Commit

Permalink
Type builder, vuetify 3 preset and migration to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Riley committed Sep 16, 2024
1 parent 96ebad2 commit c560078
Show file tree
Hide file tree
Showing 24 changed files with 3,222 additions and 5,979 deletions.
11 changes: 0 additions & 11 deletions .babelrc

This file was deleted.

9 changes: 0 additions & 9 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
.DS_Store
dist
dist-ssr
types
*.local
demo/scss
*.tgz
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Version 4

- Migrated project to use `type: "module"`. Bumped major as a precaution
- Migrated to ESlint v9 with flat config
- Switched testing library from Jest to Vitest
- Added type builder from JSDoc comments
- **Feature**: New `vuetify3` preset
17 changes: 17 additions & 0 deletions docs/configure/presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ app.use(Vue3Mq, {
| xl | 1280 |
| xxl | 1536 |

## Vuetify 3

```js
app.use(Vue3Mq, {
preset: "vuetify3",
});
```

| Name | Minimum width |
| ---- | ------------- |
| xs | 0 |
| sm | 600 |
| md | 960 |
| lg | 1280 |
| xl | 1920 |
| xxl | 2560 |

## Vuetify

```js
Expand Down
7 changes: 4 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"type": "module",
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
},
"devDependencies": {
"fast-glob": "^3.3.2",
"vitepress": "1.0.0-rc.42",
"vue": "^3.4.15"
"vitepress": "^1.3.4",
"vue": "^3.5.6"
}
}
}
1 change: 1 addition & 0 deletions docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default {};
20 changes: 20 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pluginVue from "eslint-plugin-vue";
import configPrettier from "eslint-config-prettier";
import jsdoc from "eslint-plugin-jsdoc";
import js from "@eslint/js";

export default [
js.configs.recommended,
jsdoc.configs["flat/recommended"],
configPrettier,
...pluginVue.configs["flat/recommended"],
{
plugins: [jsdoc],
},
{
rules: {
"vue/multi-word-component-names": "off",
"vue/valid-v-slot": "off",
},
},
];
60 changes: 35 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "vue3-mq",
"version": "3.2.0",
"version": "4.0.0",
"description": "Build responsive design into your Vue 3 app",
"files": [
"dist/*"
"dist/*",
"types/*"
],
"type": "module",
"main": "./dist/vue3-mq.umd.js",
"module": "./dist/vue3-mq.js",
"exports": {
Expand All @@ -13,6 +15,7 @@
"require": "./dist/vue3-mq.umd.js"
}
},
"types": "./types/index.d.ts",
"browserslist": [
"> 1%",
"last 2 versions",
Expand All @@ -32,35 +35,41 @@
"license": "MIT",
"scripts": {
"dev": "vite",
"build": "vite build -c vite-build.config.js",
"build": "vitest --run && vite build -c vite-build.config.js",
"docs:dev": "pnpm --filter ./docs run dev",
"docs:build": "pnpm --filter ./docs run build",
"test": "jest"
"docs:preview": "pnpm --filter ./docs run preview",
"test": "vitest",
"build:types": "vue-tsc && cp ./src/global.d.ts ./types/global.d.ts && npm run copy-ref",
"copy-ref": "echo '/// <reference path=\"./global.d.ts\" />\n' | cat - ./types/index.d.ts > temp && mv temp ./types/index.d.ts",
"prepublishOnly": "npm run build:types && npm run build"
},
"peerDependencies": {
"vue": "^3.0.5"
},
"devDependencies": {
"@babel/core": "^7.14.8",
"@babel/preset-env": "^7.14.8",
"@mdi/js": "^7.0.96",
"@vitejs/plugin-vue": "^3.1.0",
"@vue/compiler-sfc": "^3.0.5",
"@vue/test-utils": "^2.0.0-rc.10",
"autoprefixer": "^10.4.4",
"babel-plugin-prismjs": "^2.1.0",
"bootstrap": "^5.1.3",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-vue": "^9.4.0",
"@mdi/js": "^7.4.47",
"@vitejs/plugin-vue": "^5.1.3",
"@vue/compiler-sfc": "^3.5.6",
"@vue/test-utils": "^2.4.6",
"autoprefixer": "^10.4.20",
"css-mediaquery": "^0.1.2",
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^50.2.3",
"eslint-plugin-vue": "^9.28.0",
"exenv": "^1.2.2",
"lodash-es": "^4.17.21",
"match-media-mock": "^0.1.1",
"postcss": "^8.4.12",
"sass": "^1.35.2",
"tailwindcss": "^3.0.23",
"vite": "^3.1.0",
"vue-jest": "^5.0.0-alpha.10",
"vue3-icon": "^2.0.0"
"postcss": "^8.4.47",
"sass": "^1.78.0",
"tailwindcss": "^3.4.11",
"typescript": "^5.6.2",
"vite": "^5.4.5",
"vitest": "^2.1.1",
"vue": "^3.5.6",
"vue-tsc": "^2.1.6",
"vue3-icon": "^2.1.0"
},
"bugs": {
"url": "https://github.com/craigrileyuk/vue3-mq/issues"
Expand All @@ -79,5 +88,6 @@
"responsive",
"breakpoints",
"vue-mq"
]
}
],
"packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1"
}
Loading

0 comments on commit c560078

Please sign in to comment.