304 lines
8.3 KiB
JSON
304 lines
8.3 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
"title": "Custom webpack karma schema for Build Facade",
|
|
"description": "Karma target options",
|
|
"type": "object",
|
|
"properties": {
|
|
"main": {
|
|
"type": "string",
|
|
"description": "The name of the main entry-point file."
|
|
},
|
|
"tsConfig": {
|
|
"type": "string",
|
|
"description": "The name of the TypeScript configuration file."
|
|
},
|
|
"karmaConfig": {
|
|
"type": "string",
|
|
"description": "The name of the Karma configuration file."
|
|
},
|
|
"polyfills": {
|
|
"type": "string",
|
|
"description": "The name of the polyfills file."
|
|
},
|
|
"assets": {
|
|
"type": "array",
|
|
"description": "List of static application assets.",
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/assetPattern"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"description": "Global scripts to be included in the build.",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/extraEntryPoint"
|
|
}
|
|
},
|
|
"styles": {
|
|
"description": "Global styles to be included in the build.",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/extraEntryPoint"
|
|
}
|
|
},
|
|
"inlineStyleLanguage": {
|
|
"description": "The stylesheet language to use for the application's inline component styles.",
|
|
"type": "string",
|
|
"default": "css",
|
|
"enum": [
|
|
"css",
|
|
"less",
|
|
"sass",
|
|
"scss"
|
|
]
|
|
},
|
|
"stylePreprocessorOptions": {
|
|
"description": "Options to pass to style preprocessors",
|
|
"type": "object",
|
|
"properties": {
|
|
"includePaths": {
|
|
"description": "Paths to include. Paths will be resolved to project root.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"default": []
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"include": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Globs of files to include, relative to workspace or project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead"
|
|
},
|
|
"sourceMap": {
|
|
"description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
|
|
"default": true,
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"scripts": {
|
|
"type": "boolean",
|
|
"description": "Output source maps for all scripts.",
|
|
"default": true
|
|
},
|
|
"styles": {
|
|
"type": "boolean",
|
|
"description": "Output source maps for all styles.",
|
|
"default": true
|
|
},
|
|
"vendor": {
|
|
"type": "boolean",
|
|
"description": "Resolve vendor packages source maps.",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
"progress": {
|
|
"type": "boolean",
|
|
"description": "Log progress to the console while building.",
|
|
"default": true
|
|
},
|
|
"watch": {
|
|
"type": "boolean",
|
|
"description": "Run build when files change."
|
|
},
|
|
"poll": {
|
|
"type": "number",
|
|
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
},
|
|
"preserveSymlinks": {
|
|
"type": "boolean",
|
|
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
|
|
},
|
|
"browsers": {
|
|
"type": "string",
|
|
"description": "Override which browsers tests are run against."
|
|
},
|
|
"codeCoverage": {
|
|
"type": "boolean",
|
|
"description": "Output a code coverage report.",
|
|
"default": false
|
|
},
|
|
"codeCoverageExclude": {
|
|
"type": "array",
|
|
"description": "Globs to exclude from code coverage.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"default": []
|
|
},
|
|
"fileReplacements": {
|
|
"description": "Replace compilation source files with other compilation source files in the build.",
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"src": {
|
|
"type": "string"
|
|
},
|
|
"replaceWith": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"src",
|
|
"replaceWith"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"replace": {
|
|
"type": "string"
|
|
},
|
|
"with": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"replace",
|
|
"with"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"default": []
|
|
},
|
|
"reporters": {
|
|
"type": "array",
|
|
"description": "Karma reporters to use. Directly passed to the karma runner.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"webWorkerTsConfig": {
|
|
"type": "string",
|
|
"description": "TypeScript configuration for Web Worker modules."
|
|
},
|
|
"customWebpackConfig": {
|
|
"description": "Custom webpack configuration",
|
|
"default": false,
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "Path to the custom webpack configuration file"
|
|
},
|
|
"mergeRules": {
|
|
"type": "object",
|
|
"description": "Merge rules as described here: https://github.com/survivejs/webpack-merge#mergewithrules"
|
|
},
|
|
"replaceDuplicatePlugins": {
|
|
"type": "boolean",
|
|
"description": "Flag that indicates whether to replace duplicate webpack plugins or not"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
"indexTransform": {
|
|
"type": "string",
|
|
"description": "Path to the file with index.html transform function"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"main",
|
|
"tsConfig",
|
|
"karmaConfig"
|
|
],
|
|
"definitions": {
|
|
"assetPattern": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"glob": {
|
|
"type": "string",
|
|
"description": "The pattern to match."
|
|
},
|
|
"input": {
|
|
"type": "string",
|
|
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
},
|
|
"output": {
|
|
"type": "string",
|
|
"description": "Absolute path within the output."
|
|
},
|
|
"ignore": {
|
|
"description": "An array of globs to ignore.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"glob",
|
|
"input",
|
|
"output"
|
|
]
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"extraEntryPoint": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"input": {
|
|
"type": "string",
|
|
"description": "The file to include."
|
|
},
|
|
"bundleName": {
|
|
"type": "string",
|
|
"pattern": "^[\\w\\-.]*$",
|
|
"description": "The bundle name for this extra entry point."
|
|
},
|
|
"inject": {
|
|
"type": "boolean",
|
|
"description": "If the bundle will be referenced in the HTML file.",
|
|
"default": true
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"input"
|
|
]
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "The file to include."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"$id": "BuildCustomWebpackKarmaSchema"
|
|
} |