mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 15:02:11 +08:00
All Angular builders are now located within one subdirectory of the `src` directory. This organization provides better discovery of the builders and will allow builder specific code to be stored in a single area.
24 lines
748 B
TypeScript
24 lines
748 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC 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
|
|
*/
|
|
|
|
import { SourceMapClass, SourceMapUnion } from '../builders/browser/schema';
|
|
|
|
export function normalizeSourceMaps(sourceMap: SourceMapUnion): SourceMapClass {
|
|
const scripts = typeof sourceMap === 'object' ? sourceMap.scripts : sourceMap;
|
|
const styles = typeof sourceMap === 'object' ? sourceMap.styles : sourceMap;
|
|
const hidden = (typeof sourceMap === 'object' && sourceMap.hidden) || false;
|
|
const vendor = (typeof sourceMap === 'object' && sourceMap.vendor) || false;
|
|
|
|
return {
|
|
vendor,
|
|
hidden,
|
|
scripts,
|
|
styles,
|
|
};
|
|
}
|