• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1module.exports = {
2    "name" : basename.replace(/^node-/, ''),
3    "version" : "0.0.0",
4    "description" : (function (cb) {
5        var fs = require('fs');
6        var value;
7        try {
8            var src = fs.readFileSync('README.markdown', 'utf8');
9            value = src.split('\n').filter(function (line) {
10                return /\s+/.test(line)
11                    && line.trim() !== basename.replace(/^node-/, '')
12                ;
13            })[0]
14                .trim()
15                .replace(/^./, function (c) { return c.toLowerCase() })
16                .replace(/\.$/, '')
17            ;
18        }
19        catch (e) {}
20
21        return prompt('description', value);
22    })(),
23    "main" : prompt('entry point', 'index.js'),
24    "bin" : function (cb) {
25        var path = require('path');
26        var fs = require('fs');
27        var exists = fs.exists || path.exists;
28        exists('bin/cmd.js', function (ex) {
29            var bin
30            if (ex) {
31                var bin = {}
32                bin[basename.replace(/^node-/, '')] = 'bin/cmd.js'
33            }
34            cb(null, bin);
35        });
36    },
37    "directories" : {
38        "example" : "example",
39        "test" : "test"
40    },
41    "dependencies" : {},
42    "devDependencies" : {
43        "tap" : "~0.2.5"
44    },
45    "scripts" : {
46        "test" : "tap test/*.js"
47    },
48    "repository" : {
49        "type" : "git",
50        "url" : "git://github.com/substack/" + basename + ".git"
51    },
52    "homepage" : "https://github.com/substack/" + basename,
53    "keywords" : prompt(function (s) { return s.split(/\s+/) }),
54    "author" : {
55        "name" : "James Halliday",
56        "email" : "mail@substack.net",
57        "url" : "http://substack.net"
58    },
59    "license" : "MIT",
60    "engine" : { "node" : ">=0.6" }
61}
62