Skip to content

Commit

Permalink
Merge pull request #1 from kernwig/part3/amplify-setup
Browse files Browse the repository at this point in the history
Part 3.1 - Add Amplify to project
  • Loading branch information
kernwig committed Aug 18, 2019
2 parents d46f66c + ffcff76 commit 2d6b59c
Show file tree
Hide file tree
Showing 15 changed files with 550 additions and 941 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ testem.log
.DS_Store
Thumbs.db
functions/node_modules

#amplify
amplify/\#current-cloud-backend
amplify/.config/local-*
amplify/mock-data
amplify/backend/amplify-meta.json
amplify/backend/awscloudformation
build/
aws-exports.js
awsconfiguration.json
17 changes: 17 additions & 0 deletions amplify/.config/project-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"projectName": "sqac-amplify",
"version": "2.0",
"frontend": "javascript",
"javascript": {
"framework": "angular",
"config": {
"SourceDir": "src",
"DistributionDir": "dist",
"BuildCommand": "npm run-script build",
"StartCommand": "npm run-script start"
}
},
"providers": [
"awscloudformation"
]
}
8 changes: 8 additions & 0 deletions amplify/backend/backend-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hosting": {
"S3AndCloudFront": {
"service": "S3AndCloudFront",
"providerPlugin": "awscloudformation"
}
}
}
3 changes: 3 additions & 0 deletions amplify/backend/hosting/S3AndCloudFront/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bucketName": "sqac-amplify-20190817123020-hostingbucket"
}
113 changes: 113 additions & 0 deletions amplify/backend/hosting/S3AndCloudFront/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Hosting resource stack creation using Amplify CLI",
"Parameters": {
"env": {
"Type": "String"
},
"bucketName": {
"Type": "String"
}
},
"Conditions": {
"ShouldNotCreateEnvResources": {
"Fn::Equals": [
{
"Ref": "env"
},
"NONE"
]
}
},
"Resources": {
"S3Bucket": {
"Type": "AWS::S3::Bucket",
"DeletionPolicy": "Retain",
"Properties": {
"BucketName": {
"Fn::If": [
"ShouldNotCreateEnvResources",
{
"Ref": "bucketName"
},
{
"Fn::Join": [
"",
[
{
"Ref": "bucketName"
},
"-",
{
"Ref": "env"
}
]
]
}
]
},
"AccessControl": "Private",
"WebsiteConfiguration": {
"IndexDocument": "index.html",
"ErrorDocument": "index.html"
},
"CorsConfiguration": {
"CorsRules": [
{
"AllowedHeaders": [
"Authorization",
"Content-Length"
],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"*"
],
"MaxAge": 3000
}
]
}
}
}
},
"Outputs": {
"Region": {
"Value": {
"Ref": "AWS::Region"
}
},
"HostingBucketName": {
"Description": "Hosting bucket name",
"Value": {
"Ref": "S3Bucket"
}
},
"WebsiteURL": {
"Value": {
"Fn::GetAtt": [
"S3Bucket",
"WebsiteURL"
]
},
"Description": "URL for website hosted on S3"
},
"S3BucketSecureURL": {
"Value": {
"Fn::Join": [
"",
[
"https://",
{
"Fn::GetAtt": [
"S3Bucket",
"DomainName"
]
}
]
]
},
"Description": "Name of S3 bucket to hold website content"
}
}
}
14 changes: 14 additions & 0 deletions amplify/team-provider-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"dev": {
"awscloudformation": {
"AuthRoleName": "sqac-amplify-dev-20190817121515-authRole",
"UnauthRoleArn": "arn:aws:iam::669223130284:role/sqac-amplify-dev-20190817121515-unauthRole",
"AuthRoleArn": "arn:aws:iam::669223130284:role/sqac-amplify-dev-20190817121515-authRole",
"Region": "us-west-2",
"DeploymentBucketName": "sqac-amplify-dev-20190817121515-deployment",
"UnauthRoleName": "sqac-amplify-dev-20190817121515-unauthRole",
"StackName": "sqac-amplify-dev-20190817121515",
"StackId": "arn:aws:cloudformation:us-west-2:669223130284:stack/sqac-amplify-dev-20190817121515/5856a400-c123-11e9-8d92-021aeadbff90"
}
}
}
42 changes: 0 additions & 42 deletions karma.conf.js

This file was deleted.

Loading

0 comments on commit 2d6b59c

Please sign in to comment.