diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb29b94..bdc7f7a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Repo Setup -To develop and test the `@document-kits/viewer`, run `pnpm examples:dev` in the root folder. It will use a custom gulp task +To develop and test the `@document-kits/viewer`, run `pnpm demos:dev` in the root folder. It will use a custom gulp task to build based on submodule `pdf.js` in `packages/document-viewer/pdf.js`. The specific process is as follows: 1. Install dependencies for PDF.js if `FORCE_INSTALL_DEPENDENCIES` environment was set diff --git a/examples/.gitignore b/examples/.gitignore deleted file mode 100644 index a547bf3..0000000 --- a/examples/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/examples/canvas.js b/examples/canvas.js deleted file mode 100644 index e69de29..0000000 diff --git a/examples/index.html b/examples/index.html deleted file mode 100644 index 7daf709..0000000 --- a/examples/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Document Viewer - - -
-
- - - diff --git a/examples/main.js b/examples/main.js deleted file mode 100644 index a7724f7..0000000 --- a/examples/main.js +++ /dev/null @@ -1,14 +0,0 @@ -import { createViewerApp } from "@document-kits/viewer"; -import "@document-kits/viewer/viewer.css"; -import "./style.css"; - -let src = "./document-viewer/web/compressed.tracemonkey-pldi-09.pdf"; -const appOptions = { - src, - resourcePath: "document-viewer", - disableCORSCheck: true, - disableAutoSetTitle: true, -}; - -createViewerApp({ parent: document.getElementById("app1"), ...appOptions }); -createViewerApp({ parent: document.getElementById("app2"), ...appOptions }); diff --git a/examples/package.json b/examples/package.json deleted file mode 100644 index 6e73f48..0000000 --- a/examples/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "examples", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite --force", - "build": "vite build", - "preview": "vite preview" - }, - "dependencies": { - "@document-kits/viewer": "0.8.0" - }, - "devDependencies": { - "vite-plugin-static-copy": "^0.7.0" - } -} diff --git a/examples/style.css b/examples/style.css deleted file mode 100644 index 73f14df..0000000 --- a/examples/style.css +++ /dev/null @@ -1,16 +0,0 @@ -html, -body, -#app1, -#app2 { - height: 100%; -} - -#app2 { - width: 50%; - float: right; -} - -#app1 { - width: 50%; - float: left; -} diff --git a/examples/vite.config.js b/examples/vite.config.js deleted file mode 100644 index a89f079..0000000 --- a/examples/vite.config.js +++ /dev/null @@ -1,32 +0,0 @@ -import { defineConfig } from "vite"; -import { viteStaticCopy } from "vite-plugin-static-copy"; - -export default defineConfig({ - plugins: [ - viteStaticCopy({ - targets: [ - { - src: "node_modules/@document-kits/viewer/dist/generic/*", - dest: "document-viewer", - }, - ], - }), - ], - optimizeDeps: { - include: ["@document-kits/viewer"], - }, - build: { - commonjsOptions: { - include: [/document-viewer/], - }, - }, - base: "/document-viewer/demos/", - resolve: { - alias: [ - { - find: /^canvas$/, - replacement: "canvas.js", - }, - ], - }, -}); diff --git a/package.json b/package.json index 3773b1d..8685010 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,8 @@ "viewer:build": "pnpm --filter @document-kits/viewer run build", "release": "node scripts/release.mjs", "cli:build": "pnpm --filter @document-kits/create-viewer run build", - "examples:dev": "pnpm run viewer:build && pnpm --filter examples run dev", "demos:dev": "pnpm --filter demos run dev", "demos:build": "pnpm --filter demos run build", - "examples:build": "pnpm --filter examples run build", "docs:dev": "pnpm --filter viewer-docs run dev", "docs:extract": "pnpm --filter @document-kits/viewer run api", "docs:build": "pnpm --filter viewer-docs run build", diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c83c652..16c6430 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,5 +2,4 @@ packages: # all packages in direct subdirs of packages/ - 'packages/*' - 'docs/**' - - 'examples/**' - 'demos/**' \ No newline at end of file