Skip to content

Commit

Permalink
Merge pull request #5636 from artsy/retire-reaction
Browse files Browse the repository at this point in the history
[Refactor] Retire reaction and merge files into Force
  • Loading branch information
damassi authored May 23, 2020
2 parents 90e7327 + 4ad68f3 commit aa20dda
Show file tree
Hide file tree
Showing 1,723 changed files with 360,764 additions and 17,417 deletions.
52 changes: 0 additions & 52 deletions .babelrc

This file was deleted.

66 changes: 42 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,35 +112,52 @@ only_release: &only_release
workflows:
default:
jobs:
- yarn/workflow-queue
- horizon/block:
<<: *only_release
context: horizon
project_id: 11

# Pre-staging
- hokusai/test:
name: test
<<: *not_staging_or_release
post-steps:
- run: mkdir -p ./coverage ./.nyc_output ./reports
- run:
name: Copy jest coverage artifacts
command: docker cp hokusai_force_1:/app/coverage ./
when: always
- codecov/upload:
file: ./coverage/lcov.info
- run:
name: Copy mocha coverage artifacts
command: docker cp hokusai_force_1:/app/.nyc_output ./
when: always
- codecov/upload:
file: ./.nyc_output/lcov.info
- run:
name: Copy coverage reports
command: docker cp hokusai_force_1:/app/reports ./
when: always
- store_test_results:
path: ./reports
- yarn/jest:
args: --runInBand
requires:
- yarn/workflow-queue

- yarn/run:
name: test:mocha
script: "test:mocha"
requires:
- yarn/workflow-queue

# TODO: Disabled due to memory issues. Can we use our workflows above and
# upload coverage that way (similar to reaction). We save a lot of time
# by operating outside of an unnecessary docker context.

# - hokusai/test:
# name: test
# <<: *not_staging_or_release
# post-steps:
# - run: mkdir -p ./coverage ./.nyc_output ./reports
# - run:
# name: Copy jest coverage artifacts
# command: docker cp hokusai_force_1:/app/coverage ./
# when: always
# - codecov/upload:
# file: ./coverage/lcov.info
# - run:
# name: Copy mocha coverage artifacts
# command: docker cp hokusai_force_1:/app/.nyc_output ./
# when: always
# - codecov/upload:
# file: ./.nyc_output/lcov.info
# - run:
# name: Copy coverage reports
# command: docker cp hokusai_force_1:/app/reports ./
# when: always
# - store_test_results:
# path: ./reports

- yarn/update-cache:
<<: *not_staging_or_release
- yarn/type-check:
Expand All @@ -159,7 +176,8 @@ workflows:
name: push-staging-image
<<: *only_master
requires:
- test
- yarn/jest
- test:mocha
- acceptance
- build

Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/__generated__/*.graphql.ts linguist-generated
src/v2/__generated__/*.graphql.ts linguist-generated
47 changes: 24 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
lib-cov
*.seed
*.log
.artifact
.artifacts
.cache
.cache-loader
.DS_Store
.env
.env.*
.storybook/.DS_Store
.storybook/manager.jss
.yalc
*.csv
*.dat
*.DS_Store
*.gz
*.log
*.out
*.pid
*.gz
*.projectile
*.DS_Store
.env
.env.*
pids
logs
results
npm-debug.log
.DS_Store
*.seed
dump.rdb
lib-cov
logs
manifest.json
.cache
.cache-loader
.artifacts

/data
npm-debug.log
pids
results
storybook_build
yalc.lock

/dist
/node_modules
/public
/src/desktop/public/assets
/src/mobile/public/assets

node_modules
/node_modules
/public

# Compiled server code
server.dist.js
Expand All @@ -41,6 +45,3 @@ cypress/screenshots
reports*
junit.xml
cypress/videos

.yalc
yalc.lock
2 changes: 2 additions & 0 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import "@storybook/addon-options/register"
import "@storybook/addon-viewport/register"
35 changes: 35 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Events from "v2/Utils/Events"
import { configure, addParameters } from "@storybook/react"
import { createMediaStyle } from "v2/Utils/Responsive"

const req = require.context("../", true, /\.story\.tsx$/)

function loadStories() {
req.keys().forEach(filename => {
return req(filename)
})
}

// Add RRM styles to Storybooks head
const rrmStyle = document.createElement("style")
rrmStyle.innerHTML = createMediaStyle()
document.head.appendChild(rrmStyle)

addParameters({
inline: true,
brandTitle: "Reaction",
showAddonPanel: false,
sortStoriesByKind: true,
})

setTimeout(() => {
configure(loadStories, module)
})

Events.onEvent(data => {
console.log("Tracked event", data)
})

if (!window.sd || !(typeof window.sd === "object")) {
window.sd = {}
}
16 changes: 16 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<link
rel="stylesheet"
type="text/css"
href="https://webfonts.artsy.net/all-webfonts.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css"
/>
<script id="stripe-js" src="https://js.stripe.com/v3/" async></script>
17 changes: 17 additions & 0 deletions .storybook/sharify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const crypto = require("crypto")
const fs = require("fs")
const os = require("os")
const path = require("path")

module.exports = data => {
const blob = JSON.stringify(data)
const blobHash = crypto
.createHash("md5")
.update(blob)
.digest("hex")
const pathname = path.join(os.tmpdir(), `${blobHash}.js`)
fs.writeFileSync(pathname, `module.exports = { data: ${blob} }`, {
encoding: "utf8",
})
return pathname
}
Loading

0 comments on commit aa20dda

Please sign in to comment.