Publishing repository for shared web assets
The docs/
directory is served by GitHub Pages at patternplate.github.io/media
git clone [email protected]:patternplate/media.git
cd media
yarn
- Create a fixture folder e.g. via
npx create-patternplate --out=fixtures/my
- Create a
screenshot.config.js
. - Execute
yarn shoot my
- Result is saved at
docs/images/my.svg
module.exports = {
// Node.js URL object. Screenshot will be taken from this address
// Reserved: host, hostname, port, protocol
url: {
hash: "hash",
query: {
key: "value"
},
pathname: "some/path"
},
svg: {
outWidth: 800, // width attr of result svg,
outHeight: 600, // height attr or result svg
viewBox: "0 0 800 600", // viewBox of result svg
preserveAspectRatio: "minXminY meet"
}
};