@awsw/core
A utility to manage and publish a (static) HTML website to S3 and invalidating the CloudFront cache. The @awsw scope also has an extended array of plugins (see Plugins)
Overview
Table of Contents
How to use
Starter Project
You can easily create a new project using @awsw/starter:
npx create-aws-website
pnpm exec create-aws-website
Manual Setup
Install @awsw/core
Configuring your project
You'll need two things to get started:
- a
aws-website-config.yaml
file which contains your configuration with, at minimum:-
BucketName
- the name of the bucket in you AWS account -
BucketRegion
- the AWS region the bucket's in
-
- add
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
to your environment variables- easiest via a
.env
file at the project root
- easiest via a
Plugins
Here are available plugins:
- @awsw/preview: Allows previewing the project locally
- @awsw/git: Uses git to keep track of changes and prevent unnecessary uploads (faster & cheaper)
- @awsw/minify: Minifies HTML, JS, and CSS optimizing storage and faster delivery
- @awsw/typescript: Transpiles typescript files to javascript
- @awsw/scss: Compiles .scss files to css
- @awsw/encrypt: Allows content encryption to securely deploy secret content on a static website
- @awsw/cache-bust: Use hashes to avoid stale browser caches (cache-busting)
- @awsw/sass: Compiles sass/scss into plain css