Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
16
my-app/node_modules/@schematics/angular/config/files/.browserslistrc.template
generated
vendored
Executable file
16
my-app/node_modules/@schematics/angular/config/files/.browserslistrc.template
generated
vendored
Executable file
|
@ -0,0 +1,16 @@
|
|||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# For the full list of supported browsers by the Angular framework, please see:
|
||||
# https://angular.io/guide/browser-support
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 2 Chrome versions
|
||||
last 1 Firefox version
|
||||
last 2 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
||||
Firefox ESR
|
39
my-app/node_modules/@schematics/angular/config/files/karma.conf.js.template
generated
vendored
Executable file
39
my-app/node_modules/@schematics/angular/config/files/karma.conf.js.template
generated
vendored
Executable file
|
@ -0,0 +1,39 @@
|
|||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
},
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage/<%= folderName %>'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
]
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
browsers: ['Chrome'],
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
10
my-app/node_modules/@schematics/angular/config/index.d.ts
generated
vendored
Executable file
10
my-app/node_modules/@schematics/angular/config/index.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* @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 { Rule } from '@angular-devkit/schematics';
|
||||
import { Schema as ConfigOptions } from './schema';
|
||||
export default function (options: ConfigOptions): Rule;
|
70
my-app/node_modules/@schematics/angular/config/index.js
generated
vendored
Executable file
70
my-app/node_modules/@schematics/angular/config/index.js
generated
vendored
Executable file
|
@ -0,0 +1,70 @@
|
|||
"use strict";
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const schematics_1 = require("@angular-devkit/schematics");
|
||||
const utility_1 = require("@schematics/angular/utility");
|
||||
const path_1 = require("path");
|
||||
const paths_1 = require("../utility/paths");
|
||||
const schema_1 = require("./schema");
|
||||
function default_1(options) {
|
||||
switch (options.type) {
|
||||
case schema_1.Type.Karma:
|
||||
return addKarmaConfig(options);
|
||||
case schema_1.Type.Browserslist:
|
||||
return addBrowserslistConfig(options);
|
||||
default:
|
||||
throw new schematics_1.SchematicsException(`"${options.type}" is an unknown configuration file type.`);
|
||||
}
|
||||
}
|
||||
exports.default = default_1;
|
||||
function addBrowserslistConfig(options) {
|
||||
return async (host) => {
|
||||
const workspace = await (0, utility_1.readWorkspace)(host);
|
||||
const project = workspace.projects.get(options.project);
|
||||
if (!project) {
|
||||
throw new schematics_1.SchematicsException(`Project name "${options.project}" doesn't not exist.`);
|
||||
}
|
||||
return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
||||
(0, schematics_1.filter)((p) => p.endsWith('.browserslistrc.template')),
|
||||
(0, schematics_1.applyTemplates)({}),
|
||||
(0, schematics_1.move)(project.root),
|
||||
]));
|
||||
};
|
||||
}
|
||||
function addKarmaConfig(options) {
|
||||
return (0, utility_1.updateWorkspace)((workspace) => {
|
||||
const project = workspace.projects.get(options.project);
|
||||
if (!project) {
|
||||
throw new schematics_1.SchematicsException(`Project name "${options.project}" doesn't not exist.`);
|
||||
}
|
||||
const testTarget = project.targets.get('test');
|
||||
if (!testTarget) {
|
||||
throw new schematics_1.SchematicsException(`No "test" target found for project "${options.project}".` +
|
||||
' A "test" target is required to generate a karma configuration.');
|
||||
}
|
||||
if (testTarget.builder !== utility_1.AngularBuilder.Karma) {
|
||||
throw new schematics_1.SchematicsException(`Cannot add a karma configuration as builder for "test" target in project does not use "${utility_1.AngularBuilder.Karma}".`);
|
||||
}
|
||||
testTarget.options ??= {};
|
||||
testTarget.options.karmaConfig = path_1.posix.join(project.root, 'karma.conf.js');
|
||||
// If scoped project (i.e. "@foo/bar"), convert dir to "foo/bar".
|
||||
let folderName = options.project.startsWith('@') ? options.project.slice(1) : options.project;
|
||||
if (/[A-Z]/.test(folderName)) {
|
||||
folderName = schematics_1.strings.dasherize(folderName);
|
||||
}
|
||||
return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
||||
(0, schematics_1.filter)((p) => p.endsWith('karma.conf.js.template')),
|
||||
(0, schematics_1.applyTemplates)({
|
||||
relativePathToWorkspaceRoot: (0, paths_1.relativePathToWorkspaceRoot)(project.root),
|
||||
folderName,
|
||||
}),
|
||||
(0, schematics_1.move)(project.root),
|
||||
]));
|
||||
});
|
||||
}
|
20
my-app/node_modules/@schematics/angular/config/schema.d.ts
generated
vendored
Executable file
20
my-app/node_modules/@schematics/angular/config/schema.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Generates a configuration file in the given project.
|
||||
*/
|
||||
export interface Schema {
|
||||
/**
|
||||
* The name of the project.
|
||||
*/
|
||||
project: string;
|
||||
/**
|
||||
* Specifies which type of configuration file to create.
|
||||
*/
|
||||
type: Type;
|
||||
}
|
||||
/**
|
||||
* Specifies which type of configuration file to create.
|
||||
*/
|
||||
export declare enum Type {
|
||||
Browserslist = "browserslist",
|
||||
Karma = "karma"
|
||||
}
|
13
my-app/node_modules/@schematics/angular/config/schema.js
generated
vendored
Executable file
13
my-app/node_modules/@schematics/angular/config/schema.js
generated
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
|
||||
// CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Type = void 0;
|
||||
/**
|
||||
* Specifies which type of configuration file to create.
|
||||
*/
|
||||
var Type;
|
||||
(function (Type) {
|
||||
Type["Browserslist"] = "browserslist";
|
||||
Type["Karma"] = "karma";
|
||||
})(Type || (exports.Type = Type = {}));
|
28
my-app/node_modules/@schematics/angular/config/schema.json
generated
vendored
Executable file
28
my-app/node_modules/@schematics/angular/config/schema.json
generated
vendored
Executable file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "SchematicsAngularConfig",
|
||||
"title": "Angular Config File Options Schema",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Generates a configuration file in the given project.",
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The name of the project.",
|
||||
"$default": {
|
||||
"$source": "projectName"
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Specifies which type of configuration file to create.",
|
||||
"enum": ["karma", "browserslist"],
|
||||
"x-prompt": "Which type of configuration file would you like to create?",
|
||||
"$default": {
|
||||
"$source": "argv",
|
||||
"index": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["project", "type"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue