update node versions
This commit is contained in:
parent
3da8e60149
commit
dfb8b43559
4
dist/npmci.install.d.ts
vendored
4
dist/npmci.install.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
/// <reference types="q" />
|
/// <reference types="q" />
|
||||||
import "typings-global";
|
import 'typings-global';
|
||||||
import * as plugins from "./npmci.plugins";
|
import * as plugins from './npmci.plugins';
|
||||||
export declare let install: (versionArg: any) => plugins.q.Promise<{}>;
|
export declare let install: (versionArg: any) => plugins.q.Promise<{}>;
|
||||||
|
20
dist/npmci.install.js
vendored
20
dist/npmci.install.js
vendored
@ -7,14 +7,14 @@ exports.install = (versionArg) => {
|
|||||||
let done = plugins.q.defer();
|
let done = plugins.q.defer();
|
||||||
plugins.beautylog.log(`now installing node version ${versionArg}`);
|
plugins.beautylog.log(`now installing node version ${versionArg}`);
|
||||||
let version;
|
let version;
|
||||||
if (versionArg == "stable") {
|
if (versionArg === 'stable') {
|
||||||
version = "stable";
|
version = 'stable';
|
||||||
}
|
}
|
||||||
else if (versionArg == "lts") {
|
else if (versionArg === 'lts') {
|
||||||
version = "--lts";
|
version = '6';
|
||||||
}
|
}
|
||||||
else if (versionArg == "legacy") {
|
else if (versionArg === 'legacy') {
|
||||||
version = "6.6.0";
|
version = '4';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
version = versionArg;
|
version = versionArg;
|
||||||
@ -25,12 +25,12 @@ exports.install = (versionArg) => {
|
|||||||
plugins.beautylog.success(`Node version ${version} successfully installed!`);
|
plugins.beautylog.success(`Node version ${version} successfully installed!`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
plugins.beautylog.warn("Nvm not in path so staying at installed node version!");
|
plugins.beautylog.warn('Nvm not in path so staying at installed node version!');
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
npmci_bash_1.bash("node -v");
|
npmci_bash_1.bash('node -v');
|
||||||
npmci_bash_1.bash("npm -v");
|
npmci_bash_1.bash('npm -v');
|
||||||
done.resolve();
|
done.resolve();
|
||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sUUFBUSxDQUFBO0lBQ3RCLENBQUM7SUFBQyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUMsVUFBVSxLQUFLLEtBQUssQ0FBQyxDQUFDLENBQUM7UUFDOUIsT0FBTyxHQUFHLEdBQUcsQ0FBQTtJQUNqQixDQUFDO0lBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLFVBQVUsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDO1FBQ2pDLE9BQU8sR0FBRyxHQUFHLENBQUE7SUFDakIsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ0osT0FBTyxHQUFHLFVBQVUsQ0FBQTtJQUN4QixDQUFDO0lBQUEsQ0FBQztJQUNGLEVBQUUsQ0FBQyxDQUFDLHlCQUFZLENBQUMsQ0FBQyxDQUFDO1FBQ2YsaUJBQUksQ0FBQyxlQUFlLE9BQU8seUJBQXlCLE9BQU8sRUFBRSxDQUFDLENBQUE7UUFDOUQsT0FBTyxDQUFDLFNBQVMsQ0FBQyxPQUFPLENBQUMsZ0JBQWdCLE9BQU8sMEJBQTBCLENBQUMsQ0FBQTtJQUNoRixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDSixPQUFPLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyx1REFBdUQsQ0FBQyxDQUFBO0lBQ25GLENBQUM7SUFBQSxDQUFDO0lBQ0YsaUJBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUNmLGlCQUFJLENBQUMsUUFBUSxDQUFDLENBQUE7SUFDZCxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUE7SUFDZCxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtBQUN2QixDQUFDLENBQUEifQ==
|
@ -1,29 +1,29 @@
|
|||||||
import "typings-global";
|
import 'typings-global';
|
||||||
import * as plugins from "./npmci.plugins";
|
import * as plugins from './npmci.plugins';
|
||||||
import { bash } from "./npmci.bash";
|
import { bash } from './npmci.bash';
|
||||||
import { nvmAvailable } from "./npmci.bash"
|
import { nvmAvailable } from './npmci.bash'
|
||||||
|
|
||||||
export let install = (versionArg) => {
|
export let install = (versionArg) => {
|
||||||
let done = plugins.q.defer();
|
let done = plugins.q.defer()
|
||||||
plugins.beautylog.log(`now installing node version ${versionArg}`);
|
plugins.beautylog.log(`now installing node version ${versionArg}`)
|
||||||
let version: string;
|
let version: string
|
||||||
if (versionArg == "stable") {
|
if (versionArg === 'stable') {
|
||||||
version = "stable";
|
version = 'stable'
|
||||||
} else if (versionArg == "lts") {
|
} else if (versionArg === 'lts') {
|
||||||
version = "--lts";
|
version = '6'
|
||||||
} else if (versionArg == "legacy") {
|
} else if (versionArg === 'legacy') {
|
||||||
version = "6.6.0"
|
version = '4'
|
||||||
} else {
|
} else {
|
||||||
version = versionArg;
|
version = versionArg
|
||||||
};
|
};
|
||||||
if (nvmAvailable) {
|
if (nvmAvailable) {
|
||||||
bash(`nvm install ${version} && nvm alias default ${version}`)
|
bash(`nvm install ${version} && nvm alias default ${version}`)
|
||||||
plugins.beautylog.success(`Node version ${version} successfully installed!`);
|
plugins.beautylog.success(`Node version ${version} successfully installed!`)
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.warn("Nvm not in path so staying at installed node version!");
|
plugins.beautylog.warn('Nvm not in path so staying at installed node version!')
|
||||||
};
|
};
|
||||||
bash("node -v");
|
bash('node -v')
|
||||||
bash("npm -v");
|
bash('npm -v')
|
||||||
done.resolve();
|
done.resolve()
|
||||||
return done.promise;
|
return done.promise
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user