Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Commits on Feb 14, 2015
  1. @mendezcode
  2. @mendezcode

    Validator.context/2 can now set multiple contexts at once

    mendezcode authored
    + Add Validator.prototype.getContexts() to get the defined contexts
Commits on Feb 3, 2015
  1. @mendezcode
Commits on Jan 27, 2015
  1. @mendezcode

    Passing a pure String instead of a Handlebars SafeString to helpers

    mendezcode authored
    Helpers should not receive a SafeString as the text parameter, instead
    they should receive a string. The helpers interface should only get
    native objects, not the template engine's internal string representation.
Commits on Jan 17, 2015
  1. @mendezcode

    Request handlers now receive a state object

    mendezcode authored
    Controllers now pass the request state as an additional parameter
    to the route handlers. The state can be used to store temporary data,
    which the different route callbacks and handlers can use while
    handling the request:
    get('/records', function(req, res, params, state) {
      state.user = 'john';;
    }, function(req, res, params, state) {
Commits on Jan 15, 2015
  1. @mendezcode
Commits on Jan 14, 2015
  1. @mendezcode

    Protos 0.5.0

    mendezcode authored
    [ci skip]
Commits on Jan 13, 2015
  1. @mendezcode
  2. @mendezcode
  3. @mendezcode
  4. @mendezcode
  5. @mendezcode
Commits on Aug 14, 2014
  1. @mendezcode

    Merge pull request #192 from pdehaan/patch-1

    mendezcode authored
    Update qs dependency
  2. @pdehaan
Commits on Apr 3, 2014
  1. @mendezcode

    Add events to control handlebars engine helpers & partials

    mendezcode authored
    The events are handlebars_helpers and handlebars_partials
Commits on Mar 24, 2014
  1. @mendezcode
Commits on Feb 16, 2014
  1. @mendezcode
Commits on Feb 11, 2014
  1. @mendezcode
Commits on Feb 9, 2014
  1. @mendezcode
  2. @mendezcode

    Add Application::multiThreaded(callback) method

    mendezcode authored
    This method allows a function to be converted to a multi-process
    friendly function. Such function will be properly executed on
    all running processes simultaneously.
    Behind the scenes, the master process coordinates the internal
    communication between processes, and passes any arguments to
    all processes, providing a totally transparent behavior.
    The arguments received by the callback should be able to be
    serialized to JSON, since node's IPC serializes data into JSON
    before sending to other processes.
    The method returns a function which does the following:
    1. If Master: tell all workers to run callback with args
    2. If Worker: send to master which will subsequently tell
       all workers to run callback with args.
      var fun = app.multiThreaded(function(val) { ... });
      fun(99); // Will run function with arguments on all processes
    This method provides a fully transparent way to working with apps
    that run on multiple process, making it very simple to run call
    and synchronize between all running processes.
    It is best used after all workers are up, because it relies
    on the available workers reported on node's cluster module.
    The workers_up event can be used to ensure all workers are running.
Commits on Feb 7, 2014
  1. @mendezcode

    Add static_asset_request and non_static_asset_request events

    mendezcode authored
    These are provided by the asset compiler, when rendering both
    static assets and non static assets.
    These routes are called within the static_file_request event.
    Routes can be stopped using req.stopRoute().
  2. @mendezcode

    Add controller_request event

    mendezcode authored
    This request will run before routes are dispatched to each
    of the available controllers.
    This adds up to the application request events, now having:
    request, static_file_request, head_request, controller_request
    Routes can be stopped using req.stopRoute(), this will make
    sure no further route processing is done, and the function
    stopping the processing must handle the view rendering.
  3. @mendezcode

    Add events for all application loading states

    mendezcode authored
    The following events are now available no the app:
    See the commit for details.
  4. @mendezcode

    Add asset_compiler_all_done event

    mendezcode authored
    The event runs after everything is complete, this includes
    compilation, minification and concatenation.
  5. @mendezcode
  6. @mendezcode
  7. @mendezcode

    Ensure environment data is loaded before hooks

    mendezcode authored
    This makes sure the environment data can be mutated by hooks
    set by the application, prior to initialization.
    The modified data is already available on the pre_init event.
  8. @mendezcode

    Add ability to set multiple values using objects with req.set()

    mendezcode authored
    Multiple values can be set using req.set() as follows:
      one: 1,
      two: 2,
      three: 3
    They can be retrieved normally with req.get().
Commits on Feb 6, 2014
  1. @mendezcode

    Add config.transientRaw option to render transient views

    mendezcode authored
    This option will provide more control to render transient views,
    which are 404, 500 and regular messages. The application methods
    that render transient views are:
    - app.notFound();
    - app.serverError();
    - res.httpMessage();
    Prior to this commit, such messages were always rendered in raw,
    which means the header/footer templates were never included.
    The config.transientRaw option controls whether or not to display
    the transient views in raw.
    If config.transientRaw is false, it will automatically take the
    value of config.rawViews, to adapt properly for global raw views.
    Additionally, the transient_view event is emitted each time a
    transient view is about to be rendered, which is useful to perform
    specific actions prior to the views being rendered.
Commits on Feb 4, 2014
  1. @mendezcode

    Asset compiler minor refactor

    mendezcode authored
    * Make sure asset_compiler_compile_all_complete is always emitted
    This fixes a bug which caused assets not to be reloaded, because
    the event was never being emitted when there were no files to
    compile in the public directory.
    The issue caused reloading of assets not to work because it relies
    on this and other events to register its completion (which in turn,
    flushes are the caches, causing the assets to be regenerated).
    * Prevent dual compilation of files on startup
    When watching is enabled, the asset compiler compiled each file
    twice, because each file watched did compile the file on watcher
    initialization. Then the file got compiled once again when the
    asset_compiler_compile_all was emitted.
    This behavior has been fixed, and files are compiled only once
    when starting the application.
  2. @mendezcode
  3. @mendezcode

    Add env_data_loaded event

    mendezcode authored
  4. @mendezcode

    Add templates_loaded event

    mendezcode authored
Commits on Feb 3, 2014
  1. @mendezcode
  2. @mendezcode

    Implement Application::renderTemplate()

    mendezcode authored
    The method renders application templates, which are not directly
    related to the application's views and partials.
    These are templates used to render system related things, such as
    emails sent to users, or any other type of string that requires
    template functionality (specially due to JavaScript's lack of
    multiline string support).
    Templates are are created on app/templates/ and can be created with
    any registered view engine.
    Templates can be added using the protos template command, as such:
    $ protos template some-template message/template a/b/c/template
    In addition, templates have access to all of the application's locals,
    helpers, partials and shortcodes. The config.shortcodeFilter (option to
    control whether shortcodes will be replaced in the buffer) will also
    apply to rendered templates.
    To access templates, you use the template's path relative to the
    app/templates directory, without the extension, which serves as a
    namespacing system for the templates.
    Here's some code that renders a template:
    var buf = app.renderTemplate('some/template-name', {
      name: "John Doe",
      user: true,
      something: 99
    This will return the rendered template. Notice that an empty string is
    returned in case the template does not exist.
    Additional changes in this commit:
    + Renamed lib/ directory on skeleton with vendor/
    + Add the allowReloadAll option to asset compiler
    + Add Utility::walkDir() method to walk directories recursively
Something went wrong with that request. Please try again.