Slim.js
Slim.js is a front-end Framework inspired by the famous Slim Framework v2
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.
Bower:
$ bower install rbarros/slim.js
Download the production version or the development version.
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));
Release History
-
v1.0.2 - 2016-12-13
- Add all hooks slim.
-
v1.0.1 - 2016-12-05
- Add hook.render.before ad hook.render.after.
-
v1.0.0 - 2016-09-29
- Refactored code
-
v0.1.14 - 2016-09-26
- Alter name classes.
-
v0.1.13 - 2016-09-24
- Fix image license README
- Update README
-
v0.1.12 - 2016-09-20
- Update tests and add Debug.
-
v0.1.11 - 2016-09-16
- Compile slim.js
- Fix bug twig not found view
- Add class Debug.
- Fix bug localhost:8080
- Fix bug example app
-
v0.1.10 - 2016-08-09
- Add origin in config.json
-
v0.1.9 - 2016-07-12
- Update version 0.1.9
- Added parameters in route extension
-
v0.1.8 - 2016-07-12
- Changed ownership of tag
- Added extensions to slim.js and namespaces for the routes.
-
v0.1.7 - 2016-07-11
- Update dist slim.js
- Submit changes to send request or apply.
-
v0.1.6 - 2016-07-11
- Add hash current form when the action is empty.
-
v0.1.5 - 2016-07-05
- Add example and minify.
-
v0.1.4 - 2016-06-09
- Update dist version 0.1.4
- Update version 0.1.4
- Fix bug input _METHOD form.
-
v0.1.3 - 2016-06-09
- Fix bug put submit and add example.
- Fix bug $.fn.button.
- Add Promise and tests.
- Alter view test
- Refactor.
- Add tests.
- Add url tests.
-
v0.1.2 - 2016-05-16
- Build and fix example
- Add README.md
-
v0.1.1 - 2016-05-13
- Code Refactoring
- Add codeclimate
- Fix bug instance redirect
- Fix bug check onhashchange
- Add initial test.
- Fix baseurl app example.
-
v0.1.0 - 2016-05-06
- Version dev 0.1.0
- Fix jshint.
- Fix repository.
- Add slim.min.js
- Update bower.json.
- Fix bug minify.
- Initial project.
License
Copyright (c) 2016 Ramon Barros
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.