Skip to content

Commit

Permalink
Formatted the readme and package
Browse files Browse the repository at this point in the history
  • Loading branch information
mdarif committed May 9, 2013
1 parent 6ce1f59 commit fba5d96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,16 @@ JavaScript Boilerplate is the collection of best practices using a design patter

2. The second step would be to define the components, which can be page level or widget level too.

```javascript
MODULE.subModule = (function () {

MODULE.subModule = (function () {
function _subModule() {

... (3)


}
return new _subModule()
})();


return new _subModule();


})();
```

The above code has defined a component called helper as a sub module of `MODULE` namespace. `MODULE.helper` holds an object that gets returned through `new _subModule()`. We can define all the functions that we want for the helper module inside the function `_subModule()`.
The above code has defined a component called helper as a sub module of `MODULE` namespace. `MODULE.helper` holds an object that gets returned through `new _subModule()`. We can define all the functions that we want for the helper module inside the function `_subModule()`.


3. The third step would be to define the private values, private functions , priviledged functions etc. within the `_subModule` function. Comments have been provided as to which one is a private function and which is a priviledged one. At the end of the function the `init()` function is exposed which in turn returns the object itself. When the object is returned all the priviledged functions are exposed along with it and are accessible outside.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name" : "javascript-boilerplate",
"title" : "JavaScript-Boilerplate",
"description" : "JavaScript Boilerplate is the collection of best practices.",
"keywords" : ["js-boilerplate", "boilerplate", "javascript"],
"keywords" : ["javascript-boilerplate", "js-boilerplate", "boilerplate", "javascript"],
"repository" : {
"type" : "git",
"url" : "https://github.com/mdarif/JavaScript-Boilerplate.git"
Expand All @@ -15,6 +15,6 @@
},
"devDependencies": {},
"main" : "./js/_.main.js",
"version" : "1.0.1",
"version" : "1.0.2",
"license" : "MIT/GPL"
}

0 comments on commit fba5d96

Please sign in to comment.