Skip to content

Commit 75d75c0

Browse files
committed
chore: general improvements
1 parent 861f376 commit 75d75c0

6 files changed

Lines changed: 245 additions & 264 deletions

File tree

generi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"tag": true,
66
"version": true,
77
"push": true,
8-
"publish": false,
8+
"publish": true,
99
"release": true,
1010
"prerelease": "beta",
1111
"exclude": [" typo"]

lerna.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{
2-
"npmClient": "pnpm",
3-
"useWorkspaces": true,
4-
"version": "3.0.0-beta.0"
5-
}
1+
{
2+
"npmClient": "pnpm",
3+
"useWorkspaces": true,
4+
"version": "0.5.0"
5+
}

packages/nuxt/package.json

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
1-
{
2-
"name": "nuxt-pdfeasy",
3-
"sideEffects": false,
4-
"author": {
5-
"email": "novout@hotmail.com",
6-
"name": "Novout",
7-
"url": "https://github.com/Novout"
8-
},
9-
"version": "3.0.0-beta.0",
10-
"repository": "https://github.com/betterwrite/nuxt-pdfeasy",
11-
"description": "A PDF document generator to your Nuxt application.",
12-
"engines": {
13-
"node": ">=14.16"
14-
},
15-
"bugs": {
16-
"url": "https://github.com/betterwrite/nuxt-pdfeasy/issues"
17-
},
18-
"keywords": [
19-
"pdfkit",
20-
"pdf",
21-
"typescript",
22-
"javascript",
23-
"printing",
24-
"nuxt3"
25-
],
26-
"license": "MIT",
27-
"type": "module",
28-
"exports": {
29-
".": {
30-
"import": "./dist/module.mjs",
31-
"require": "./dist/module.cjs"
32-
}
33-
},
34-
"main": "./dist/module.cjs",
35-
"types": "./dist/types.d.ts",
36-
"files": [
37-
"dist",
38-
"package.json"
39-
],
40-
"scripts": {
41-
"build:prod": "pnpm run set",
42-
"build": "pnpm run set",
43-
"prepack": "pnpm run set",
44-
"set": "nuxi prepare && nuxt-module-build && nuxi prepare playground",
45-
"dev": "nuxi dev playground",
46-
"dev:build": "nuxi build playground",
47-
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground"
48-
},
49-
"dependencies": {
50-
"@nuxt/kit": "^3.4.3",
51-
"pdfeasy": "workspace:*"
52-
},
53-
"devDependencies": {
54-
"@nuxt/module-builder": "^0.2.1",
55-
"@nuxt/schema": "^3.4.3",
56-
"@nuxtjs/eslint-config-typescript": "^12.0.0",
57-
"@types/node": "^18.11.9",
58-
"eslint": "^8.27.0",
59-
"nuxt": "^3.4.3"
60-
}
61-
}
1+
{
2+
"name": "nuxt-pdfeasy",
3+
"sideEffects": false,
4+
"author": {
5+
"email": "novout@hotmail.com",
6+
"name": "Novout",
7+
"url": "https://github.com/Novout"
8+
},
9+
"version": "0.5.0",
10+
"repository": "https://github.com/betterwrite/nuxt-pdfeasy",
11+
"description": "A PDF document generator to your Nuxt application.",
12+
"engines": {
13+
"node": ">=14.16"
14+
},
15+
"bugs": {
16+
"url": "https://github.com/betterwrite/nuxt-pdfeasy/issues"
17+
},
18+
"keywords": [
19+
"pdfkit",
20+
"pdf",
21+
"typescript",
22+
"javascript",
23+
"printing",
24+
"nuxt3"
25+
],
26+
"license": "MIT",
27+
"type": "module",
28+
"exports": {
29+
".": {
30+
"import": "./dist/module.mjs",
31+
"require": "./dist/module.cjs"
32+
}
33+
},
34+
"main": "./dist/module.cjs",
35+
"types": "./dist/types.d.ts",
36+
"files": [
37+
"dist",
38+
"package.json"
39+
],
40+
"scripts": {
41+
"build:prod": "pnpm run set",
42+
"build": "pnpm run set",
43+
"prepack": "pnpm run set",
44+
"set": "nuxi prepare && nuxt-module-build && nuxi prepare playground",
45+
"dev": "nuxi dev playground",
46+
"dev:build": "nuxi build playground",
47+
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground"
48+
},
49+
"dependencies": {
50+
"@nuxt/kit": "^3.4.3",
51+
"pdfeasy": "workspace:*"
52+
},
53+
"devDependencies": {
54+
"@nuxt/module-builder": "^0.2.1",
55+
"@nuxt/schema": "^3.4.3",
56+
"@nuxtjs/eslint-config-typescript": "^12.0.0",
57+
"@types/node": "^18.11.9",
58+
"eslint": "^8.27.0",
59+
"nuxt": "^3.4.3"
60+
}
61+
}

packages/pdfeasy/package.json

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
1-
{
2-
"name": "pdfeasy",
3-
"version": "3.0.0-beta.0",
4-
"description": "Client/Server Side PDF-Creator based in PDFKit",
5-
"author": "Novout <novout@hotmail.com>",
6-
"license": "MIT",
7-
"repository": "https://github.com/betterwrite/pdfeasy",
8-
"bugs": {
9-
"url": "https://github.com/betterwrite/pdfeasy/issues"
10-
},
11-
"keywords": [
12-
"pdfkit",
13-
"pdf",
14-
"typescript",
15-
"javascript",
16-
"printing",
17-
"layout"
18-
],
19-
"browser": {
20-
"path": "path-browserify",
21-
"crypto": "crypto-browserify",
22-
"stream": "stream-browserify"
23-
},
24-
"exports": {
25-
".": {
26-
"default": "./dist/client.cjs.js",
27-
"import": "./dist/client.esm.js",
28-
"require": "./dist/client.cjs.js",
29-
"node": "./dist/node.esm.js",
30-
"types": "./dist/index.d.ts"
31-
}
32-
},
33-
"main": "./dist/client.cjs.js",
34-
"module": "./dist/client.esm.js",
35-
"node": "./dist/node.esm.js",
36-
"types": "./dist/index.d.ts",
37-
"scripts": {
38-
"format": "prettier src/**/*.ts scripts/**/*.js --write",
39-
"build": "rimraf dist && cross-env NODE_ENV=development node scripts/build.js",
40-
"build:prod": "rimraf dist && cross-env NODE_ENV=production node scripts/build.js",
41-
"test": "pnpm build:prod && vitest run --coverage",
42-
"node:script": "node -r esm ./scripts/generate/run-node.js",
43-
"demo": "vite --port 3000"
44-
},
45-
"files": [
46-
"dist/**/*",
47-
"LICENSE",
48-
"README.md"
49-
],
50-
"engines": {
51-
"node": ">=14.0"
52-
},
53-
"dependencies": {
54-
"blob-stream": "0.1.3",
55-
"file-saver": "2.0.5",
56-
"fontkit-next": "1.8.3",
57-
"mitt": "3.0.0",
58-
"ohmyfetch": "0.4.21",
59-
"pdfkit": "0.13.0"
60-
},
61-
"devDependencies": {
62-
"@types/blob-stream": "0.1.30",
63-
"@types/file-saver": "2.0.5",
64-
"@types/node": "20.1.2",
65-
"@types/pdfkit": "0.12.9",
66-
"@vitest/coverage-c8": "0.31.0",
67-
"cross-env": "7.0.3",
68-
"esbuild": "0.17.18",
69-
"esbuild-plugin-alias": "0.2.1",
70-
"esbuild-plugin-fileloc": "0.0.6",
71-
"esbuild-plugin-replace": "1.3.0",
72-
"esbuild-plugin-resolve": "1.0.3",
73-
"esm": "3.2.25",
74-
"node-stdlib-browser": "1.2.0",
75-
"prettier": "2.8.8",
76-
"rimraf": "5.0.0",
77-
"typescript": "5.0.4",
78-
"vite": "4.3.5",
79-
"vitest": "0.31.0"
80-
}
81-
}
1+
{
2+
"name": "pdfeasy",
3+
"version": "0.5.0",
4+
"description": "Client/Server Side PDF-Creator based in PDFKit",
5+
"author": "Novout <novout@hotmail.com>",
6+
"license": "MIT",
7+
"repository": "https://github.com/betterwrite/pdfeasy",
8+
"bugs": {
9+
"url": "https://github.com/betterwrite/pdfeasy/issues"
10+
},
11+
"keywords": [
12+
"pdfkit",
13+
"pdf",
14+
"typescript",
15+
"javascript",
16+
"printing",
17+
"layout"
18+
],
19+
"browser": {
20+
"path": "path-browserify",
21+
"crypto": "crypto-browserify",
22+
"stream": "stream-browserify"
23+
},
24+
"exports": {
25+
".": {
26+
"default": "./dist/client.cjs.js",
27+
"import": "./dist/client.esm.js",
28+
"require": "./dist/client.cjs.js",
29+
"node": "./dist/node.esm.js",
30+
"types": "./dist/index.d.ts"
31+
}
32+
},
33+
"main": "./dist/client.cjs.js",
34+
"module": "./dist/client.esm.js",
35+
"node": "./dist/node.esm.js",
36+
"types": "./dist/index.d.ts",
37+
"scripts": {
38+
"format": "prettier src/**/*.ts scripts/**/*.js --write",
39+
"build": "rimraf dist && cross-env NODE_ENV=development node scripts/build.js",
40+
"build:prod": "rimraf dist && cross-env NODE_ENV=production node scripts/build.js",
41+
"test": "pnpm build:prod && vitest run --coverage",
42+
"node:script": "node -r esm ./scripts/generate/run-node.js",
43+
"demo": "vite --port 3000"
44+
},
45+
"files": [
46+
"dist/**/*",
47+
"LICENSE",
48+
"README.md"
49+
],
50+
"engines": {
51+
"node": ">=14.0"
52+
},
53+
"dependencies": {
54+
"blob-stream": "0.1.3",
55+
"file-saver": "2.0.5",
56+
"fontkit-next": "1.8.3",
57+
"mitt": "3.0.0",
58+
"ohmyfetch": "0.4.21",
59+
"pdfkit": "0.13.0"
60+
},
61+
"devDependencies": {
62+
"@types/blob-stream": "0.1.30",
63+
"@types/file-saver": "2.0.5",
64+
"@types/node": "20.1.2",
65+
"@types/pdfkit": "0.12.9",
66+
"@vitest/coverage-c8": "0.31.0",
67+
"cross-env": "7.0.3",
68+
"esbuild": "0.17.18",
69+
"esbuild-plugin-alias": "0.2.1",
70+
"esbuild-plugin-fileloc": "0.0.6",
71+
"esbuild-plugin-replace": "1.3.0",
72+
"esbuild-plugin-resolve": "1.0.3",
73+
"esm": "3.2.25",
74+
"node-stdlib-browser": "1.2.0",
75+
"prettier": "2.8.8",
76+
"rimraf": "5.0.0",
77+
"typescript": "5.0.4",
78+
"vite": "4.3.5",
79+
"vitest": "0.31.0"
80+
}
81+
}

packages/vue/README.md

Lines changed: 36 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,36 @@
1-
# Vue PDFMake
2-
3-
A [PDFMake](http://pdfmake.org/#/) plugin for 3.x
4-
5-
<img src="https://img.shields.io/npm/v/vue3-pdfmake?label=&style=for-the-badge" />
6-
7-
## Install
8-
9-
`yarn add vue3-pdfmake`
10-
11-
OR
12-
13-
`npm install vue3-pdfmake`
14-
15-
in `main.(js|ts)`
16-
17-
```js
18-
import { createApp } from 'vue';
19-
import { PDFPlugin } from 'vue3-pdfmake';
20-
import App from './App.vue';
21-
22-
const app = createApp(App);
23-
//...
24-
app.use(PDFPlugin);
25-
//...
26-
app.mount('#app');
27-
```
28-
29-
## Example
30-
31-
```vue
32-
<script setup>
33-
import { usePDF } from 'vue3-pdfmake';
34-
35-
const pdfmake = usePDF({
36-
autoInstallVFS: true
37-
})
38-
39-
const onGenPDF = () => {
40-
pdfmake.createPdf({
41-
content: [
42-
'Hello World From PDFMake!',
43-
]
44-
}).download();
45-
}
46-
</script>
47-
48-
<template>
49-
<button @click="onGenPDF">Click here for download demo pdf</button>
50-
</template>
51-
```
52-
53-
### Documentation
54-
55-
**Check [PDFMake Documentation](https://pdfmake.github.io/docs/0.3/getting-started/client-side/methods/) for more explanations!**
1+
# Vue PDFMake
2+
3+
A PDFEasy plugin for Vue 3.x
4+
5+
## Install
6+
7+
`npm i vue-pdfeasy`
8+
9+
## Example
10+
11+
```ts
12+
<script setup lang="ts">
13+
import { usePDF } from 'vue-pdfeasy'
14+
15+
const pdf = usePDF()
16+
17+
pdf.new()
18+
19+
pdf.add([
20+
{ raw: 'Simple text!' },
21+
])
22+
23+
pdf.run({
24+
type: 'client',
25+
clientEmit: 'blob'
26+
}).then((blob) => {
27+
const iframe = document.querySelector('#pdf')
28+
29+
iframe.src = blob
30+
}).catch((err) => {
31+
console.error(err)
32+
})
33+
</script>
34+
```
35+
36+
- **For PDFEasy docs, [click here](https://github.com/betterwrite/pdfeasy)**

0 commit comments

Comments
 (0)