Skip to content

Commit 503a9a2

Browse files
committed
chore(cleanup): Refactored code with docblocks
1 parent a7b2ee8 commit 503a9a2

9 files changed

Lines changed: 317 additions & 76 deletions

File tree

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 4

.jshintrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"globals": {
3+
"spyOn": false,
4+
"it": false,
5+
"console": false,
6+
"describe": false,
7+
"beforeEach": false,
8+
"afterEach": false,
9+
"before": false,
10+
"after": false,
11+
"waits": false,
12+
"waitsFor": false,
13+
"runs": false,
14+
"injector": false
15+
},
16+
"node": true,
17+
"camelcase": false,
18+
"curly": true,
19+
"forin": true,
20+
"indent": 4,
21+
"unused": true,
22+
"asi": true,
23+
"evil": false,
24+
"laxcomma": true,
25+
"quotmark": false,
26+
"strict": false,
27+
"expr": true
28+
}

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# A Word on Contributing
2+
3+
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.
4+
5+
> 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).
6+
7+
> 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).
8+
9+
> 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.
10+
11+
> - Richard Gustin
12+
13+
## Submitting bug reports, issues, or enhancement requests.
14+
15+
There are currently a few resources available to reach out to us:
16+
17+
1. [GitHub Issues](https://github.com/CleverStack/clever-controller/issues)
18+
2. [Stack Overflow](http://stackoverflow.com/questions/tagged/cleverstack)
19+
3. [Google Groups/Mailing list](https://groups.google.com/forum/#!forum/cleverstack)
20+
4. [IRC](http://webchat.freenode.net/?randomnick=1&channels=%23cleverstack&uio=d4)
21+
22+
## Submitting Pull Requests
23+
24+
1. Fork the repo
25+
2. Create a new branch following the [Gitflow](https://www.atlassian.com/git/workflows#!workflow-gitflow) structure.
26+
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.
27+
4. Please follow the [coding guidelines](https://github.com/CleverStack/clever-controller/blob/master/.jshintrc)
28+
5. Push your changes and submit a [pull request](https://github.com/CleverStack/clever-controller/compare/) to the master branch.

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 CleverStack
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
1-
# Clever-Controller
1+
Clever Controller
2+
====================
3+
[![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)
4+
[![Build Status](https://secure.travis-ci.org/CleverStack/clever-controller.png?branch=master)](https://travis-ci.org/CleverStack/clever-controller)
5+
[![Coverage](https://codeclimate.com/github/CleverStack/clever-controller/coverage.png)](https://codeclimate.com/github/CleverStack/clever-controller)
26

3-
[![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)
4-
5-
![CleverStack Node Seed](http://cleverstack.github.io/assets/img/logos/node-seed-logo-clean.png "CleverStack Node Seed")
6-
7-
The Controller used for the [CleverStack](http://cleverstack.io) ecosystem. (You can use this module without CleverStack)
7+
![Clever Controller](http://cleverstack.github.io/assets/img/logos/node-seed-logo-clean.png "Clever Controller")
8+
<blockquote>
9+
This is the Controller used in the Full-Stack JS Framework CleverStack, however you can use it on its own.
10+
</blockquote>
811

912
## Lightning-fast flexible controller prototype
1013
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.
1114

15+
### Note:
16+
The documentation is slightly out of date, please refer to the docblocks or make contact with me (richard/pilsy)
17+
1218
### Installation:
1319
It is published in `npm` so a simple `npm install clever-controller` will suffice.
1420

1521
### Routing:
1622

23+
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' ]
24+
1725
```javascript
1826
// Default route setup ~ '/example' or '/example/' or '/example/hello'
1927
app.all('/example/?:action?', ExampleController.attach())

0 commit comments

Comments
 (0)