Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2014-05-16 22:25:49 +0400
committerisaacs <i@izs.me>2014-05-16 22:25:49 +0400
commitc20f278c6b344819ed1c7d9743e1f7acce4f38f6 (patch)
tree9292b09e4a1515a03e64c3cdff0fdc97d726584d
parentd4ae7e14f73da095a2d5e816a9935c51d839bbee (diff)
init-package-json@0.0.17
-rw-r--r--node_modules/init-package-json/default-input.js2
-rw-r--r--node_modules/init-package-json/node_modules/promzard/package.json18
-rw-r--r--node_modules/init-package-json/package.json29
-rw-r--r--package.json2
4 files changed, 40 insertions, 11 deletions
diff --git a/node_modules/init-package-json/default-input.js b/node_modules/init-package-json/default-input.js
index 4390e708b..0cbd85b81 100644
--- a/node_modules/init-package-json/default-input.js
+++ b/node_modules/init-package-json/default-input.js
@@ -150,7 +150,7 @@ if (!package.repository) {
else u = u.replace(/^\s*url = /, '')
}
if (u && u.match(/^git@github.com:/))
- u = u.replace(/^git@github.com:/, 'git://github.com/')
+ u = u.replace(/^git@github.com:/, 'https://github.com/')
return cb(null, prompt('git repository', u))
})
diff --git a/node_modules/init-package-json/node_modules/promzard/package.json b/node_modules/init-package-json/node_modules/promzard/package.json
index 30e5756af..1f1bfc6d4 100644
--- a/node_modules/init-package-json/node_modules/promzard/package.json
+++ b/node_modules/init-package-json/node_modules/promzard/package.json
@@ -21,8 +21,6 @@
"test": "tap test/*.js"
},
"license": "ISC",
- "readme": "# promzard\n\nA prompting wizard for building files from specialized PromZard modules.\nUsed by `npm init`.\n\nA reimplementation of @SubStack's\n[prompter](https://github.com/substack/node-prompter), which does not\nuse AST traversal.\n\nFrom another point of view, it's a reimplementation of\n[@Marak](https://github.com/marak)'s\n[wizard](https://github.com/Marak/wizard) which doesn't use schemas.\n\nThe goal is a nice drop-in enhancement for `npm init`.\n\n## Usage\n\n```javascript\nvar promzard = require('promzard')\npromzard(inputFile, optionalContextAdditions, function (er, data) {\n // .. you know what you doing ..\n})\n```\n\nIn the `inputFile` you can have something like this:\n\n```javascript\nvar fs = require('fs')\nmodule.exports = {\n \"greeting\": prompt(\"Who shall you greet?\", \"world\", function (who) {\n return \"Hello, \" + who\n }),\n \"filename\": __filename,\n \"directory\": function (cb) {\n fs.readdir(__dirname, cb)\n }\n}\n```\n\nWhen run, promzard will display the prompts and resolve the async\nfunctions in order, and then either give you an error, or the resolved\ndata, ready to be dropped into a JSON file or some other place.\n\n\n### promzard(inputFile, ctx, callback)\n\nThe inputFile is just a node module. You can require() things, set\nmodule.exports, etc. Whatever that module exports is the result, and it\nis walked over to call any functions as described below.\n\nThe only caveat is that you must give PromZard the full absolute path\nto the module (you can get this via Node's `require.resolve`.) Also,\nthe `prompt` function is injected into the context object, so watch out.\n\nWhatever you put in that `ctx` will of course also be available in the\nmodule. You can get quite fancy with this, passing in existing configs\nand so on.\n\n### Class: promzard.PromZard(file, ctx)\n\nJust like the `promzard` function, but the EventEmitter that makes it\nall happen. Emits either a `data` event with the data, or a `error`\nevent if it blows up.\n\nIf `error` is emitted, then `data` never will be.\n\n### prompt(...)\n\nIn the promzard input module, you can call the `prompt` function.\nThis prompts the user to input some data. The arguments are interpreted\nbased on type:\n\n1. `string` The first string encountered is the prompt. The second is\n the default value.\n2. `function` A transformer function which receives the data and returns\n something else. More than meets the eye.\n3. `object` The `prompt` member is the prompt, the `default` member is\n the default value, and the `transform` is the transformer.\n\nWhatever the final value is, that's what will be put on the resulting\nobject.\n\n### Functions\n\nIf there are any functions on the promzard input module's exports, then\npromzard will call each of them with a callback. This way, your module\ncan do asynchronous actions if necessary to validate or ascertain\nwhatever needs verification.\n\nThe functions are called in the context of the ctx object, and are given\na single argument, which is a callback that should be called with either\nan error, or the result to assign to that spot.\n\nIn the async function, you can also call prompt() and return the result\nof the prompt in the callback.\n\nFor example, this works fine in a promzard module:\n\n```\nexports.asyncPrompt = function (cb) {\n fs.stat(someFile, function (er, st) {\n // if there's an error, no prompt, just error\n // otherwise prompt and use the actual file size as the default\n cb(er, prompt('file size', st.size))\n })\n}\n```\n\nYou can also return other async functions in the async function\ncallback. Though that's a bit silly, it could be a handy way to reuse\nfunctionality in some cases.\n\n### Sync vs Async\n\nThe `prompt()` function is not synchronous, though it appears that way.\nIt just returns a token that is swapped out when the data object is\nwalked over asynchronously later, and returns a token.\n\nFor that reason, prompt() calls whose results don't end up on the data\nobject are never shown to the user. For example, this will only prompt\nonce:\n\n```\nexports.promptThreeTimes = prompt('prompt me once', 'shame on you')\nexports.promptThreeTimes = prompt('prompt me twice', 'um....')\nexports.promptThreeTimes = prompt('you cant prompt me again')\n```\n\n### Isn't this exactly the sort of 'looks sync' that you said was bad about other libraries?\n\nYeah, sorta. I wouldn't use promzard for anything more complicated than\na wizard that spits out prompts to set up a config file or something.\nMaybe there are other use cases I haven't considered.\n",
- "readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/isaacs/promzard/issues"
},
@@ -30,5 +28,21 @@
"_id": "promzard@0.2.2",
"_shasum": "918b9f2b29458cb001781a8856502e4a79b016e0",
"_from": "promzard@~0.2.0",
+ "_npmVersion": "1.4.10",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "918b9f2b29458cb001781a8856502e4a79b016e0",
+ "tarball": "http://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz"
+ },
+ "directories": {},
"_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz"
}
diff --git a/node_modules/init-package-json/package.json b/node_modules/init-package-json/package.json
index 21533c9e9..84d3814f8 100644
--- a/node_modules/init-package-json/package.json
+++ b/node_modules/init-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "init-package-json",
- "version": "0.0.16",
+ "version": "0.0.17",
"main": "init-package-json.js",
"scripts": {
"test": "tap test/*.js"
@@ -37,14 +37,29 @@
"prompt",
"start"
],
- "readme": "# init-package-json\n\nA node module to get your node module started.\n\n## Usage\n\n```javascript\nvar init = require('init-package-json')\nvar path = require('path')\n\n// a path to a promzard module. In the event that this file is\n// not found, one will be provided for you.\nvar initFile = path.resolve(process.env.HOME, '.npm-init')\n\n// the dir where we're doin stuff.\nvar dir = process.cwd()\n\n// extra stuff that gets put into the PromZard module's context.\n// In npm, this is the resolved config object. Exposed as 'config'\n// Optional.\nvar configData = { some: 'extra stuff' }\n\n// Any existing stuff from the package.json file is also exposed in the\n// PromZard module as the `package` object. There will also be free\n// vars for:\n// * `filename` path to the package.json file\n// * `basename` the tip of the package dir\n// * `dirname` the parent of the package dir\n\ninit(dir, initFile, configData, function (er, data) {\n // the data's already been written to {dir}/package.json\n // now you can do stuff with it\n})\n```\n\nOr from the command line:\n\n```\n$ npm-init\n```\n\nSee [PromZard](https://github.com/isaacs/promzard) for details about\nwhat can go in the config file.\n",
- "readmeFilename": "README.md",
+ "gitHead": "cbc53fbedd4246d62ec99ea3a61a113a07d21629",
"bugs": {
"url": "https://github.com/isaacs/init-package-json/issues"
},
"homepage": "https://github.com/isaacs/init-package-json",
- "_id": "init-package-json@0.0.16",
- "_shasum": "f7bb96fcb0a2c8061d15a2c3180323b17a65aa16",
- "_from": "init-package-json@0.0.16",
- "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-0.0.16.tgz"
+ "_id": "init-package-json@0.0.17",
+ "_shasum": "395f2cb8d1c5af93ba6ec19dafa64717047f90c3",
+ "_from": "init-package-json@latest",
+ "_npmVersion": "1.4.10",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ }
+ ],
+ "dist": {
+ "shasum": "395f2cb8d1c5af93ba6ec19dafa64717047f90c3",
+ "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-0.0.17.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-0.0.17.tgz"
}
diff --git a/package.json b/package.json
index b615dc8f8..3458cb305 100644
--- a/package.json
+++ b/package.json
@@ -52,7 +52,7 @@
"graceful-fs": "~2.0.2",
"inflight": "^1.0.1",
"ini": "~1.1.0",
- "init-package-json": "0.0.16",
+ "init-package-json": "0.0.17",
"lockfile": "~0.4.0",
"lru-cache": "~2.5.0",
"minimatch": "~0.2.14",