Skip to content

Commit

Permalink
Refactoring to remove unnecessary complexity, large methods or looping
Browse files Browse the repository at this point in the history
  • Loading branch information
winstromming committed Nov 12, 2013
1 parent a3d90c5 commit e3d9142
Show file tree
Hide file tree
Showing 5 changed files with 267 additions and 259 deletions.
5 changes: 4 additions & 1 deletion .jshintrc
Expand Up @@ -16,5 +16,8 @@
"browser": true,
"jquery": true,
"node": true,
"devel": true
"devel": true,
"globals": {
"grunt": true
}
}
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "sassdown",
"description": "Generates a documentation styleguide from Markdown comments in sass/scss directories using Handlebars",
"version": "0.1.0",
"version": "0.1.01",
"author": {
"name": "Jesper Hills",
"email": "jay@nopr.co",
Expand Down
20 changes: 10 additions & 10 deletions tasks/libs/helpers.js
@@ -1,23 +1,23 @@
/*
* sassdown
* github.com/nopr/sassdown
*
* Copyright (c) 2013 Jesper Hills, contributors
* Some rights reserved
*/
'use strict';
sassdown
github.com/nopr/sassdown
------------------------
Copyright (c) 2013 Jesper Hills, contributors
Some rights reserved
*/
'use strict';

exports.init = function () {

var Handlebars = require('handlebars');

Handlebars.registerHelper("if_name", function(arg, self) {
Handlebars.registerHelper('if_name', function(arg, self) {
if (this.name === arg) { return self.fn(); }
});
Handlebars.registerHelper("if_group", function(arg, self) {
Handlebars.registerHelper('if_group', function(arg, self) {
if (this.group === arg) { return self.fn(); }
});
Handlebars.registerHelper("if_path", function(arg, self) {
Handlebars.registerHelper('if_path', function(arg, self) {
if (this.path === arg) { return self.fn(); }
});

Expand Down

0 comments on commit e3d9142

Please sign in to comment.