Skip to content

Commit

Permalink
Initial Happo config
Browse files Browse the repository at this point in the history
  • Loading branch information
Suzanne Rozier committed Sep 30, 2020
1 parent 185dd6f commit d9b26b7
Show file tree
Hide file tree
Showing 5 changed files with 243 additions and 20 deletions.
28 changes: 28 additions & 0 deletions .happo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const { RemoteBrowserTarget } = require('happo.io');
const happoPluginStorybook = require('happo-plugin-storybook');

require('dotenv').config();

module.exports = {
apiKey: process.env.HAPPO_API_KEY,
apiSecret: process.env.HAPPO_API_SECRET,
targets: {
chrome: new RemoteBrowserTarget('chrome', {
viewport: '1024x768',
}),
// TODO - IE is failing because Storybook causes syntax error. Need to investigate
/*
'internet explorer': new RemoteBrowserTarget('internet explorer', {
viewport: '1024x768',
}),
*/
'ios-safari': new RemoteBrowserTarget('ios-safari', {
viewport: '375x667',
}),
},
plugins: [
happoPluginStorybook({
outputDir: 'storybook-static',
}),
],
};
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ repos:
cypress/|
.storybook/|
wallaby.js|
config-overrides.js
config-overrides.js|
.happo.js
)
- repo: local
Expand Down Expand Up @@ -122,11 +123,11 @@ repos:
language: script
pass_filenames: false

- repo: local
hooks:
- repo: local
hooks:
- id: spectral
name: Spectral yaml linter
entry: scripts/lint-yaml-with-spectral
language: script
files: swagger/(support|prime).yaml
types: [yaml]
types: [yaml]
2 changes: 2 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import { configure, addDecorator } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import 'happo-plugin-storybook/register';

import './storybook.scss';
import '../src/index.scss';
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"lint": "eslint --ext .js,.jsx src",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"happo": "happo",
"spellcheck": "mdspell --ignore-numbers --ignore-acronyms --en-us --no-suggestions"
},
"version": "0.1.0",
Expand All @@ -123,6 +124,7 @@
"cypress-wait-until": "^1.7.1",
"danger": "^10.3.0",
"danger-plugin-jira-issue": "^1.4.1",
"dotenv": "^8.2.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"eslint-config-airbnb": "^18.2.0",
Expand All @@ -131,6 +133,8 @@
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
"happo-plugin-storybook": "^2.5.3",
"happo.io": "^5.6.4",
"lodash-webpack-plugin": "^0.11.5",
"loki": "^0.25.1",
"markdown-spellcheck": "^1.3.1",
Expand Down
Loading

0 comments on commit d9b26b7

Please sign in to comment.