-
Notifications
You must be signed in to change notification settings - Fork 256
Installation and build options available for Mirador
Jack Reed edited this page Dec 1, 2020
·
1 revision
The Mirador package can be installed and used in a few different ways. Your approach will vary depending on the customization you need. We usually recommend installing Mirador into a project using npm or yarn.
$ npm install mirador
# or
$ yarn add mirador
The dist
folder in the installed package contains three different builds of Mirador that are provided with the package:
-
mirador.min.js
- the main packaged version of mirador using the Universal Module Definition (umd) format. This build is the easiest way to get started with Mirador and supports customization using Mirador settings and theming. It includes all of Mirador’s dependencies and browser compatibility polyfills. However, it is limiting as we cannot use Mirador plugins with this build and JavaScript bundlers will not be able to “treeshake” dependencies using this. -
cjs
directory - the CommonJS build for Mirador that includes the Mirador source code transpiled into the CommonJS format. This build can be used with plugins. -
es
directory - the “es modules” build for Mirador that includes the Mirador source code. This build can be used with plugins and is the one that we recommend using when integrating Mirador with plugins.
You can see an example of the es modules integration approach at https://github.com/ProjectMirador/mirador-integration using both webpack and parcel.