Skip to content
Browse files

Bootstrap for new-age npm2debian

  • Loading branch information...
1 parent fe20e65 commit 4ae2d98135adec0360043e2c18d5ca18b0a639bf @arikon committed
Showing with 57 additions and 8 deletions.
  1. +3 −0 .gitignore
  2. +3 −0 bin/npm2debian
  3. +27 −0 lib/cli.js
  4. +24 −8 package.json
View
3 .gitignore
@@ -0,0 +1,3 @@
+.idea/
+*.iml
+node_modules/
View
3 bin/npm2debian
@@ -0,0 +1,3 @@
+#!/usr/bin/env node
+
+require('../lib/cli').main();
View
27 lib/cli.js
@@ -0,0 +1,27 @@
+var Q = require('qq'),
+ FS = require('fs'),
+ PATH = require('path');
+
+exports.main = function () {
+
+ var pkgJson = JSON.parse(FS.readFileSync(PATH.resolve(__dirname, '../package.json')));
+
+ require('coa').Cmd()
+ .name(PATH.basename(process.argv[1]))
+ .title(pkgJson.description)
+ .helpful()
+ .opt()
+ .name('version').title('Version')
+ .short('v').long('version')
+ .flag()
+ .only()
+ .act(function() {
+ return pkgJson.version;
+ })
+ .end()
+ .completable()
+ .act(function() {
+ })
+ .run();
+
+};
View
32 package.json
@@ -1,9 +1,25 @@
-{ "name" : "npm2debian"
-, "description" : "Utility to convert npm packages to Debian packages"
-, "version" : "0.1.0"
-, "author" : "Sergey Belov <peimei@ya.ru>"
-, "directories" : { "lib" : "./lib" }
-, "bin" : { "npm2debian" : "./cli.js" }
-, "main" : "npm2debian"
-, "engines" : { "node" : ">=0.2.0" }
+{
+ "name": "npm2debian",
+ "description": "Utility to convert npm packages to Debian packages",
+ "version": "0.2.0",
+ "author": {
+ "name": "Sergey Belov",
+ "email": "peimei@ya.ru",
+ "url": "http://github.com/arikon"
+ },
+ "directories": {
+ "lib": "./lib"
+ },
+ "bin": {
+ "npm2debian": "./bin/npm2debian"
+ },
+ "dependencies": {
+ "coa": "0.2",
+ "npm": "1.0",
+ "q": "0.7",
+ "qq": "0.3"
+ },
+ "engines": {
+ "node": ">=0.2.0"
+ }
}

0 comments on commit 4ae2d98

Please sign in to comment.
Something went wrong with that request. Please try again.