Skip to content

Commit

Permalink
set up basic library structure
Browse files Browse the repository at this point in the history
set up library compilation
  • Loading branch information
Fauntleroy committed Sep 19, 2013
1 parent 1eada4c commit 1595566
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
@@ -0,0 +1,15 @@
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz

pids
logs
results

npm-debug.log
node_modules
24 changes: 24 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,24 @@
module.exports = function( grunt ){

var pkg = grunt.file.readJSON('package.json');

grunt.initConfig({
browserify: {
hh: {
files: {
'handlebars_helper.js': ['src/browser.js']
}
}
}
});

// the cool/easy way to do it
Object.keys( pkg.devDependencies ).forEach( function( dep ){
if( dep.substring( 0, 6 ) === 'grunt-' ) grunt.loadNpmTasks( dep );
});

grunt.registerTask( 'default', ['dev'] );
grunt.registerTask( 'build', ['browserify'] );
grunt.registerTask( 'dev', ['build'] );

};
14 changes: 14 additions & 0 deletions handlebars_helper.js
@@ -0,0 +1,14 @@
;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.exports = require('./lib');
},{"./lib":2}],2:[function(require,module,exports){
var helpers = {};

module.exports.help = function( Handlebars ){
for( var name in helpers ){
Handlebars.registerHelper( name, helpers[name] );
}
};
},{}],3:[function(require,module,exports){
handlebars_helper = require('../index.js');
},{"../index.js":1}]},{},[3])
;
1 change: 1 addition & 0 deletions index.js
@@ -0,0 +1 @@
module.exports = require('./lib');
7 changes: 7 additions & 0 deletions lib/index.js
@@ -0,0 +1,7 @@
var helpers = {};

module.exports.help = function( Handlebars ){
for( var name in helpers ){
Handlebars.registerHelper( name, helpers[name] );
}
};
30 changes: 30 additions & 0 deletions package.json
@@ -0,0 +1,30 @@
{
"name": "handlebars-helper",
"version": "0.0.0",
"description": "A collection of helpers for quick and tasty Handlebars templates",
"main": "index.js",
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "https://github.com/SparkartGroupInc/handlebars-helpers.git"
},
"keywords": [
"Handlebars",
"helpers"
],
"author": {
"name": "Timothy Kempf",
"email": "tim@sparkart.com",
"url": "http://sparkart.com"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/SparkartGroupInc/handlebars-helpers/issues"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-browserify": "~1.2.4"
}
}
1 change: 1 addition & 0 deletions src/browser.js
@@ -0,0 +1 @@
handlebars_helper = require('../index.js');

0 comments on commit 1595566

Please sign in to comment.