Skip to content

Commit

Permalink
Merge pull request #77 from kitsune7/master
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanbond authored Mar 14, 2024
2 parents 881e7d1 + 3d8930f commit 662090d
Show file tree
Hide file tree
Showing 6 changed files with 996 additions and 285 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
.bower.json
*.log
node_modules
Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "@formio/vue",
"version": "5.0.0",
"description": "A vue.js renderer for form.io forms.",
"main": "lib/index",
"typeings": "lib/index",
"main": "dist/index.umd.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"watch": "tsc -w",
"build": "vite build && tsc",
"prepublish": "npm run build"
},
"repository": {
Expand All @@ -25,18 +25,21 @@
},
"homepage": "https://github.com/formio/vue-formio#readme",
"peerDependencies": {
"formiojs": "^4.16.0",
"vue": "^3.0.9"
"formiojs": "^4.18.1",
"vue": "^3.4.15"
},
"devDependencies": {
"@types/node": "^18.17.5",
"@types/vue": "^2.0.0",
"@vue/compiler-sfc": "^3.3.4",
"formiojs": "^4.16.0",
"typescript": "^4.9.5",
"typescript-eslint-parser": "^22.0.0"
"@vue/compiler-sfc": "^3.4.15",
"formiojs": "^4.18.1",
"typescript": "^5.3.3",
"typescript-eslint-parser": "^22.0.0",
"vite": "^5.0.12",
"vite-plugin-dts": "^3.7.2",
"vite-tsconfig-paths": "^4.3.1"
},
"files": [
"lib"
"dist"
]
}
3 changes: 2 additions & 1 deletion src/composables/formBuilder/useInitializeBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import FormioFormBuilder from 'formiojs/FormBuilder';
import InitializeFormBuilderOptions from '../../intefaces/formBuilder/initializeFormBuilderOptions';

export default function useInitializeBuilder(props, context, options: InitializeFormBuilderOptions) {
const _builder = ref(null);
// TODO: This is a temporary fix for TS2339 on the line `_builder.instance.destroy(true)`.
const _builder: any = ref(null);

const setupBuilder = () => {
_builder.value.instance.events.onAny((...args: any[]) => {
Expand Down
23 changes: 5 additions & 18 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
{
"compilerOptions": {
"esModuleInterop": true,
"experimentalDecorators": true,
"noEmit": true,
"noImplicitAny": false,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": false,
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"declaration": true,
"lib": ["es7", "dom"],
"strict": true,
"skipLibCheck": true,
"types": ["node"],
"typeRoots": ["node_modules/@types"],
"baseUrl": ".",
"outDir": "lib",
"paths": {
"@/*": [
"src/*"
]
}
"types": ["node"]
},
"parser": "typescript-eslint-parser",
"include": [
Expand Down
26 changes: 26 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { resolve } from 'path';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
import tsConfigPaths from 'vite-tsconfig-paths';

export default () => {
return defineConfig({
plugins: [dts({ rollupTypes: true }), tsConfigPaths()],
build: {
sourcemap: true,
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'formio-vue',
fileName: 'index',
},
rollupOptions: {
output: {
globals: {
vue: 'Vue',
},
},
external: ['vue'],
},
},
})
};
Loading

0 comments on commit 662090d

Please sign in to comment.