asset-wrap
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -1,3 +0,14 @@ | ||
**v0.2.0** (2013-01-18) | ||
**v0.2.2** (in progress) | ||
* | ||
**v0.2.1** (2013-02-11) | ||
* ignoreErrors param to wrap.Assets | ||
* fix merge for javascript files that are missing semicolons | ||
* add custom Cache-Control setting to middleware | ||
* add default config values for Assets | ||
**v0.2.0** (2013-01-18 1:00pm EST) | ||
* Breaking changes to shortcuts | ||
@@ -4,0 +15,0 @@ * Add error handling |
{ | ||
"name": "asset-wrap", | ||
"description": "Asset management framework for nodejs", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": "Bryant Williams <b.n.williams@gmail.com>", | ||
@@ -6,0 +6,0 @@ "repository": {"type": "git", "url": "git://github.com/scien/asset-wrap.git"}, |
@@ -25,4 +25,4 @@ Asset-Wrap is a simple asset manager for node. | ||
Most of the time you'll always want to include the `dst` parameter. It defaults to `src` if not provided | ||
* `dst`: the location to serve your file from (with md5 appended). also the cache key | ||
Most of the time you'll always want to include the `dst` parameter. defaults to `src` if not provided | ||
* `dst`: the location to serve your file from (without the md5 appended yet) | ||
@@ -44,3 +44,3 @@ After "wrapping" your asset, it will contain | ||
require('zappajs') -> | ||
wrap = require '../lib/index' | ||
wrap = require 'asset-wrap' | ||
assets = new wrap.Assets [ | ||
@@ -57,38 +57,39 @@ new wrap.Snockets { | ||
} | ||
] | ||
@use assets.middleware | ||
], (err) => | ||
throw err if err | ||
@use assets.middleware | ||
@get '/': -> | ||
@render index: { | ||
assets: assets | ||
} | ||
@get '/': -> | ||
@render index: { | ||
assets: assets | ||
} | ||
@view index: -> | ||
head -> | ||
text @assets.tag '/css/hello.css' | ||
text @assets.tag '/js/hello.js' | ||
body -> | ||
a href: @assets.url '/css/hello.css', -> | ||
'View CSS' | ||
pre -> | ||
@assets.data '/css/hello.css' | ||
a href: @assets.url '/js/hello.js', -> | ||
'View Javascript' | ||
pre -> | ||
@assets.data '/js/hello.js' | ||
@view index: -> | ||
head -> | ||
text @assets.tag '/css/hello.css' | ||
text @assets.tag '/js/hello.js' | ||
body -> | ||
a href: @assets.url '/css/hello.css', -> | ||
'View CSS' | ||
pre -> | ||
@assets.data '/css/hello.css' | ||
a href: @assets.url '/js/hello.js', -> | ||
'View Javascript' | ||
pre -> | ||
@assets.data '/js/hello.js' | ||
``` | ||
### Generate Asset Dynamically | ||
### Generate Asset Dynamically in ZappaJS | ||
``` | ||
require('zappajs') -> | ||
wrap = require '../lib/index' | ||
wrap = require 'asset-wrap' | ||
@get '/': -> | ||
new wrap.Snockets { | ||
asset = new wrap.Snockets { | ||
src: 'assets/hello.coffee' | ||
dst: '/js/hello.js' | ||
compress: true | ||
}, (asset) => | ||
@response.setHeader 'ContentType', asset.type | ||
@response.send asset.data | ||
}, (err) => | ||
@res.send 500, err if err | ||
@res.setHeader 'ContentType', asset.type | ||
@res.send asset.data | ||
``` | ||
@@ -109,12 +110,13 @@ | ||
require('zappajs') -> | ||
wrap = require '../lib/index' | ||
wrap = require 'asset-wrap' | ||
@get '/js/hello.js': -> | ||
new wrap.Snockets { | ||
asset = new wrap.Snockets { | ||
src: 'assets/hello.coffee' | ||
dst: '/js/hello.js' | ||
compress: true | ||
}, (asset) => | ||
@response.setHeader 'ContentType', asset.type | ||
@response.send asset.data | ||
}, (err) => | ||
@res.send 500, err if err | ||
@res.setHeader 'ContentType', asset.type | ||
@res.send asset.data | ||
@@ -121,0 +123,0 @@ @get '/': -> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
24094
143
0
2