angular-cli/scripts/packages.ts
Hans 39dac64386 ci: packages script should list public packages
Added a --json arg for old output.
2018-11-16 10:00:53 -08:00

22 lines
601 B
TypeScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// tslint:disable:no-implicit-dependencies
import { logging } from '@angular-devkit/core';
const { packages } = require('../lib/packages');
export default function(args: { json: boolean }, logger: logging.Logger) {
if (args.json) {
logger.info(JSON.stringify(packages, null, 2));
} else {
logger.info(Object.keys(packages).filter(name => !packages[name].private).join('\n'));
}
}