Comparing version 0.3.15 to 0.3.16
@@ -0,1 +1,4 @@ | ||
**v0.3.16** | ||
- Add support for Express 3 (thanks @shimaore) | ||
**v0.3.15** | ||
@@ -2,0 +5,0 @@ - allow 0 to be rendered as value in render_attrs |
// Generated by CoffeeScript 1.3.3 | ||
var cache, coffee, coffeecup, coffeescript_helpers, compiler, elements, merge_elements, skeleton, | ||
var cache, coffee, coffeecup, coffeescript_helpers, compiler, elements, fs, merge_elements, skeleton, | ||
__slice = [].slice, | ||
@@ -16,5 +16,6 @@ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, | ||
compiler.setup(coffeecup); | ||
fs = require('fs'); | ||
} | ||
coffeecup.version = '0.3.15'; | ||
coffeecup.version = '0.3.16'; | ||
@@ -447,2 +448,27 @@ coffeecup.doctypes = { | ||
if (typeof window === "undefined" || window === null) { | ||
coffeecup.__express = function(path, options, fn) { | ||
var tpl; | ||
if (options == null) { | ||
options = {}; | ||
} | ||
options.stylus = require('stylus'); | ||
if (options.optimize && !options.cache) { | ||
options.optimize = false; | ||
} | ||
if (options.cache && (cache[path] != null)) { | ||
tpl = cache[path]; | ||
return fn(null, tpl(options)); | ||
} else { | ||
return fs.readFile(path, 'utf8', function(err, str) { | ||
if (err) { | ||
return fn(err); | ||
} | ||
tpl = coffeecup.compile(str, options); | ||
if (options.cache) { | ||
cache[path] = tpl; | ||
} | ||
return fn(null, tpl(options)); | ||
}); | ||
} | ||
}; | ||
coffeecup.adapters = { | ||
@@ -449,0 +475,0 @@ simple: coffeecup.render, |
{ | ||
"name": "coffeecup", | ||
"description": "Markup as CoffeeScript.", | ||
"version": "0.3.15", | ||
"version": "0.3.16", | ||
"author": "Kris Windham <kriswindham@gmail.com>", | ||
@@ -15,3 +15,3 @@ "homepage": "http://easydoc.org/coffeecup", | ||
"uglify-js": "1.2.6", | ||
"stylus": "~0.25.0" | ||
"stylus": "0.27.2" | ||
}, | ||
@@ -23,3 +23,3 @@ "devDependencies": { | ||
"haml": "0.4.2", | ||
"mocha": "1.0.0", | ||
"mocha": "1.2.2", | ||
"should": "0.6.0" | ||
@@ -37,3 +37,3 @@ }, | ||
"engines": { | ||
"node": "0.4.x || 0.6.x" | ||
"node": "0.4.x || 0.6.x || 0.8.x" | ||
}, | ||
@@ -57,5 +57,6 @@ "scripts": { | ||
"Nicholas Kinsey <nicholas.kinsey@feistystudios.com>", | ||
"Lance Pollard <lancejpollard@gmail.com>" | ||
"Lance Pollard <lancejpollard@gmail.com>", | ||
"Stéphane Alnet <stephane@shimaore.net>" | ||
], | ||
"optionalDependencies": {} | ||
} |
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
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
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
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3590
476537
104
1
6
+ Addedstylus@0.27.2(transitive)
- Removedstylus@0.25.0(transitive)
Updatedstylus@0.27.2