Skip to content

Commit

Permalink
Receiving snake color as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Sutil committed Dec 31, 2021
1 parent 4b143b6 commit 52c7b66
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/action/__tests__/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { generateContributionSnake } from "../generateContributionSnake";
const outputSvg = path.join(__dirname, "__snapshots__/out.svg");
const outputGif = path.join(__dirname, "__snapshots__/out.gif");

const buffer = await generateContributionSnake("platane", {
const buffer = await generateContributionSnake("platane", "#ffd900", {
svg: true,
gif: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ it(
const outputGif = path.join(__dirname, "__snapshots__/out.gif");

console.log = () => undefined;
const buffer = await generateContributionSnake("platane", {
const buffer = await generateContributionSnake("platane", "#ffd900", {
svg: true,
gif: true,
});
Expand Down
2 changes: 2 additions & 0 deletions packages/action/generateContributionSnake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const generateContributionSnake = async (
const grid = userContributionToGrid(cells, colorScheme);
const snake = snake4;

console.log('>>> The snake will be', snakeColor);

const drawOptions = {
sizeBorderRadius: 2,
sizeCell: 16,
Expand Down

0 comments on commit 52c7b66

Please sign in to comment.