mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Initial browserify example.
This commit is contained in:
parent
2dd03e1785
commit
d7d7935648
8 changed files with 131 additions and 0 deletions
25
examples/browserify/README.md
Normal file
25
examples/browserify/README.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
## Overview
|
||||
|
||||
Example to demonstrate PDF.js library usage with browserify.
|
||||
|
||||
## Getting started
|
||||
|
||||
Build project and install the example dependencies:
|
||||
|
||||
$ gulp dist
|
||||
$ cd examples/browserify
|
||||
$ npm install
|
||||
|
||||
To build browserify bundles, run `gulp build`. If you are running
|
||||
a web server, you can observe the build results at
|
||||
http://localhost:8888/examples/browserify/index.html
|
||||
|
||||
See main.js, worker.js and gulpfile.js files. Please notice that PDF.js
|
||||
packaging requires packaging of the main application and PDF.js worker code,
|
||||
and the workerSrc path shall be set to the latter file.
|
||||
|
||||
Alternatives to the gulp commands (without compression) are:
|
||||
|
||||
$ mkdir -p ../../build/browserify
|
||||
$ node_modules/.bin/browserify main.js -o ../../build/browserify/bundle.js
|
||||
$ node_modules/.bin/browserify worker.js -o ../../build/browserify/pdf.worker.bundle.js
|
Loading…
Add table
Add a link
Reference in a new issue