2.1.13 • Published 8 months ago

gatsby-plugin-argos v2.1.13

Weekly downloads
2
License
MIT
Repository
github
Last release
8 months ago

gatsby-plugin-argos

Push your gatsby screenshots to Argos, and check for visual regression before releasing.

Install

If you already have a screenshots available:

npm install --save-dev gatsby-plugin-argos

If you don't have screenshots available:

npm install --save-dev gatsby-plugin-argos gatsby-plugin-screenshot

How to use

Just add the plugin to the plugins array in your gatsby-config.js.

Here's a travis example with available screenshots:

// in your gatsby-config.js
module.exports = {
  plugins: [
    ...(process.env.CI
      ? [
          {
            resolve: "gatsby-plugin-argos",
            options: {
              branch: process.env.TRAVIS_BRANCH,
              commit: process.env.TRAVIS_COMMIT,
              dir: "./where-your-screenshots-are",
              token: process.env.ARGOS_TOKEN,
            },
          },
        ]
      : []),
  ],
};

Here's a travis example without available screenshots:

// in your gatsby-config.js
module.exports = {
  plugins: [
    ...(process.env.CI
      ? [
          {
            resolve: "gatsby-plugin-argos",
            options: {
              branch: process.env.TRAVIS_BRANCH,
              commit: process.env.TRAVIS_COMMIT,
              token: process.env.ARGOS_TOKEN,
            },
          },
        ]
      : []),
  ],
};

You can also override gatsby-plugin-screenshot options if needed:

// in your gatsby-config.js
module.exports = {
  plugins: [
    ...(process.env.CI
      ? [
          {
            resolve: "gatsby-plugin-argos",
            options: {
              branch: process.env.TRAVIS_BRANCH,
              browser: {
                args: [
                  "--no-sandbox",
                  "--disable-setuid-sandbox",
                  "--start-fullscreen",
                ],
              },
              commit: process.env.TRAVIS_COMMIT,
              dir: "./screenshots",
              port: 8000,
              token: process.env.ARGOS_TOKEN,
            },
          },
        ]
      : []),
  ],
};
2.1.13

8 months ago

2.1.12-alpha.0

10 months ago

2.1.12

10 months ago

2.1.11

10 months ago

2.1.10

1 year ago

2.1.9

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.6-alpha.4

1 year ago

2.1.6-alpha.1

1 year ago

2.1.6-alpha.2

1 year ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.6

1 year ago

2.1.5

1 year ago

2.1.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago