Skip to content

Commit

Permalink
build: add type declarations to /dist imgix#517
Browse files Browse the repository at this point in the history
  • Loading branch information
namack committed Dec 14, 2023
1 parent 9aebc6f commit be3b2e1
Show file tree
Hide file tree
Showing 6 changed files with 357 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/imgix-vue.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ const IxImg = defineComponent({
});
}
});
const VERSION = "3.1.0";
const VERSION = "3.1.1";
const clientOptionDefaults = {
includeLibraryParam: true
};
Expand Down
2 changes: 1 addition & 1 deletion dist/imgix-vue.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ const IxImg = defineComponent({
});
}
});
const VERSION = "3.1.0";
const VERSION = "3.1.1";
const clientOptionDefaults = {
includeLibraryParam: true
};
Expand Down
2 changes: 1 addition & 1 deletion dist/imgix-vue.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@
});
}
});
const VERSION = "3.1.0";
const VERSION = "3.1.1";
const clientOptionDefaults = {
includeLibraryParam: true
};
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"component"
],
"main": "dist/imgix-vue.umd.js",
"types": "dist/imgix-vue.min.d.ts",
"module": "dist/imgix-vue.esm.js",
"jsnext:main": "dist/imgix-vue.esm.js",
"unpkg": "dist/imgix-vue.min.js",
Expand Down Expand Up @@ -80,6 +81,7 @@
"rollup-plugin-vue": "6.0.0",
"typescript": "4.9.5",
"vite": "^2.9.15",
"vite-plugin-dts": "^3.6.4",
"vitest": "^0.31.0",
"vue": "3.3.4",
"vue-template-compiler": "2.7.14",
Expand Down Expand Up @@ -200,6 +202,7 @@
"assets": [
"src/plugins/**",
"dist/**/*.js",
"dist/**/*.d.ts",
"package.json",
"changelog.md"
],
Expand All @@ -214,6 +217,10 @@
"path": "dist/imgix-vue.min.js",
"label": "Standalone browser build"
},
{
"path": "dist/imgix-vue.min.d.ts",
"label": "Type definitions"
},
{
"path": "dist/imgix-vue.umd.js",
"label": "UMD/CJS build"
Expand Down
3 changes: 2 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { configDefaults } from 'vitest/config';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import license from 'rollup-plugin-license';
import dts from 'vite-plugin-dts';

const path = require('path');
const minify = process.argv.includes('--minify');
Expand Down Expand Up @@ -38,7 +39,7 @@ export default defineConfig({
globals: true,
environment: 'jsdom',
},
plugins: [vue()],
plugins: [vue(), dts({ rollupTypes: true })],
esbuild: {
legalComments: 'none', // Preserve all legal comments.
banner: '/*! licenses: /vendor.LICENSE.txt */',
Expand Down
Loading

0 comments on commit be3b2e1

Please sign in to comment.