Skip to content

Releases: teslajs/tesla.js

Update to Express 4.0, Improve Routing & Error Handling

14 Apr 06:16
Compare
Choose a tag to compare

EXPRESS

  • Manually add middleware we need now that Connect is gone (morgan, cookie-parser, body-parser, method-override)
  • app.router is deprecated: update the way routing is handled

ROUTING

  • Routing is now handled in app/routes, config/routes.js is no more.
  • Add 2 new example controllers to highlight how router works (foobar, crud)
  • Updated auto router

ERROR HANDLING

  • Cleaned up & modularized error handling
  • Use next() vs manually writing res.send(404/500/etc) for every error
  • Added new tesla.throw function to make handling HTTP errors easier
  • Errors are now thrown with next(tesla.throw(404)), next(tesla.throw(500)), etc

VIEWS

  • Made index default view instead of default
  • Updated error views for all template languages
  • Updated view for all templates to work better with CLI boilerplate & bower injection

CRUD Scaffolding, Gulp Support & More Views Engines

19 Mar 06:39
Compare
Choose a tag to compare
  • Add Gulp as preferred build tool
  • Fix bugs with Grunt not starting server correctly
  • Remove unused packages
  • Add support for parse in models
  • Additional view engines added: ejs, handlebars, hogan & mustache
  • Add basic scaffolding & integrate Node-ORM for basic CRUD functionality in controllers & models
  • Refactor routes to use more restful uri pattern: /:controller/action/:id

Update Node & NPM versions

16 Dec 12:48
Compare
Choose a tag to compare

A small patch updating to current node & npm versions.

Add Minification, Caching & CSS Libraries

16 Dec 12:25
Compare
Choose a tag to compare

Add CSS libraries for Stylus

  • NIB can be installed with --nib flag: tesla myapp --css stylus --nib
  • Axis can be installed with --axis flag: tesla myapp --css stylus --axis

Add minification & caching

Added express-minify for minification & caching. You can set this in the main config file. Set "cache" to true for caching and prettify to false to minify (works with html, javascript & css)