onechat-webclient-cli
Advanced tools
Comparing version 0.1.6 to 1.0.0
@@ -7,7 +7,9 @@ #!/usr/bin/env node | ||
cli.version('0.1.5'); | ||
cli.version('0.1.8'); | ||
cli.command('view <view> [views...]', 'creates new view') | ||
cli.command('view <name>') | ||
.description('creates new view') | ||
.action(require('./view.js')); | ||
cli.parse(process.argv); | ||
if (!process.argv.slice(2).length) { cli.outputHelp() }; |
@@ -1,22 +0,19 @@ | ||
module.exports = function(view, views) { | ||
var copy, fs, i, len, results; | ||
if (views == null) { | ||
views = []; | ||
} | ||
console.log(view, views); | ||
views.unshift(view); | ||
module.exports = function(name) { | ||
var copy, fs, mkdirp, path; | ||
fs = require('fs'); | ||
path = require('path'); | ||
mkdirp = require('mkdirp'); | ||
copy = function(src, dest) { | ||
var read; | ||
dest = path.normalize(dest); | ||
mkdirp.sync(path.dirname(dest), parseInt('0777', 8)); | ||
read = fs.createReadStream(src); | ||
return read.pipe(fs.createWriteStream(dest)); | ||
read.pipe(fs.createWriteStream(dest)); | ||
return read.on('end', function() { | ||
return console.log('created ' + dest); | ||
}); | ||
}; | ||
results = []; | ||
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; | ||
copy('templates/view/view.styl', process.cwd() + '/views/' + name + '/' + name + '.styl'); | ||
copy('templates/view/view.pug', process.cwd() + '/views/' + name + '/' + name + '.pug'); | ||
return copy('templates/view/index.coffee', process.cwd() + '/views/' + name + '/index.coffee'); | ||
}; |
{ | ||
"name": "onechat-webclient-cli", | ||
"version": "0.1.6", | ||
"version": "1.0.0", | ||
"description": "", | ||
@@ -24,2 +24,3 @@ "authors": [ | ||
"grunt-contrib-coffee": "^1.0.0", | ||
"mkdirp": "^0.5.1", | ||
"rimraf": "^2.5.4" | ||
@@ -26,0 +27,0 @@ }, |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1747
0
5
28
1