mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Add init command (not yet implemented).
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
module.exports = {
|
||||
cache: require('./cache'),
|
||||
info: require('./info'),
|
||||
init: require('./init'),
|
||||
install: require('./install'),
|
||||
help: require('./help'),
|
||||
link: require('./link'),
|
||||
|
||||
29
lib/commands/init.js
Normal file
29
lib/commands/init.js
Normal file
@@ -0,0 +1,29 @@
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var cli = require('../util/cli');
|
||||
var createError = require('../util/createError');
|
||||
|
||||
function init() {
|
||||
var emitter = new EventEmitter();
|
||||
|
||||
process.nextTick(function () {
|
||||
emitter.emit('error', createError('Command not yet implemented.', 'ENOTIMPL'));
|
||||
});
|
||||
|
||||
return emitter;
|
||||
}
|
||||
|
||||
// -------------------
|
||||
|
||||
init.line = function () {
|
||||
return init();
|
||||
};
|
||||
|
||||
init.options = function (argv) {
|
||||
return cli.readOptions(argv);
|
||||
};
|
||||
|
||||
init.completion = function () {
|
||||
// TODO:
|
||||
};
|
||||
|
||||
module.exports = init;
|
||||
14
templates/json/help-init.json
Normal file
14
templates/json/help-init.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"command": "init",
|
||||
"description": "Creates a bower.json file based on answers to questions.",
|
||||
"usage": [
|
||||
"init [<options>]"
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"shorthand": "-h",
|
||||
"flag": "--help",
|
||||
"description": "Show this help message"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user