Skip to content

Instantly share code, notes, and snippets.

@rockchalkwushock
rockchalkwushock / Main.js
Created October 17, 2017 23:08
Using CSS-Grid with Styled-JSX...there's a first time for everything!
/**
* REVIEW
* This is where the CSS-Grid is being established!
* FIXME
* The only reason there is the `<div />` is `<Meta />` will be seen as an
* element in the grid and take up space. There is likely a way to hide it
* from the grid. Fix this later to get rid of this errant `<div />`.
*/
import Meta from './Meta'
import { styles } from '../../lib'
@rockchalkwushock
rockchalkwushock / example.html
Created October 4, 2017 18:45
Showing faulty PUBLIC_URL case
<!-- PUBLIC_URL if not explicilty set to alias. -->
<link href="/rockchalkwushock/home/circleci/circleci-deployment/static/css/main.c17080f1.css" rel="stylesheet">
<!-- PUBLIC_URL when explicitly set. -->
<link href="https://circleci-deployment-beta.now.sh/static/css/main.c17080f1.css" rel="stylesheet">
@rockchalkwushock
rockchalkwushock / config.yml
Created October 4, 2017 16:52
Full config.yml from Medium Article
version: 2
jobs:
checkout_code:
docker:
- image: circleci/node:latest
working_directory: ~/circleci-deployment
steps:
- checkout
- attach_workspace:
at: ~/circleci-deployment
@rockchalkwushock
rockchalkwushock / workflows.yml
Created October 4, 2017 16:50
Snippet for Medium Article
workflows:
version: 2
test_build_deploy:
jobs:
- checkout_code
- check_vulnerabilities:
requires:
- checkout_code
- test_and_report:
requires:
@rockchalkwushock
rockchalkwushock / deployment.yml
Created October 4, 2017 16:48
Snippet for Medium Article
deployment:
docker:
- image: circleci/node:latest
working_directory: ~/circleci-deployment
steps:
- attach_workspace:
at: ~/circleci-deployment
- run: yarn install
- run: sudo yarn global add now
- deploy:
@rockchalkwushock
rockchalkwushock / build.yml
Created October 4, 2017 16:46
Snippet for Medium Article
build:
docker:
- image: circleci/node:latest
working_directory: ~/circleci-deployment
steps:
- attach_workspace:
at: ~/circleci-deployment
- run: yarn install
- run:
name: yarn build
@rockchalkwushock
rockchalkwushock / test_and_report.yml
Created October 4, 2017 16:44
Snippet for Medium Article
test_and_report:
docker:
- image: circleci/node:latest
working_directory: ~/circleci-deployment
steps:
- attach_workspace:
at: ~/circleci-deployment
- run: yarn install
- run: CI=true yarn test:coverage
- run: yarn reportCoverage
@rockchalkwushock
rockchalkwushock / check_vulnerabilities.yml
Created October 4, 2017 16:43
Snippet for Medium Article
check_vulnerabilities:
docker:
- image: circleci/node:latest
working_directory: ~/circleci-deployment
steps:
- attach_workspace:
at: ~/circleci-deployment
- run: yarn install
- run: |
if [ "${CIRCLE_BRANCH}" == "production" ]; then
@rockchalkwushock
rockchalkwushock / checkout_code.yml
Created October 4, 2017 16:42
Snippet for Medium Article
version: 2
jobs:
checkout_code:
docker:
- image: circleci/node:latest
working_directory: ~/circleci-deployment
steps:
- checkout
- attach_workspace:
at: ~/circleci-deployment
@rockchalkwushock
rockchalkwushock / config.yml
Last active October 3, 2017 19:24
Setting PUBLIC_URL base on branch & aliasing deployment to match.
#
# Still learning v2, I want to read up on:
#
# persist_to_workspace: https://circleci.com/docs/2.0/configuration-reference/#persist_to_workspace
# attach_workspace: https://circleci.com/docs/2.0/configuration-reference/#attach_workspace
#
# I think using these will cut down on the repetative installs & caching, and speed up the overall build on CircleCi.
# I also think using these I can break out and have a `build` job becasue that directory will be persisted on to the `deployment` job.
# NOTE: Must pass CI=true to the build & test script for 'create-react-app' projects.
# @see https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#linux-macos-bash-2