Permalink
Browse files

Adding template that reads user & email from `git config`

  • Loading branch information...
1 parent 744bd0a commit 980654d31cabafeac3cfd068be1e2f73710c16c2 @Gozala Gozala committed Mar 7, 2011
@@ -0,0 +1,3 @@
+support
+test
+examples
@@ -0,0 +1,5 @@
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
@@ -0,0 +1,5 @@
+
+test:
+ @echo "populate me"
+
+.PHONY: test
@@ -0,0 +1,29 @@
+
+# {{project}}
+
+ {{description}}
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2011 {{name}} <{{email}}>
+
+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.
@@ -0,0 +1,2 @@
+
+module.exports = require('./lib/{{project}}');
@@ -0,0 +1,12 @@
+
+/*!
+ * {{project}}
+ * Copyright(c) 2011 {{name}} <{{email}}>
+ * MIT Licensed
+ */
+
+/**
+ * Library version.
+ */
+
+exports.version = '0.0.1';
@@ -0,0 +1,10 @@
+{
+ "name": "{{project}}",
+ , "version": "0.0.1",
+ , "description": "{{description}}",
+ , "keywords": [],
+ , "author": "{{name}} <{{email}}>",
+ , "dependencies": {}
+ , "main": "index"
+ , "engines": { "node": "0.4.x" }
+}
@@ -0,0 +1,13 @@
+
+/**
+ * Module dependencies.
+ */
+
+var mini = require('{{project}}')
+ , should = require('should');
+
+module.exports = {
+ 'test .version': function(){
+ {{project}}.version.should.match(/^\d+\.\d+\.\d+$/);
+ }
+};
View
@@ -0,0 +1,22 @@
+var spawn = require('child_process').spawn;
+
+exports.variables = {
+ project: 'Project name: ',
+ description: 'Project description: ',
+ name: function(values, callback) {
+ spawn('git', [
+ '--bare',
+ 'config',
+ '--global',
+ 'user.name'
+ ]).stdout.once('data', callback);
+ },
+ email: function(values, callback) {
+ spawn('git', [
+ '--bare',
+ 'config',
+ '--global',
+ 'user.email'
+ ]).stdout.once('data', callback);
+ }
+};

0 comments on commit 980654d

Please sign in to comment.