How to use the tsickle/package.json.version function in tsickle

To help you get started, we’ve selected a few tsickle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ng-packagr / ng-packagr / src / lib / commands / version.command.ts View on Github external
export const version: Command = (pkg: any) => {
  let TSICKLE_VERSION = '';
  try {
    TSICKLE_VERSION = require('tsickle/package.json').version;
  } catch {}

  const NG_PACKAGR_VERSION = pkg ? pkg.version : 'unknown';

  console.log(`ng-packagr:            ` + NG_PACKAGR_VERSION);
  console.log(`@angular/compiler:     ` + COMPILER_VERSION.full);
  console.log(`rollup:                ` + ROLLUP_VERSION);
  console.log(`tsickle:               ` + TSICKLE_VERSION);
  console.log(`typescript:            ` + TS_VERSION);
};