React component for viewing different types of files (HTML, media, documents, etc.).
Install NPM dependencies:
npm install
This project uses the Jest unit testing framework. To run the unit tests:
npm run test:unit
Code is also linted using eslint:
npm run lint
Both unit tests and linting is performed during CI builds as part of the test
script:
npm test
Included is a sample application which allows you to launch the file viewer with many different file types. To build the sample application, run:
npm run build-sample
To serve the sample application, run:
npm run serve
Then open http://localhost:8080/
in your browser.
FlieViewer has the following parameters:
progressCallback
Takes a callback function, which should accept a decimal, indicating the percentage loaded out of 100. May or may not be accurate.
Contributions are welcome, please submit a pull request!
This repository is configured with EditorConfig and eslint rules and contributions should make use of them.