New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

toka

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toka - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

bin/toka.js

4

index.js
var files = require('./lib/files');
module.exports = function(argv) {
module.exports = function (argv) {
var options = argv;
files.search(options);
}
}
var fs = require('fs');
module.exports = function (options) {
var lib = options[0];
var lib = options[1];
lib = lib || 'lib';

@@ -6,0 +6,0 @@ var json = {

@@ -11,8 +11,11 @@ var gitignore = require('./gitignore'),

break;
case 'g':
case '.gitignore':
gitignore(options);
break;
case 'b':
case '.bowerrc':
bowerrc(options);
break;
case 'l':
case 'license':

@@ -22,5 +25,5 @@ license(options);

default:
gitignore();
return;
}
}
}

@@ -0,0 +0,0 @@ var fs = require('fs');

@@ -0,0 +0,0 @@ # Contributing guidelines

@@ -0,0 +0,0 @@ # A collection of `.gitignore` templates

exports.checkInArray = function (arr, obj) {
return (arr.indexOf(obj) != -1);
}
}
exports.fuzzy = function (string, match) {
var hay = string.toLowerCase(), i = 0, n = -1, l;
match = match.toLowerCase();
for (; l = match[i++] ;) if (!~(n = hay.indexOf(l, n + 1))) return false;
return true;
}

@@ -21,2 +21,10 @@ var fs = require('fs');

var license = options[1];
for (var i = 0; i < licenses.length; i++) {
var l = licenses[i];
if (require('./helper').fuzzy(l, options[1])) {
license = l;
console.log('Automattically detected as ' + l + ' license')
break;
}
}
var check = require('./helper').checkInArray(licenses, license);

@@ -42,3 +50,3 @@ if (!check) {

fs.writeFileSync(process.cwd() + '/LICENSE', output, 'utf-8');
console.log(license.green + ' license is saved yo your project!'.green);
}
console.log(license.green + ' license is saved to your project!'.green);
}

@@ -0,0 +0,0 @@ Copyright (c) {{YEAR}}, {{OWNER}}

@@ -0,0 +0,0 @@ Copyright (c) {{YEAR}}, {{OWNER}}

@@ -0,0 +0,0 @@ GNU GENERAL PUBLIC LICENSE

@@ -0,0 +0,0 @@ Copyright (c) {{YEAR}}, {{OWNER}}

@@ -0,0 +0,0 @@ The MIT License (MIT)

@@ -0,0 +0,0 @@ Mozilla Public License Version 2.0

@@ -0,0 +0,0 @@ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

@@ -0,0 +0,0 @@ var langs = [

{
"name": "toka",
"version": "0.2.1",
"version": "0.2.2",
"description": "A handy tool to generate common files in command line",
"main": "index.js",
"scripts": {
"test": "mocha ./bin/gen.js"
"test": "exit"
},
"bin": {
"gen": "./bin/gen.js",
"toka": "./bin/gen.js"
"toka": "./bin/toka.js"
},
"repository": {
"type": "git",
"url": "https://github.com/0x142857/toka.git"
"url": "https://github.com/aprilorange/toka.git"
},

@@ -29,13 +28,10 @@ "preferGlobal": true,

"bugs": {
"url": "https://github.com/0x142857/toka/issues"
"url": "https://github.com/aprilorange/toka/issues"
},
"homepage": "https://github.com/0x142857/toka",
"devDependencies": {
"mocha": "^2.1.0"
},
"homepage": "https://github.com/aprilorange/toka",
"dependencies": {
"colorful": "^2.1.0",
"handlebars": "^2.0.0",
"ini": "^1.3.2"
"handlebars": "^4.0.2",
"ini": "^1.3.4"
}
}
## Toka
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/0x142857/toka?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![NPM version](https://img.shields.io/npm/v/toka.svg?style=flat)](https://www.npmjs.com/package/toka)
[![NPM download](https://img.shields.io/npm/dm/toka.svg?style=flat)](https://www.npmjs.com/package/toka)
[![David Status](https://david-dm.org/0x142857/toka.svg)](https://david-dm.org/0x142857/toka)
[![Build Status](https://travis-ci.org/0x142857/toka.svg?branch=master)](https://travis-ci.org/0x142857/toka)
[![David Status](https://david-dm.org/aprilorange/toka.svg)](https://david-dm.org/aprilorange/toka)

@@ -18,11 +16,11 @@ ### A handy tool to generate common files in command line

toka -v
toka .gitignore <LAUNGUAGE NAMES> // Use -d to create a default .gitignore file
toka .bowerrc <COMPONENT DIR>
toka license <LICENSE NAME>
toka .gitignore <LAUNGUAGE NAMES> # alias to toka g
toka .bowerrc <COMPONENT DIR> # alias to toka b
toka license <LICENSE NAME> # alias to toka l
```
arguements:
Arguements:
- -d : only generate default file (.gitignore)
- -a : append to a existing file (.gitignore)
- -d : generate default file (.gitignore)
- -a : append to an existing file (.gitignore)

@@ -32,3 +30,3 @@ Example:

```bash
toka .gitignore -d
toka .gitignore -d
toka .gitignore python,go -a

@@ -42,4 +40,6 @@ toka .gitignore windows

The LICENSE type we support:
The LICENSE type we support:
(Fuzzy search is now supported! It means you can simply type things like `toka l apa` to add Apache license)
- Apache-2.0

@@ -54,8 +54,4 @@ - BSD-2

By default, `toka` is also alias to `gen`.
Yap, here we go and go happy.
>因为 NPM 上的 gen 被抢占了... 那就用董香女神的名字 QAQ
Yap, here we go and go happy.
**Q: what does toka stand for?**

@@ -65,7 +61,4 @@

> Recently, My girlfriend AKA toka wants a Mac to help her work better, considering this project is filled with my love to toka and you Github lovers, you may donate some $ to me. Paypal and Alipay account both are i@0x142857.com
## LICENSE
[MIT](LICENSE)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc