initial
This commit is contained in:
2
node_modules/npmts-g/ts/index.ts
generated
vendored
Normal file
2
node_modules/npmts-g/ts/index.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./npmts-g.plugins";
|
24
node_modules/npmts-g/ts/install.ts
generated
vendored
Normal file
24
node_modules/npmts-g/ts/install.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import * as plugins from "./npmts-g.plugins";
|
||||
|
||||
export let installNpmtsGlobally = function(){
|
||||
let packJson = require("../package.json");
|
||||
let requiredNpmtsVersion = "^" + packJson.version;
|
||||
if (!plugins.shelljs.which('npmts')) {
|
||||
console.log("NPMTS wasn't found globally, so it is being installed now");
|
||||
plugins.shelljs.cd("../..");
|
||||
plugins.shelljs.exec("npm install npmts@latest");
|
||||
} else {
|
||||
let globalNpmtsVersion = plugins.shelljs.exec("npmts -v").stdout;
|
||||
if(plugins.semver.satisfies(globalNpmtsVersion,requiredNpmtsVersion)){
|
||||
console.log("OK! global npmts version satisfies needed version");
|
||||
} else {
|
||||
console.log("GlobalNPMTS does not satisfy required version, so we are installing it locally.");
|
||||
plugins.shelljs.cd("../..");
|
||||
plugins.shelljs.exec("npm install npmts@latest");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
installNpmtsGlobally();
|
||||
|
||||
|
4
node_modules/npmts-g/ts/npmts-g.plugins.ts
generated
vendored
Normal file
4
node_modules/npmts-g/ts/npmts-g.plugins.ts
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import "typings-global";
|
||||
export let semver = require("semver");
|
||||
export let shelljs = require("shelljs");
|
||||
export import path = require("path");
|
Reference in New Issue
Block a user