forked from tower-archive/tower
-
Notifications
You must be signed in to change notification settings - Fork 0
pipeline
Lance Pollard edited this page Apr 16, 2012
·
2 revisions
Tower has a built-in asset compilation and deployment pipeline. The config/assets.coffee
manifest defines how assets are bundled.
- Asset Manifest
- Watchfile
cake assets:bundle
cake assets:upload # cake assets:upload:s3
cake assets:stats
Bundles all the assets
module.exports =
javascripts:
application: [
"/app/models/user"
"/app/models/post"
]
bottom: [
"/vendor/assets/javascripts/jmd/showdown"
"/vendor/assets/javascripts/jmd/jquery.markedit"
]
vendor: [
"/vendor/assets/javascripts/tower"
"/vendor/assets/javascripts/underscore"
]
development: [
"/vendor/assets/javascripts/jasmine"
"/vendor/assets/javascripts/faker"
"/vendor/assets/javascripts/coffeekup"
]
stylesheets:
base: [
"/app/assets/stylesheets/reset"
"/app/assets/stylesheets/typography"
]
application: [
"/app/assets/stylesheets/application"
]
try
Tower.assetManifest = JSON.parse(require("fs").readFileSync("public/assets/manifest.json", "utf-8"))
catch error
Tower.assetManifest = {}
cake assets:bundle
cake assets:upload
Node 0.6.0 has a stable zlib in its core now: http://nodejs.org/docs/v0.6.7/api/zlib.html#zlib. The alternative was to use gzippo.