Permalink
Browse files

Update prompt properties according to new version

  • Loading branch information...
1 parent 68d59c5 commit 6da2a142210bac0e6f9e8545618b3e9340f59239 @pksunkara committed Jul 5, 2012
Showing with 16 additions and 16 deletions.
  1. +16 −16 lib/police/ask.js
View
@@ -90,76 +90,76 @@ ask.fields = function (pkg, fields, callback) {
if (!pkg.name || police.edit) {
prop.push({
- message: 'Module name',
+ description: 'Module name',
name: 'name',
- validator: /^[a-zA-Z0-9\-_\.]+$/,
- warning: 'Module name must be valid',
- empty: false,
+ pattern: /^[a-zA-Z0-9\-_\.]+$/,
+ message: 'Module name must be valid',
+ required: true,
default: ask.gh.repo.name
});
}
if (!pkg.version || police.edit) {
prop.push({
- message: 'Version',
+ description: 'Version',
name: 'version',
- validator: function (v) { return police.semver.valid(v); },
- warning: 'Version must conform to semver',
- empty: false,
+ conform: function (v) { return police.semver.valid(v); },
+ message: 'Version must conform to semver',
+ required: true,
default: '0.1.0'
});
}
if (!pkg.author || police.edit) {
prop.push({
- message: 'Author',
+ description: 'Author',
name: 'author',
- empty: false,
+ required: true,
default: ask.gh.user.name + ' <' + ask.gh.user.email + '> (' + ask.gh.user.blog + ')'
});
}
if (!pkg.description || police.edit) {
prop.push({
- message: 'Description',
+ description: 'Description',
name: 'description',
default: ask.gh.repo.description
});
}
if (!pkg.main || police.edit) {
prop.push({
- message: 'Main script',
+ description: 'Main script',
name: 'main',
});
}
if (!pkg.homepage || police.edit) {
prop.push({
- message: 'Homepage',
+ description: 'Homepage',
name: 'homepage',
default: 'http://' + ask.gh.user.login + '.github.com/' + ask.gh.repo.name
});
}
if (!pkg.keywords || police.edit) {
prop.push({
- message: 'Keywords (space seperated)',
+ description: 'Keywords (space seperated)',
name: 'keywords'
});
}
if (!pkg.licenses || police.edit) {
prop.push({
- message: 'Licenses (MIT/Apache2/GPL3)',
+ description: 'Licenses (MIT/Apache2/GPL3)',
name: 'licenses',
default: 'MIT'
});
}
if (!pkg.engines || !pkg.engines.node || police.edit) {
prop.push({
- message: 'Node version',
+ description: 'Node version',
name: 'node',
default: '>=0.4'
});

0 comments on commit 6da2a14

Please sign in to comment.