Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

substack-input.js 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. module.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. return prompt('description', value);
  21. })(),
  22. "main" : prompt('entry point', 'index.js'),
  23. "bin" : function (cb) {
  24. var path = require('path');
  25. var fs = require('fs');
  26. var exists = fs.exists || path.exists;
  27. exists('bin/cmd.js', function (ex) {
  28. var bin
  29. if (ex) {
  30. var bin = {}
  31. bin[basename.replace(/^node-/, '')] = 'bin/cmd.js'
  32. }
  33. cb(null, bin);
  34. });
  35. },
  36. "directories" : {
  37. "example" : "example",
  38. "test" : "test"
  39. },
  40. "dependencies" : {},
  41. "devDependencies" : {
  42. "tap" : "~0.2.5"
  43. },
  44. "scripts" : {
  45. "test" : "tap test/*.js"
  46. },
  47. "repository" : {
  48. "type" : "git",
  49. "url" : "git://github.com/substack/" + basename + ".git"
  50. },
  51. "homepage" : "https://github.com/substack/" + basename,
  52. "keywords" : prompt(function (s) { return s.split(/\s+/) }),
  53. "author" : {
  54. "name" : "James Halliday",
  55. "email" : "mail@substack.net",
  56. "url" : "http://substack.net"
  57. },
  58. "license" : "MIT",
  59. "engine" : { "node" : ">=0.6" }
  60. }