@internetarchive/ia-book-downloads

0.1.5 • Public • Published

Build Status codecov

<ia-book-downloads>

This webcomponent follows the open-wc recommendation.

Installation

npm i ia-book-downloads

or

yarn add @internetarchive/ia-book-downloads

Usage

<script type="module">
  import 'ia-book-downloads/ia-book-downloads.js';
</script>

<ia-book-downloads></ia-book-downloads>

Supply the element with an optional array of download options to immediately render. Each result can have these properties:

{
  type: 'Encrypted Adobe PDF', // Button text
  url: '#', // The URL to the downloadable item
  note: 'PDF files contain high quality images of pages.', // Optional note to render below the button
}

Styling

ia-book-downloads {
  --downloadButtonColor: #fff;
  --downloadButtonBg: #547fba;
  --externalButtonColor: #547fba;
  --externalButtonBg: #fff;
}

Linting with ESLint

To scan the project for linting errors, run

npm run lint

Testing with Karma

To run the suite of karma tests, run

npm run test

To run the tests in watch mode (for TDD, for example), run

npm run test:watch

Tooling configs

For most of the tools, the configuration is in the package.json to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

Local Demo with es-dev-server

npm start

To run a local development server that serves the basic demo located in demo/index.html

Readme

Keywords

none

Package Sidebar

Install

npm i @internetarchive/ia-book-downloads

Weekly Downloads

12

Version

0.1.5

License

AGPL-3.0-only

Unpacked Size

49.8 kB

Total Files

13

Last publish

Collaborators

  • rebecca-shoptaw
  • jeffwklein
  • jim-at-ia
  • tracey.pooh
  • latonv
  • ibnesayeed
  • bfalling
  • mitraardron
  • vbanos
  • kngenie
  • iisa
  • cdrini
  • nsharma123
  • dualcnhq