Skip to content

Commit

Permalink
fix: print @angular/compiler-cli version
Browse files Browse the repository at this point in the history
  • Loading branch information
dherges committed Dec 10, 2017
1 parent 758c403 commit b0e362e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/lib/version-info.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import * as rollup from 'rollup';
import { VERSION as COMPILER_VERSION } from '@angular/compiler';
import { VERSION as COMPILER_CLI_VERSION } from '@angular/compiler-cli';
import { version as tsVersion } from 'typescript';

const NGC_VERSION = COMPILER_VERSION.full;
const CLI_VERSION = COMPILER_CLI_VERSION.full;
const ROLLUP_VERSION = (rollup as any).VERSION;
const TS_VERSION = tsVersion;
import { version as TS_VERSION } from 'typescript';
const TSICKLE_VERSION = require('tsickle/package.json').version;
let NG_PACKAGR_VERSION: string = 'unknown';

let NG_PACKAGR_VERSION: string = 'unknown';
function tryReadVersion(paths: string[] = []) {
if (paths.length === 0) {
return;
Expand All @@ -30,9 +25,9 @@ tryReadVersion(['../../package.json', '../../../package.json']);

export function printVersionInfo() {
console.log(`ng-packagr: ` + NG_PACKAGR_VERSION);
console.log(`@angular/compiler: ` + NGC_VERSION);
console.log(`@angular/compiler-cli: ` + NGC_VERSION);
console.log(`rollup: ` + ROLLUP_VERSION);
console.log(`@angular/compiler: ` + COMPILER_VERSION.full);
console.log(`@angular/compiler-cli: ` + COMPILER_CLI_VERSION.full);
console.log(`rollup: ` + (rollup as any).VERSION);
console.log(`tsickle: ` + TSICKLE_VERSION);
console.log(`typescript: ` + TS_VERSION);
}

0 comments on commit b0e362e

Please sign in to comment.