Comments (5)
Thanks for the heads up. Will that also work in express 2.0?
On 19 June 2012 10:32, Eóin Martin <
[email protected]
wrote:
Just a quick heads up that anyone wanting to use this on Express 3.x needs
to change line 201 in compact.js as app.helpers are not used anymore. You
simply have to change it to app.localsI would create a pull request but it seems trivial for one simple word
change
Reply to this email directly or view it on GitHub:
#14
[email protected]
Chief Technology Officer
Direct: +44 2030 516115__Mobile: +44 7881 550999
*
*
- http://www.clock.co.uk/
*
*
*
The Old School HouseBridge Road, Hunton Bridge,Kings Langley, WD4 8RQ
Switchboard: +44 1923 261166www.clock.co.uk
*
* - http://twitter.com/clock https://github.com/clocklimited
http://www.linkedin.com/company/clock-limited
http://www.clock.co.uk/blog
*
*
*
www.clock.co.uk/email-disclaimer
clock.® is a Registered Trademark of Clock Limited in the European
Community and other territories
from compact.
I don't believe so. As you can see at the Express Wiki , app.locals is a new feature.
from compact.
Might need to do a bit of feature detection, or ask app
what version of Express it is. We should address this with #10 which will be a big refactor.
from compact.
@bengourley definitely. Feature detection, rather than version detection.
locals = app.helpers || app.locals;
if (locals === undefined) {
// error
}
from compact.
This should be fixed now
from compact.
Related Issues (16)
- Any way to have the file regenerated when src files change? HOT 2
- Helper is not scoped to request, but to app
- Debug causes files with the same name to not work HOT 1
- Can't pass options through to Uglify HOT 1
- Test needed for namespace sourcePath addNamespace(..., sourcePath) HOT 1
- Wrong Should.js code pulled in... HOT 2
- path.existsSync... HOT 1
- Doesn't work on a windows server with FF14 client HOT 7
- Multiple compactJsHtml functions HOT 1
- Files served before copy is complete HOT 7
- The version of uglify-js used has vulnerabilities
- Docs need improving
- Timestamp update on compacted JS on each request HOT 2
- Third-party scripts (Feature) HOT 1
- Scripts not in order HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compact.