Comparing version 0.2.2 to 0.2.3
#!/usr/bin/env node | ||
require('colorful').toxic() | ||
@@ -15,3 +16,6 @@ | ||
var gen = require('..'); | ||
var argv = require('minimist')(process.argv.slice(2), { | ||
'--': true | ||
}); | ||
gen(process.argv.slice(2)); | ||
gen(argv); |
var fs = require('fs'); | ||
module.exports = function (options) { | ||
var lib = options[1]; | ||
var lib = options._[1]; | ||
lib = lib || 'lib'; | ||
@@ -14,2 +14,2 @@ var json = { | ||
}); | ||
} | ||
} |
var gitignore = require('./gitignore'), | ||
bowerrc = require('./bowerrc'), | ||
webpack = require('./webpack'), | ||
license = require('./license'); | ||
exports.search = function (options) { | ||
var filename = options[0]; | ||
var filename = options._[0]; | ||
switch (filename) { | ||
@@ -23,2 +24,6 @@ case '-v': | ||
break; | ||
case 'w': | ||
case 'webpack': | ||
webpack(options); | ||
break; | ||
default: | ||
@@ -25,0 +30,0 @@ return; |
@@ -20,3 +20,3 @@ var fs = require('fs'); | ||
main = prefix.cyan + c_langs[index]; | ||
if (order % 3 == 0) | ||
if (order % 3 == 0) | ||
c_langs[index] = main.substring(0, 36) + '\n'; | ||
@@ -29,3 +29,3 @@ else { | ||
output += c_langs[index]; | ||
} | ||
@@ -36,10 +36,5 @@ console.log(output); | ||
module.exports = function (options) { | ||
if (!options[1]) { | ||
notFound(); | ||
return; | ||
} | ||
var language = options[1].split(','), | ||
temp = options.slice(), | ||
last = temp.pop(); | ||
if (last == '-d') language = ['Default']; | ||
var language = options._[1] ? options._[1].split(',') : ''; | ||
if (options.d || options.default) language = ['Default']; | ||
if (!language) { | ||
@@ -63,3 +58,3 @@ | ||
} | ||
if (last == '-a') { | ||
if (options.a || options.append) { | ||
fs.appendFileSync(process.cwd() + '/.gitignore', all, 'utf-8'); | ||
@@ -71,7 +66,7 @@ console.log('%s has been append to .gitignore!'.green, language.toString()); | ||
} | ||
} | ||
} | ||
} |
@@ -20,8 +20,8 @@ var fs = require('fs'); | ||
module.exports = function (options) { | ||
var license = options[1]; | ||
var license = options._[1]; | ||
for (var i = 0; i < licenses.length; i++) { | ||
var l = licenses[i]; | ||
if (require('./helper').fuzzy(l, options[1])) { | ||
if (require('./helper').fuzzy(l, license)) { | ||
license = l; | ||
console.log('Automattically detected as ' + l + ' license') | ||
console.log('Detected as %s license...'.cyan, l) | ||
break; | ||
@@ -28,0 +28,0 @@ } |
{ | ||
"name": "toka", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A handy tool to generate common files in command line", | ||
@@ -34,4 +34,5 @@ "main": "index.js", | ||
"handlebars": "^4.0.2", | ||
"ini": "^1.3.4" | ||
"ini": "^1.3.4", | ||
"minimist": "^1.2.0" | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
119626
143
310
0
4
7
+ Addedminimist@^1.2.0