Skip to content

rbarros/slim.js

Repository files navigation

Slim.js

Slim.js is a front-end Framework inspired by the famous Slim Framework

MIT JS Build Status Code Climate Test Coverage

Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs.

Installation

Download the latest release here and use the files within dist folder.

via Bower:
$ bower install rbarros/slim.js

Use

(function (window) {
  'use strict';

  var $app = new Slim();

  /**
   * Create route hello/:name
   * @param  {string} name
   * @return {void}
   */
  $app.get('/hello/:name', function(name) {
    /**
     * Retrieve options config/<env>.json
     * @type {Object}
     */
    $app.options = options;
    $app.render('views/hello.twig', {
      name: name,
      logo: $app.options.logo
    });
  });
  $app.run();

}(this));

Build

$ grunt

Tests

Tests coverage

$ grunt qunit

Coverage codeclimate

$ npm install -g codeclimate-test-reporter
$ npm install grunt-qunit-istanbul
$ CODECLIMATE_REPO_TOKEN=<key> codeclimate-test-reporter < report/lcov.info

License

The Slim.js is licensed under the MIT license. See License File for more information.

About

Slim.js is a front-end Framework inspired by the famous Slim Framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published