Skip to content
No description, website, or topics provided.
JavaScript HTML CSS Shell
Branch: master
Clone or download
Latest commit 916c3f5 Aug 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update PULL_REQUEST_TEMPLATE.md (#287) May 21, 2019
_mocks_ [#119] - Preloading the template chunk for the certificate file (#121) Apr 5, 2019
pages
scripts Not running e2e tests on local (#5) Jul 9, 2019
src
static
test Added demo (#6) Jul 9, 2019
.babelrc
.eslintignore
.eslintrc
.gitattributes
.gitignore
.nvmrc
.travis.yml
LICENSE Add year and owner to license Mar 20, 2018
README.md
jest.config.js
jest.setup.js
next.config.js next.config Jul 8, 2019
package-lock.json
package.json
sonar-project.properties Fixing exclusion indexing (#221) Apr 30, 2019
styles.scss

README.md

Legacy Renderer Repository

This application serves up the OpenCert template renderers for SSG Accredited institutions submitted prior to 31st Dec 2019.

See also:

Setup

OS X / Linux

npm install
npm run dev

Windows

For Windows you need to set up the toolchain for node-gyp before installing this repository, follow the instructions in https://github.com/nodejs/node-gyp#on-windows.

npm install
npm run dev

Development

The expected output of running npm run dev is a blank screen, as this page is not a standalone application. It expects the caller to inject the certificate that is meant to be rendered. For development purposes, there are two methods to effect the rendering of a certificate:

  1. Inject the certificate using the browser developer console, by running the command window.opencerts.renderDocument(certificate), where the certificate variable has been initialised with the certificate contents
  2. Run this legacy-templates repository using npm run dev and keep it running, then run the opencerts-website repository concurrently with the npm run start:local command. You can then preview rendering using the usual OpenCerts.io UI at http://localhost:3001.

Troubleshooting

To enable debug logs in the browser, set localStorage.debug="*"

Module build failed

If you see module build failure message like:

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: ENOENT: no such file or directory, scandir 'D:\opencerts-website\node_modules\node-sass\vendor'
at Object.readdirSync (fs.js:783:3)

Try running npm rebuild

You can’t perform that action at this time.