This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const BUCKET_NAME = 'bucket-assets'; | |
class BucketHandler { | |
constructor(awsModule) { | |
let AWS = require('aws-sdk'); | |
this.s3 = new AWS.S3(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | |
version: 2.1 | |
jobs: | |
# Job #1 | |
build: | |
# The primary container is an instance of the first image listed. The job's commands run in this container. | |
docker: | |
# specify the version you desire here | |
- image: circleci/node:11.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// … few jobs | |
workflows: | |
version: 2.1 | |
build-test-and-deploy: | |
jobs: | |
- build: # job #1 - here we build and prepare everything we need | |
context: dev | |
- test: # job #2 - is where we run our tests, linting, code coverage etc. | |
context: dev # for each job we can define “context” with environment variables (and define those in CircleCI dashboard as admin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// … few jobs | |
workflows: | |
version: 2.1 | |
build-test-and-deploy: | |
jobs: | |
- build: # job #1 - here we build and prepare everything we need | |
context: dev | |
- test: # job #2 - is where we run our tests, linting, code coverage etc. | |
context: dev # for each job we can define “context” with environment variables (and define those in CircleCI dashboard as admin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// … few jobs | |
workflows: | |
version: 2.1 | |
build-test-and-deploy: | |
jobs: | |
- build: # job #1 - here we build and prepare everything we need | |
context: dev | |
- test: # job #2 - is where we run our tests, linting, code coverage etc. | |
context: dev # for each job we can define “context” with environment variables (and define those in CircleCI dashboard as admin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- persist_to_workspace: | |
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is | |
# taken to be the root directory of the workspace. | |
root: ~/app | |
# “Paths” Must be relative path from root | |
paths: | |
- node_modules # folder we want to keep for the next job | |
- packages/my_project/build # another folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
orbs: | |
aws-s3: circleci/aws-s3@1.0.11 # allows easy integration with AWS s3, require ENV var with AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY | |
slack: circleci/slack@3.3.0 # allows easy integration with slack, require SLACK_WEBHOOK (url provided by slack) | |
jobs: | |
# Job #1 | |
build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | |
version: 2.1 | |
orbs: | |
aws-s3: circleci/aws-s3@1.0.11 | |
slack: circleci/slack@3.3.0 | |
jobs: | |
# Job #1 | |
build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleChangeOfCatDataFactory = (type, itemIndex, generateKey) => (event) => { | |
const catData = event.target.value; | |
this.setState((prevState) => { | |
const newCatList = [...prevState.catList]; | |
newCatList[itemIndex] = { | |
...prevState.catList[itemIndex], | |
generateKey: generateKey, | |
[type]: catData, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renderList() { | |
const { | |
catList, | |
showNewField, | |
} = this.state; | |
const nextIndex = catList.length; | |
const listOfCustomHeaderField = catList.map((cat, index) => [ | |
<React.Fragment key={cat.generateKey}> |
OlderNewer