lumeland / lume.land

The website of lume.land
https://lume.land
MIT License
72 stars 68 forks source link

ScopeFilter function example should return a boolean #61

Closed bryophyta closed 1 year ago

bryophyta commented 1 year ago

The example code for passing a ScopeFilter function to site.ignore doesn't compile. The signature for ScopeFilter specifies that it should return a boolean, but String.prototype.match returns either an Array or null.

export type ScopeFilter = (path: string) => boolean;

https://github.com/lumeland/lume/blob/be25eb894e6886cdaf4552188b88ad4e5b61b39c/core/scopes.ts#L61

This branch updates the example function to return a boolean, but should otherwise preserve the intended functionality for the example filter.

netlify[bot] commented 1 year ago

Deploy Preview for lumeland ready!

Name Link
Latest commit 93b8ddf262005aba9a43aa2377668b726a25e3bc
Latest deploy log https://app.netlify.com/sites/lumeland/deploys/643166ec5bf5ca000821529c
Deploy Preview https://deploy-preview-61--lumeland.netlify.app/docs/configuration/ignore-files
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

oscarotero commented 1 year ago

Fair enough. Thanks!

bryophyta commented 1 year ago

thanks for the prompt review 👍