Skip to content

Commit

Permalink
chore(cleanup): Refactored code with docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
pilsy committed Aug 12, 2014
1 parent a7b2ee8 commit 503a9a2
Show file tree
Hide file tree
Showing 9 changed files with 317 additions and 76 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
28 changes: 28 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"globals": {
"spyOn": false,
"it": false,
"console": false,
"describe": false,
"beforeEach": false,
"afterEach": false,
"before": false,
"after": false,
"waits": false,
"waitsFor": false,
"runs": false,
"injector": false
},
"node": true,
"camelcase": false,
"curly": true,
"forin": true,
"indent": 4,
"unused": true,
"asi": true,
"evil": false,
"laxcomma": true,
"quotmark": false,
"strict": false,
"expr": true
}
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# A Word on Contributing

Contributing to a project is not only adding slabs of code, fixing bugs, or creating optimizations, but it is also contributing to programmers, CTOs, fathers, mothers, sons and daughters. This project isn't about a team of developers or a "we the programmers" yacht club. It really about "us" and helpings others climb that same mountain. Whether the top of the mountain is making more money, improving your developing skills, or spending more time with your family we're all climbing the same rocks.

> CleverStack aims to not be a framework or a stack, but an ecosystem. [An ecosystem is a community of living organisms (plants, animals and microbes) in conjunction with the nonliving components of their environment (things like air, water and mineral soil), interacting as a system](http://en.wikipedia.org/wiki/Ecosystem).
> The vision for CleverStack is not to be the best performance framework (although, there is certainly concern for that), including support for all of the gadgets and gizmos (this too, is welcomed), or to be the next buzzword (it would be cool to see others talking about it though) it's more about shifting a developer into a different mindset. A mindset in which not only takes the [modularization principles](http://en.wikipedia.org/wiki/Modular_programming) on a vertical scale (e.g. reducing developing time), but a horizontal scale too (e.g. not needing to focus on every single detail, but being able to take a step back and look at your environment across the horizon).
> I just wanted to thank you for not only looking into contributing towards CleverStack, but for even taking your time to considering it. I'm personally always available to lend out a hand, and I hope you never feel as if you can't reach out to me. I always look forward to discussing ideas, solving problems, and colloborating with others.
> - Richard Gustin
## Submitting bug reports, issues, or enhancement requests.

There are currently a few resources available to reach out to us:

1. [GitHub Issues](https://github.com/CleverStack/clever-controller/issues)
2. [Stack Overflow](http://stackoverflow.com/questions/tagged/cleverstack)
3. [Google Groups/Mailing list](https://groups.google.com/forum/#!forum/cleverstack)
4. [IRC](http://webchat.freenode.net/?randomnick=1&channels=%23cleverstack&uio=d4)

## Submitting Pull Requests

1. Fork the repo
2. Create a new branch following the [Gitflow](https://www.atlassian.com/git/workflows#!workflow-gitflow) structure.
3. Refactors and documentation changes do not require a test, but if you're adding a new function please write a tests for that feature.
4. Please follow the [coding guidelines](https://github.com/CleverStack/clever-controller/blob/master/.jshintrc)
5. Push your changes and submit a [pull request](https://github.com/CleverStack/clever-controller/compare/) to the master branch.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2014 CleverStack

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.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
# Clever-Controller
Clever Controller
====================
[![GitHub version](https://badge.fury.io/gh/cleverstack%2Fclever-controller.png)](http://badge.fury.io/gh/cleverstack%2Fclever-controller) [![Dependency Status](https://david-dm.org/CleverStack/clever-controller.png)](https://david-dm.org/CleverStack/clever-controller) [![devDependency Status](https://david-dm.org/CleverStack/clever-controller/dev-status.png)](https://david-dm.org/CleverStack/clever-controller#info=devDependencies) [![Code Climate](https://codeclimate.com/github/CleverStack/clever-controller.png)](https://codeclimate.com/github/CleverStack/clever-controller)
[![Build Status](https://secure.travis-ci.org/CleverStack/clever-controller.png?branch=master)](https://travis-ci.org/CleverStack/clever-controller)
[![Coverage](https://codeclimate.com/github/CleverStack/clever-controller/coverage.png)](https://codeclimate.com/github/CleverStack/clever-controller)

[![Build Status](http://img.shields.io/travis/CleverStack/clever-controller.svg)](https://travis-ci.org/CleverStack/clever-controller) [![Code Climate](https://codeclimate.com/github/CleverStack/clever-controller.png)](https://codeclimate.com/github/CleverStack/clever-controller) [![Dependency Status](https://david-dm.org/CleverStack/clever-controller.svg?theme=shields.io)](https://david-dm.org/CleverStack/clever-controller) [![devDependency Status](https://david-dm.org/CleverStack/clever-controller/dev-status.svg?theme=shields.io)](https://david-dm.org/CleverStack/clever-controller#info=devDependencies)

![CleverStack Node Seed](http://cleverstack.github.io/assets/img/logos/node-seed-logo-clean.png "CleverStack Node Seed")

The Controller used for the [CleverStack](http://cleverstack.io) ecosystem. (You can use this module without CleverStack)
![Clever Controller](http://cleverstack.github.io/assets/img/logos/node-seed-logo-clean.png "Clever Controller")
<blockquote>
This is the Controller used in the Full-Stack JS Framework CleverStack, however you can use it on its own.
</blockquote>

## Lightning-fast flexible controller prototype
The main aim of the controller is to help simplify the most common tasks that you need to do when setting up routes and functions/classes to handle them.

### Note:
The documentation is slightly out of date, please refer to the docblocks or make contact with me (richard/pilsy)

### Installation:
It is published in `npm` so a simple `npm install clever-controller` will suffice.

### Routing:

Controllers by default have autoRouting enabled, this means you get RESTful style routes out of the box, override the route by using route: [ '/some/route' ]

```javascript
// Default route setup ~ '/example' or '/example/' or '/example/hello'
app.all('/example/?:action?', ExampleController.attach())
Expand Down
Loading

0 comments on commit 503a9a2

Please sign in to comment.