This commit is contained in:
LosslessBot 2016-05-26 22:17:57 +02:00
parent 49dd906c03
commit 04e813cd81
5 changed files with 62 additions and 1 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
node_modules/
dist/
coverage/
docs/

2
.npmignore Normal file
View File

@ -0,0 +1,2 @@
docs/
coverage/

View File

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2016 Push.Rocks Copyright (c) 2016 Lossless GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

30
package.json Normal file
View File

@ -0,0 +1,30 @@
{
"name": "npmci",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"bin": {
"npmci": "dist/index.js"
},
"scripts": {
"test": "(npmts)"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/pushrocks/npmci.git"
},
"author": "Lossless GmbH",
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/pushrocks/npmci/issues"
},
"homepage": "https://gitlab.com/pushrocks/npmci#README",
"devDependencies": {
"npmts": "^5.1.15"
},
"dependencies": {
"commander": "^2.9.0",
"shelljs": "^0.7.0",
"typings-global": "^1.0.3"
}
}

25
ts/index.ts Normal file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env node
import "typings-global"
let shelljs = require("shelljs");
let program = require('commander');
let cmdValue;
let nodeValue;
program
.version('0.0.1')
.arguments('<cmd> [node]')
.action(function (cmd, node) {
cmdValue = cmd;
nodeValue = node;
});
program.parse(process.argv);
if (typeof cmdValue === 'undefined') {
console.error('no command given!');
process.exit(1);
}
console.log('command:', cmdValue);
console.log('node Version:', nodeValue);
shelljs.exec("bash -x \"source /usr/local/nvm/.nvm.sh && nvm install "+ nodeValue);