Install happo and plugin:
yarn add --dev happo.io happo-plugin-storybook
.happo.js config
const { RemoteBrowserTarget } = require('happo.io');
const happoPluginStorybook = require('happo-plugin-storybook');
| <div | |
| style=" | |
| width: 42px; | |
| height: 42px; | |
| box-sizing: border-box; | |
| border-radius: 50%; | |
| overflow: hidden; | |
| background-color: white; | |
| padding: 6px 0 5px 0; | |
| " |
| #!/bin/bash | |
| # Make the whole script fail on errors | |
| set -euo pipefail | |
| PREVIOUS_SHA=$(git merge-base origin/master "${CIRCLE_SHA1}") | |
| export PREVIOUS_SHA | |
| export CURRENT_SHA="$(git rev-parse ${1-HEAD})" | |
| export CHANGE_URL="$GERRIT_CHANGE_URL" |
Install happo and plugin:
yarn add --dev happo.io happo-plugin-storybook
.happo.js config
const { RemoteBrowserTarget } = require('happo.io');
const happoPluginStorybook = require('happo-plugin-storybook');
First, install the latest happo packages:
yarn add --dev happo-plugin-storybook@latest happo.io@latestAdd the plugin to .happo.js:
const happoPluginStorybook = require('happo-plugin-storybook');| const path = require('path'); | |
| const { RemoteBrowserTarget } = require('happo.io'); | |
| const happoScrapePlugin = require('happo-plugin-scrape'); | |
| function commonWrapper(html) { | |
| return ` | |
| <div class="application-wrapper"> | |
| <div style="width:100%" class="od-homepage">${html}</div> | |
| </div> | |
| `; |
| const AWS = require('aws-sdk'); | |
| const { | |
| S3_REGION: region, | |
| S3_BUCKET_NAME: Bucket, | |
| S3_ACCESS_KEY_ID: accessKeyId, | |
| S3_SECRET_ACCESS_KEY: secretAccessKey, | |
| } = process.env; | |
| AWS.config.update({ | |
| region, |
| <html> | |
| <style> | |
| * { | |
| box-sizing: border-box; | |
| } | |
| .nitem { | |
| #!/bin/bash | |
| browser=$1 | |
| if [ -z "$browser" ]; then | |
| echo "Usage: ./deploy.sh <browser>" | |
| exit 1 | |
| fi | |
| set -euo pipefail | |
| # Copy the right files |
| const octokit = require('@octokit/rest'); | |
| const jsonwebtoken = require('jsonwebtoken'); | |
| const PEM = `-----BEGIN RSA PRIVATE KEY----- | |
| <REDACTED> | |
| -----END RSA PRIVATE KEY-----`; | |
| function generateJwtToken() { | |
| // Sign with RSA SHA256 | |
| return jsonwebtoken.sign( |
| import request from 'request-promise-native'; | |
| import jwt from 'jsonwebtoken'; | |
| export default function makeRequest(requestAttributes, { apiKey, apiSecret }) { | |
| const signed = jwt.sign({ key: apiKey }, apiSecret, { header: { kid: apiKey } }); | |
| return request( | |
| Object.assign({ | |
| auth: { | |
| bearer: signed, | |
| }, |