onechat-webclient-cli
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -0,1 +1,3 @@ | ||
#!/usr/bin/env node | ||
var cli; | ||
@@ -5,7 +7,7 @@ | ||
cli.version('1.0.0'); | ||
cli.version('0.1.5'); | ||
cli.command('view <name> [names...]', 'creates new view') | ||
cli.command('view <view> [views...]', 'creates new view') | ||
.action(require('./view.js')); | ||
cli.parse(process.argv); |
@@ -1,8 +0,8 @@ | ||
module.exports = function(name, names) { | ||
module.exports = function(view, views) { | ||
var copy, fs, i, len, results; | ||
if (names == null) { | ||
names = []; | ||
if (views == null) { | ||
views = []; | ||
} | ||
console.log(name, names); | ||
names.unshift(name); | ||
console.log(view, views); | ||
views.unshift(view); | ||
fs = require('fs'); | ||
@@ -15,9 +15,9 @@ copy = function(src, dest) { | ||
results = []; | ||
for (i = 0, len = names.length; i < len; i++) { | ||
name = names[i]; | ||
copy('templates/view/view.styl', process.cwd() + '/views/' + name + '/' + name + '.styl'); | ||
copy('templates/view/view.pug', process.cwd() + '/views/' + name + '/' + name + '.pug'); | ||
results.push(copy('templates/view/index.coffee', process.cwd() + '/views/' + name + '/index.coffee')); | ||
for (i = 0, len = views.length; i < len; i++) { | ||
view = views[i]; | ||
copy('templates/view/view.styl', process.cwd() + '/views/' + view + '/' + view + '.styl'); | ||
copy('templates/view/view.pug', process.cwd() + '/views/' + view + '/' + view + '.pug'); | ||
results.push(copy('templates/view/index.coffee', process.cwd() + '/views/' + view + '/index.coffee')); | ||
} | ||
return results; | ||
}; |
{ | ||
"name": "onechat-webclient-cli", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "authors": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1657
29