Skip to content

Commit

Permalink
upgrades to latest arc
Browse files Browse the repository at this point in the history
  • Loading branch information
brianleroux committed Oct 31, 2018
1 parent dc876d0 commit e8c4b4d
Show file tree
Hide file tree
Showing 11 changed files with 224 additions and 360 deletions.
417 changes: 105 additions & 312 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions public/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Automagical `public` directory

The `public` directory is a great place to add (compiled) JS and CSS, images, gifs, or any other files you want to publicly accessible.

Each time you deploy your Architect project (`npx deploy`), the contents of this folder will automatically be published to S3.

Architect pushes the `public` directory to the `staging` and `production` S3 buckets defined in your `.arc` file's `@static` pragma.

If you have not specified S3 buckets with `@static` in your project's `.arc` file, `public` directory will only be used when previewing your application locally with `npx sandbox`.


## Use caution!

The full contents of this folder public will be copied to S3 with each deploy, overwriting any existing S3 files with the same name.
26 changes: 16 additions & 10 deletions src/http/get-index/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/http/get-index/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loginflow-get-index",
"dependencies": {
"@architect/data": "^2.0.5",
"@architect/functions": "^1.9.7"
"@architect/data": "^2.0.8",
"@architect/functions": "^1.9.12"
}
}
26 changes: 16 additions & 10 deletions src/http/get-logout/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/http/get-logout/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loginflow-get-logout",
"dependencies": {
"@architect/data": "^2.0.5",
"@architect/functions": "^1.9.7"
"@architect/data": "^2.0.8",
"@architect/functions": "^1.9.12"
}
}
26 changes: 16 additions & 10 deletions src/http/get-protected/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/http/get-protected/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loginflow-get-protected",
"dependencies": {
"@architect/data": "^2.0.5",
"@architect/functions": "^1.9.7"
"@architect/data": "^2.0.8",
"@architect/functions": "^1.9.12"
}
}
26 changes: 16 additions & 10 deletions src/http/post-login/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/http/post-login/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loginflow-post-login",
"dependencies": {
"@architect/data": "^2.0.5",
"@architect/functions": "^1.9.7"
"@architect/data": "^2.0.8",
"@architect/functions": "^1.9.12"
}
}
33 changes: 33 additions & 0 deletions src/views/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# The `src/views` directory

By default the contents of `src/views` gets copied into each of your project's `@http` `GET` functions (at `node_modules/@architect/views`) whenever you run:

- `npx sandbox`
- `npx deploy`

This means the modules in this folder can be required from any `@http` `GET` function in your Architect project.

For example, here's how you'd require `src/views/layout.js`:

```javascript
var layout = require('@architect/views/layout')
```

Furthermore you can define specific lambdas to add `@architects/views` to by defining them in your app's `.arc` file by using the `@views` key.

```
@views
get /
get /about
get /js/:module
```

## How is this different from `src/shared`?

When we looked at how people were using `src/shared` we saw that people realized it was an easy way to share view components. Which is true, but we felt we could make it more explicit while also not bloating every function when the workflow desired was specifically for `@http` `GET`s.

## Use caution!

Everything in `src/views` will be copied into all of your project's `@http` `GET` Lambdas, which has the potential to bloat your application.

Remember you want to keep your Lambda functions sub-5MB for optimal coldstart performance.

0 comments on commit e8c4b4d

Please sign in to comment.