-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LTSVIEWER-315 Upgrading packages to secure versions. (#10)
* LTSVIEWER-315 Upgrading packages to secure versions. * LTSVIEWER-315 updating version to 1.0.2.
- Loading branch information
1 parent
bc30eea
commit e3a27d1
Showing
18 changed files
with
10,088 additions
and
11,787 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish to npmjs on release | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- run: | | ||
git config user.name "Github Action" | ||
git config user.email actions@github.com | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Create new version | ||
run: | | ||
TAG_NAME="${GITHUB_REF##*/}" | ||
npm version "$TAG_NAME" | ||
git push origin HEAD:${{ github.event.release.target_commitish }} | ||
- name: Publish to npm | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/coverage | ||
/demo/dist | ||
/es | ||
/lib | ||
/node_modules | ||
/umd | ||
dist | ||
es | ||
node_modules | ||
npm-debug.log* | ||
|
||
.idea/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/hydrogen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,42 @@ | ||
# mirador-hide-nav-plugin | ||
A Mirador 3 plugin that hides viewer navigation manifest-defined single images. | ||
|
||
## Requirements | ||
|
||
- [NVM](https://github.com/nvm-sh/nvm) | ||
|
||
## Setup | ||
|
||
1. Run `nvm use` to ensure your version of matches that in the `.nvmrc` file | ||
2. Run `npm i` to install dependencies | ||
3. Use one of the [NPM scripts](#npm-scripts) to perform the actions described below. | ||
|
||
## NPM scripts | ||
|
||
The following are some useful scripts can be ran using `npm run <script>`. A full list can be seen in [package.json](./package.json) | ||
|
||
| Script | Description | | ||
| ------- | -------------------------------------------------------------------------------------------------------------------------- | | ||
| `clean` | Removes the `dist` directories | | ||
| `build` | Builds the source files into the `./dist` directory | | ||
| `serve` | Runs a local web server where the plugin can be viewed in a vanilla Mirador instance (helpful for testing and development) | | ||
| `test` | Runs the automated test suites | ||
|
||
## Installing in Mirador | ||
|
||
The `mirador-hide-nav-plugin` requires an instance of Mirador 3. Visit the [Mirador wiki](https://github.com/ProjectMirador/mirador/wiki) to learn how to [install an existing plugin](https://github.com/ProjectMirador/mirador/wiki/Mirador-3-plugins#installing-an-existing-plugin) and for additional information about plugins. | ||
|
||
Package you will need to install: | ||
|
||
```bash | ||
npm i @harvard-lts/mirador-hide-nav-plugin | ||
``` | ||
|
||
## Contribute | ||
Mirador's development, design, and maintenance is driven by community needs and ongoing feedback and discussion. Join us at our regularly scheduled community calls, on [IIIF slack #mirador](http://bit.ly/iiif-slack), or the [mirador-tech](https://groups.google.com/forum/#!forum/mirador-tech) and [iiif-discuss](https://groups.google.com/forum/#!forum/iiif-discuss) mailing lists. To suggest features, report bugs, and clarify usage, please submit a GitHub issue. | ||
|
||
[build-badge]: https://img.shields.io/travis/projectmirador/mirador-share-plugin/master.png?style=flat-square | ||
[build]: https://travis-ci.org/projectmirador/mirador-share-plugin | ||
|
||
[npm-badge]: https://img.shields.io/npm/v/mirador-share-plugin.png?style=flat-square | ||
[npm]: https://www.npmjs.org/package/mirador-share-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": "auto" | ||
} | ||
], | ||
["@babel/preset-react", { "runtime": "automatic" }] | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Mirador from "mirador/dist/es/src/index"; | ||
import Plugin from "../src/index"; | ||
|
||
document.addEventListener("DOMContentLoaded", () => { | ||
const config = { | ||
id: "mirador", | ||
windows: [ | ||
{ | ||
manifestId: "https://iiif.lib.harvard.edu/manifests/ids:10274486", | ||
}, | ||
] | ||
}; | ||
|
||
const plugins = [...Plugin]; | ||
|
||
Mirador.viewer(config, plugins); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Test</title> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
#mirador { | ||
height: 100vh; | ||
width: 100vw; | ||
} | ||
</style> | ||
<script src="demo.js"></script> | ||
</head> | ||
<body> | ||
<div id="mirador"></div> | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** @type {import('jest').Config} */ | ||
module.exports = { | ||
testEnvironment: "jsdom", | ||
transformIgnorePatterns: ["node_modules/(?!mirador)/", "node_modules/pdiiif"], | ||
setupFilesAfterEnv: ["@testing-library/jest-dom", "./setupTests"], | ||
// collectCoverage: true, | ||
// coverageDirectory: "coverage", | ||
// verbose: true, | ||
// testRegex: "(/tests/.*|\\.(test|spec))\\.jsx?$", | ||
// moduleFileExtensions: ["js", "json", "jsx", "node"], | ||
// coverageThreshold: { | ||
// global: { | ||
// branches: 30, | ||
// functions: 90, | ||
// lines: 90, | ||
// statements: 90, | ||
// }, | ||
// }, | ||
// // setupFiles: ["./setupTests"], | ||
}; | ||
|
Oops, something went wrong.