Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jokull/ssstatic
Push a folder of assets to S3 with guaranteed cache busting
https://github.com/jokull/ssstatic
Last synced: 13 days ago
JSON representation
Push a folder of assets to S3 with guaranteed cache busting
- Host: GitHub
- URL: https://github.com/jokull/ssstatic
- Owner: jokull
- License: unlicense
- Created: 2013-03-20T22:56:47.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-12-28T16:18:33.000Z (about 11 years ago)
- Last Synced: 2024-12-17T03:58:33.151Z (15 days ago)
- Language: Python
- Size: 170 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
README
S3 Static
=========Want an A grade on the Y!Slow test? Ship your website assets with this script!
Features
--------+ Gzips text based files over 1kb
+ Content-Type set from filename extension
+ Far future Expires and Cache-Control
+ Familiar rsync behavior with trailing slashes
+ Resulting URI to stdout is the only output
+ No messing around with stupid compiling CoffeeScript, Stylus, concatenating
files or minifying JavaScript. This is the job of a frontend compiler (see
Brunch or Yeoman).Install
-------$ pip install ssstatic
Usage
-----Dry run:
$ DRYRUN=true ssstatic static/ my-bucket/static/
Upload:
$ export AWS_ACCESS_KEY_ID ...
$ export AWS_SECRET_ACCESS_KEY ...
$ ssstatic static/ my-bucket/static/With cachebusting:
$ ssstatic -c static/ my-bucket/static/ # uploads to something like //my-bucket.s3.amazonaws.com/static/39fj3923/
Site Integration
----------------I have a Makefile with this command to publish assets and update a Heroku config
upload:
heroku config:add STATIC_URL=`honcho run ssstatic app/static/ $(BUCKET)/web/`A protocol relative URL is the only stdout, so it can be used as a STATIC_URL in
Django for example.