-
Notifications
You must be signed in to change notification settings - Fork 3
vue: add composition api example #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| .DS_Store | ||
| dist | ||
| dist-ssr | ||
| coverage | ||
| *.local | ||
|
|
||
| /cypress/videos/ | ||
| /cypress/screenshots/ | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? | ||
|
|
||
| *.tsbuildinfo | ||
|
|
||
| # Web SDK static files | ||
| public/pspdfkit-lib/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # vue-project | ||
|
|
||
| This template should help get you started developing with Vue 3 in Vite. | ||
|
|
||
| ## Recommended IDE Setup | ||
|
|
||
| [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). | ||
|
|
||
| ## Type Support for `.vue` Imports in TS | ||
|
|
||
| TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types. | ||
|
|
||
| ## Customize configuration | ||
|
|
||
| See [Vite Configuration Reference](https://vite.dev/config/). | ||
|
|
||
| ## Project Setup | ||
|
|
||
| ```sh | ||
| pnpm install | ||
| ``` | ||
|
|
||
| ### Compile and Hot-Reload for Development | ||
|
|
||
| ```sh | ||
| pnpm dev | ||
| ``` | ||
|
|
||
| ### Type-Check, Compile and Minify for Production | ||
|
|
||
| ```sh | ||
| pnpm build | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /// <reference types="vite/client" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <!DOCTYPE html> | ||
| <html lang=""> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" href="/favicon.ico" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Vite App</title> | ||
| </head> | ||
| <body> | ||
| <div id="app"></div> | ||
| <script type="module" src="/src/main.ts"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,29 @@ | ||||||
| { | ||||||
| "name": "vue-project", | ||||||
| "version": "0.0.0", | ||||||
| "private": true, | ||||||
| "type": "module", | ||||||
| "scripts": { | ||||||
| "dev": "vite", | ||||||
| "build": "run-p type-check \"build-only {@}\" --", | ||||||
| "preview": "vite preview", | ||||||
| "build-only": "vite build", | ||||||
| "type-check": "vue-tsc --build" | ||||||
| }, | ||||||
| "dependencies": { | ||||||
| "pspdfkit": "^2024.8.1", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use the new package instead, please?:
Suggested change
|
||||||
| "vue": "^3.5.13" | ||||||
| }, | ||||||
| "devDependencies": { | ||||||
| "@tsconfig/node22": "^22.0.0", | ||||||
| "@types/node": "^22.10.7", | ||||||
| "@vitejs/plugin-vue": "^5.2.1", | ||||||
| "@vue/tsconfig": "^0.7.0", | ||||||
| "npm-run-all2": "^7.0.2", | ||||||
| "rollup-plugin-copy": "^3.5.0", | ||||||
| "typescript": "~5.7.3", | ||||||
| "vite": "^6.0.11", | ||||||
| "vite-plugin-vue-devtools": "^7.7.0", | ||||||
| "vue-tsc": "^2.2.0" | ||||||
| } | ||||||
| } | ||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.