Skip to content

Commit

Permalink
fix(app): gitigonore
Browse files Browse the repository at this point in the history
  • Loading branch information
misteroh10302 committed Jul 31, 2019
2 parents 1b04dc0 + 9f56bba commit e0b5ca7
Show file tree
Hide file tree
Showing 141 changed files with 29,123 additions and 2,848 deletions.
2 changes: 1 addition & 1 deletion .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-empty': [2, 'never'],
'scope-enum': [2, 'always', ['repo', 'sanity', 'app']],
'scope-enum': [2, 'always', ['repo', 'sanity', 'app', 'proxy']],
},
}
136 changes: 68 additions & 68 deletions .github/main.workflow
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
workflow "Test & Deploy" {
on = "push"
resolves = [
# "deploy:production",
"deploy:staging",
]
}

# action "Master" {
# uses = "actions/bin/filter@master"
# args = "branch master"
# workflow "Test & Deploy" {
# on = "push"
# resolves = [
# # "deploy:production",
# "deploy:staging",
# ]
# }

action "Develop" {
uses = "actions/bin/filter@master"
args = "branch develop"
}

action "Build: Staging" {
needs = "Develop"
uses = "actions/npm@master"
args = "install"
runs = "yarn"
# # action "Master" {
# # uses = "actions/bin/filter@master"
# # args = "branch master"
# # }

# action "Master" {
# uses = "actions/bin/filter@master"
# args = "branch master"
# }
}
# action "Develop" {
# uses = "actions/bin/filter@master"
# args = "branch develop"
# }

action "Test: Staging" {
needs = "Build: Staging"
uses = "actions/npm@master"
args = "test"
runs = "yarn"
# action "Build: Staging" {
# needs = "Develop"
# uses = "actions/npm@master"
# args = "install"
# runs = "yarn"

# action "Master" {
# uses = "actions/bin/filter@master"
# args = "branch master"
# }
}
# # action "Master" {
# # uses = "actions/bin/filter@master"
# # args = "branch master"
# # }
# }

# action "Test: Production" {
# needs = "Master"
# action "Test: Staging" {
# needs = "Build: Staging"
# uses = "actions/npm@master"
# args = "test"
# runs = "yarn"

# # action "Master" {
# # uses = "actions/bin/filter@master"
# # args = "branch master"
# # }
# }

action "deploy:staging" {
uses = "actions/zeit-now@master"
needs = "Test: Staging"
args = "--target staging"
secrets = ["ZEIT_TOKEN"]
# # action "Test: Production" {
# # needs = "Master"
# # uses = "actions/npm@master"
# # args = "test"
# # }

# action "Master" {
# uses = "actions/bin/filter@master"
# args = "branch master"
# }
# action "deploy:staging" {
# uses = "actions/zeit-now@master"
# needs = "Test: Staging"
# args = "--target staging"
# secrets = ["ZEIT_TOKEN"]

# action "Master" {
# uses = "actions/bin/filter@master"
# args = "branch master"
# }
# # action "Master" {
# # uses = "actions/bin/filter@master"
# # args = "branch master"
# # }

# action "Master" {
# uses = "actions/bin/filter@master"
# args = "branch master"
# }
# # action "Master" {
# # uses = "actions/bin/filter@master"
# # args = "branch master"
# # }

# action "Test: Production" {
# needs = "Master"
# uses = "actions/npm@master"
# args = "test"
# }
}
# # action "Master" {
# # uses = "actions/bin/filter@master"
# # args = "branch master"
# # }

# action "deploy:production" {
# uses = "actions/zeit-now@master"
# needs = "Test: Production"
# secrets = [
# "ZEIT_TOKEN",
# ]
# args = "--local-config ./app/now.json --target production"
# # action "Test: Production" {
# # needs = "Master"
# # uses = "actions/npm@master"
# # args = "test"
# # }
# }

# # action "deploy:production" {
# # uses = "actions/zeit-now@master"
# # needs = "Test: Production"
# # secrets = [
# # "ZEIT_TOKEN",
# # ]
# # args = "--local-config ./app/now.json --target production"
# # }
4 changes: 0 additions & 4 deletions .gitignore

This file was deleted.

3 changes: 3 additions & 0 deletions .netlify/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"siteId": "4bfd26bf-4fe8-42f5-97b7-a552f7cc4309"
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 130,
"printWidth": 80,
"arrowParens": "always"
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
- `npm run setup`
- :)

## Local Development

To work locally, start up both the local proxy server and the frontend react app:

- `yarn start:proxy` (or `cd proxy && yarn start`)
- Then, in another terminal:
- `yarn start:app` (or `cd proxy && yarn start`)

## Commits

General commit guidelines:
Expand Down
2 changes: 1 addition & 1 deletion app/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
}
]
],
"plugins": ["babel-plugin-styled-components"]
"plugins": ["styled-components"]
}
2 changes: 1 addition & 1 deletion app/.graphqlconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"extensions": {
"endpoints": {
"default": {
"url": "https://jemmawynne.myshopify.com/api/graphql",
"url": "https://jemmawynne-api.good-idea.now.sh",
"headers": {
"X-Shopify-Storefront-Access-Token": "${env:SHOPIFY_STOREFRONT_TOKEN}"
}
Expand Down
12 changes: 12 additions & 0 deletions app/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
schema: http://localhost:34567/graphql
generates:
src/types/generated.ts:
plugins:
- typescript
config:
nonOptionalTypename: true
scalars:
DateTime: Date
JSON: '{ [key: string]: any }'
declarationKind:
type: 'interface'
74 changes: 40 additions & 34 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,76 +14,82 @@
"lib"
],
"scripts": {
"dev": "webpack-dev-server --mode development",
"dev": "echo 'Deprecated: use `yarn start` instead'",
"start": "webpack-dev-server --mode development",
"build": "rimraf build && NODE_ENV=production webpack --env production --mode production",
"stats": "NODE_ENV=production webpack --env production --mode production --json > stats.json",
"now-build": "yarn build",
"install-types": "typesync && yarn install",
"generate-types": "graphql-codegen",
"test": "jest",
"test:watch": "jest --watch",
"playground": "graphql playground"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@graphql-codegen/cli": "^1.3.1",
"@graphql-codegen/typescript": "^1.3.1",
"@hot-loader/react-dom": "^16.8.6",
"@types/babel__core": "^7.1.1",
"@types/babel__core": "^7.1.2",
"@types/copy-webpack-plugin": "^5.0.0",
"@types/eslint": "^4.16.6",
"@types/eslint-plugin-prettier": "^2.2.0",
"@types/graphql": "^14.2.0",
"@types/graphql": "^14.2.1",
"@types/html-webpack-plugin": "^3.2.0",
"@types/jest": "^24.0.12",
"@types/node": "^12.0.0",
"@types/prettier": "^1.16.3",
"@types/react": "^16.8.17",
"@types/jest": "^24.0.15",
"@types/node": "^12.0.8",
"@types/prettier": "^1.16.4",
"@types/react": "^16.8.21",
"@types/react-dom": "^16.8.4",
"@types/react-hot-loader": "^4.1.0",
"@types/react-router": "^5.0.0",
"@types/react-router-dom": "^4.3.3",
"@types/styled-components": "^4.1.14",
"@types/react-router": "^5.0.2",
"@types/react-router-dom": "^4.3.4",
"@types/styled-components": "^4.1.16",
"@types/typescript": "^2.0.0",
"@types/webpack": "^4.4.31",
"@types/webpack": "^4.4.33",
"@types/webpack-cleanup-plugin": "^0.5.2",
"@types/webpack-dev-server": "^3.1.5",
"@types/webpack-dev-server": "^3.1.6",
"@types/webpack-merge": "^4.1.5",
"@typescript-eslint/eslint-plugin": "^1.8.0",
"@typescript-eslint/parser": "^1.8.0",
"@typescript-eslint/eslint-plugin": "^1.10.2",
"@typescript-eslint/parser": "^1.10.2",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.0.5",
"babel-plugin-styled-components": "^1.10.0",
"babel-loader": "^8.0.6",
"babel-plugin-styled-components": "^1.10.1",
"copy-webpack-plugin": "^5.0.3",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.2.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-config-prettier": "^5.0.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.13.0",
"graphql": "^14.3.1",
"graphql-cli": "^3.0.11",
"hard-source-webpack-plugin": "^0.13.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"jest": "^24.8.0",
"prettier": "^1.17.0",
"react-hot-loader": "^4.8.4",
"react-testing-library": "^7.0.0",
"prettier": "^1.18.2",
"react-hot-loader": "^4.11.1",
"react-testing-library": "^8.0.1",
"ts-jest": "^24.0.2",
"ts-loader": "^6.0.0",
"ts-loader": "^6.0.3",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"typescript": "^3.4.5",
"typescript": "^3.5.2",
"typesync": "^0.5.1",
"utility-types": "^3.7.0",
"webpack": "^4.31.0",
"webpack": "^4.34.0",
"webpack-cleanup-plugin": "^0.5.1",
"webpack-cli": "^3.3.2",
"webpack-dev-server": "^3.3.1",
"webpack-cli": "^3.3.4",
"webpack-dev-server": "^3.7.2",
"webpack-merge": "^4.2.1"
},
"dependencies": {
"graphql": "^14.3.0",
"@good-idea/unwind-edges": "^1.1.3",
"graphql": "^14.3.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-router": "^5.0.0",
"react-router-dom": "^5.0.0",
"styled-components": "^4.2.0",
"use-shopify": "^0.3.1"
"react-router": "^5.0.1",
"react-router-dom": "^5.0.1",
"react-swipeable": "^5.3.0",
"styled-components": "^4.3.1",
"use-shopify": "^0.3.5"
}
}
3 changes: 1 addition & 2 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { Switch, Route } from 'react-router'
import { Homepage, ProductListing, ProductDetail, Navigation, Checkout } from './views'
import { Homepage, ProductListing, ProductDetail, Navigation } from './views'
import { Providers } from './providers/AllProviders'

/**
Expand All @@ -18,7 +18,6 @@ export const App = () => {
<Route exact path="/" component={Homepage} />
<Route exact path="/collections/:handle" component={ProductListing} />
<Route exact path="/products/:handle" component={ProductDetail} />
<Route exact path="/checkout" component={Checkout} />
</Switch>
</Providers>
)
Expand Down
19 changes: 19 additions & 0 deletions app/src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react'
import { Wrapper, ToggleButton, Inner } from './styled'

interface AccordionProps {
label: string
children: React.ReactNode
}

export const Accordion = ({ label, children }: AccordionProps) => {
const [open, setOpen] = React.useState(false)
const toggleOpen = () => setOpen(!open)

return (
<Wrapper>
<ToggleButton onClick={toggleOpen}>{label}</ToggleButton>
<Inner open={open}>{children}</Inner>
</Wrapper>
)
}
1 change: 1 addition & 0 deletions app/src/components/Accordion/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Accordion'
Loading

0 comments on commit e0b5ca7

Please sign in to comment.