diff --git a/.gitignore b/.gitignore index adce588d9e..467827414e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Mocha-specific docs/_site -docs/_dist docs/images/supporters docs/api mocha.js diff --git a/.mocharc.yml b/.mocharc.yml index dfb82e07f6..5f788099d3 100644 --- a/.mocharc.yml +++ b/.mocharc.yml @@ -7,7 +7,6 @@ global: timeout: 1000 watch-ignore: - '.*' - - 'docs/_dist/**' - 'docs/_site/**' - 'node_modules' - 'coverage' diff --git a/docs/README.md b/docs/README.md index 0c3e69e53f..27d1a62b1b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,22 +18,7 @@ _So you wanna build the site?_ - The content lives in `docs/index.md`; everything else is markup, scripts, assets, etc. - This file (`docs/README.md`) should _not_ be included in the build. -- `docs/_dist` is where the deployed site lives. `docs/_site` is essentially a build step. These directories are _not_ under version control. -- If you get the error message below when running `npm start docs`, follow [this guide](https://www.npmjs.com/package/gm) to install GraphicsMagick or ImageMagick. - -```console -⚠ WARN: docs/_site/images/matomo-logo.png: Error executing Stream: The gm stream ended without emitting any data -(node:45255) UnhandledPromiseRejectionWarning: Error: docs/_site/images/matomo-logo.png: Error executing Stream: The gm stream ended without emitting any data - at Socket.stdout.on.once (/Users/username/mocha/node_modules/express-processimage/lib/getFilterInfosAndTargetContentTypeFromQueryString.js:821:31) - at Object.onceWrapper (events.js:286:20) - at Socket.emit (events.js:203:15) - at endReadableNT (_stream_readable.js:1145:12) - at process._tickCallback (internal/process/next_tick.js:63:19) -(node:45255) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) -(node:45255) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. -cp: docs/_dist/_headers: No such file or directory -``` - +- `docs/_site_` is where the deployed site lives. This directories are _not_ under version control. - See `package-scripts.js` for details on what the builds are actually doing. ## License diff --git a/docs/_data/supporters.js b/docs/_data/supporters.js index d31bebd524..6ee9c712db 100755 --- a/docs/_data/supporters.js +++ b/docs/_data/supporters.js @@ -17,7 +17,6 @@ 'use strict'; -const {loadImage} = require('canvas'); const {writeFile, mkdir, rm} = require('fs').promises; const {resolve} = require('path'); const debug = require('debug')('mocha:docs:data:supporters'); @@ -115,13 +114,6 @@ const fetchImage = process.env.MOCHA_DOCS_SKIP_IMAGE_DOWNLOAD ); } debug('fetched %s', url); - const canvasImage = await loadImage(imageBuf); - debug('ok %s', url); - supporter.dimensions = { - width: canvasImage.width, - height: canvasImage.height - }; - // debug('dimensions %s %dw %dh', url, canvasImage.width, canvasImage.height); const filePath = resolve(SUPPORTER_IMAGE_PATH, supporter.id + '.png'); await writeFile(filePath, imageBuf); debug('wrote %s', filePath); diff --git a/docs/_includes/supporters.md b/docs/_includes/supporters.md index 96d13eb5d9..3ef3e050ba 100644 --- a/docs/_includes/supporters.md +++ b/docs/_includes/supporters.md @@ -2,13 +2,13 @@ Use Mocha at Work? Ask your manager or marketing team if they'd help [support](https://opencollective.com/mochajs#support) our project. Your company's logo will also be displayed on [npmjs.com](http://npmjs.com/package/mocha) and our [GitHub repository](https://github.com/mochajs/mocha#sponsors). -