diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-01 21:54:41 +0100 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-01 21:54:41 +0100 |
commit | 6c8128f9fd5a5d0be115806c35a21b3d683df8d6 (patch) | |
tree | f46c2f6b3b9b294ff32bd75c08ccdc9e7a8cc4ef /sandbox/testAppNevena/Front/node_modules/@schematics/angular/library | |
parent | 2400b84e95913665da6279114168148444b8f9ab (diff) | |
parent | 7d3640f824f46490b47bd95f1c5a16644f712068 (diff) |
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into logo
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@schematics/angular/library')
16 files changed, 448 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/.browserslistrc.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/.browserslistrc.template new file mode 100644 index 00000000..4f9ac269 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/.browserslistrc.template @@ -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 1 Chrome version +last 1 Firefox version +last 2 Edge major versions +last 2 Safari major versions +last 2 iOS major versions +Firefox ESR diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/README.md.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/README.md.template new file mode 100644 index 00000000..8545804c --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/README.md.template @@ -0,0 +1,24 @@ +# <%= classify(name) %> + +This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version <%= angularLatestVersion %>. + +## Code scaffolding + +Run `ng generate component component-name --project <%= name %>` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project <%= name %>`. +> Note: Don't forget to add `--project <%= name %>` or else it will be added to the default project in your `angular.json` file. + +## Build + +Run `ng build <%= name %>` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Publishing + +After building your library with `ng build <%= name %>`, go to the dist folder `cd dist/<%= dasherize(name) %>` and run `npm publish`. + +## Running unit tests + +Run `ng test <%= name %>` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/karma.conf.js.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/karma.conf.js.template new file mode 100644 index 00000000..0cefa1c1 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/karma.conf.js.template @@ -0,0 +1,44 @@ +// 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'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false, + restartOnFileChange: true + }); +}; diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/ng-package.json.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/ng-package.json.template new file mode 100644 index 00000000..c0f915ca --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/ng-package.json.template @@ -0,0 +1,7 @@ +{ + "$schema": "<%= relativePathToWorkspaceRoot %>/node_modules/ng-packagr/ng-package.schema.json", + "dest": "<%= relativePathToWorkspaceRoot %>/<%= distRoot %>", + "lib": { + "entryFile": "src/<%= entryFile %>.ts" + } +}
\ No newline at end of file diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/package.json.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/package.json.template new file mode 100644 index 00000000..dde7d496 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/package.json.template @@ -0,0 +1,11 @@ +{ + "name": "<%= dasherize(packageName) %>", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^<%= angularLatestVersion %>", + "@angular/core": "^<%= angularLatestVersion %>" + }, + "dependencies": { + "tslib": "^<%= tsLibLatestVersion %>" + } +}
\ No newline at end of file diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/src/__entryFile__.ts.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/src/__entryFile__.ts.template new file mode 100644 index 00000000..b4d46cdc --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/src/__entryFile__.ts.template @@ -0,0 +1,7 @@ +/* + * Public API Surface of <%= dasherize(name) %> + */ + +export * from './lib/<%= dasherize(name) %>.service'; +export * from './lib/<%= dasherize(name) %>.component'; +export * from './lib/<%= dasherize(name) %>.module'; diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/src/test.ts.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/src/test.ts.template new file mode 100644 index 00000000..bcca659d --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/src/test.ts.template @@ -0,0 +1,27 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js'; +import 'zone.js/testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: { + context(path: string, deep?: boolean, filter?: RegExp): { + <T>(id: string): T; + keys(): string[]; + }; +}; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting(), +); + +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.lib.json.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.lib.json.template new file mode 100644 index 00000000..353a24b4 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.lib.json.template @@ -0,0 +1,15 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", + "compilerOptions": { + "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/lib", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [] + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.lib.prod.json.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.lib.prod.json.template new file mode 100644 index 00000000..06de549e --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.lib.prod.json.template @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, + "angularCompilerOptions": { + "compilationMode": "partial" + } +} diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.spec.json.template b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.spec.json.template new file mode 100644 index 00000000..2108b9b9 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/files/tsconfig.spec.json.template @@ -0,0 +1,17 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", + "compilerOptions": { + "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "files": [ + "src/test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/index.d.ts b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/index.d.ts new file mode 100644 index 00000000..1142a435 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/index.d.ts @@ -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 LibraryOptions } from './schema'; +export default function (options: LibraryOptions): Rule; diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/index.js b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/index.js new file mode 100644 index 00000000..0f4011d3 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/index.js @@ -0,0 +1,171 @@ +"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 core_1 = require("@angular-devkit/core"); +const schematics_1 = require("@angular-devkit/schematics"); +const tasks_1 = require("@angular-devkit/schematics/tasks"); +const dependencies_1 = require("../utility/dependencies"); +const json_file_1 = require("../utility/json-file"); +const latest_versions_1 = require("../utility/latest-versions"); +const paths_1 = require("../utility/paths"); +const workspace_1 = require("../utility/workspace"); +const workspace_models_1 = require("../utility/workspace-models"); +function updateTsConfig(packageName, ...paths) { + return (host) => { + if (!host.exists('tsconfig.json')) { + return host; + } + const file = new json_file_1.JSONFile(host, 'tsconfig.json'); + const jsonPath = ['compilerOptions', 'paths', packageName]; + const value = file.get(jsonPath); + file.modify(jsonPath, Array.isArray(value) ? [...value, ...paths] : paths); + }; +} +function addDependenciesToPackageJson() { + return (host) => { + [ + { + type: dependencies_1.NodeDependencyType.Dev, + name: '@angular/compiler-cli', + version: latest_versions_1.latestVersions.Angular, + }, + { + type: dependencies_1.NodeDependencyType.Dev, + name: '@angular-devkit/build-angular', + version: latest_versions_1.latestVersions.DevkitBuildAngular, + }, + { + type: dependencies_1.NodeDependencyType.Dev, + name: 'ng-packagr', + version: latest_versions_1.latestVersions['ng-packagr'], + }, + { + type: dependencies_1.NodeDependencyType.Default, + name: 'tslib', + version: latest_versions_1.latestVersions['tslib'], + }, + { + type: dependencies_1.NodeDependencyType.Dev, + name: 'typescript', + version: latest_versions_1.latestVersions['typescript'], + }, + ].forEach((dependency) => (0, dependencies_1.addPackageJsonDependency)(host, dependency)); + return host; + }; +} +function addLibToWorkspaceFile(options, projectRoot, projectName) { + return (0, workspace_1.updateWorkspace)((workspace) => { + if (workspace.projects.size === 0) { + workspace.extensions.defaultProject = projectName; + } + workspace.projects.add({ + name: projectName, + root: projectRoot, + sourceRoot: `${projectRoot}/src`, + projectType: workspace_models_1.ProjectType.Library, + prefix: options.prefix, + targets: { + build: { + builder: workspace_models_1.Builders.NgPackagr, + defaultConfiguration: 'production', + options: { + project: `${projectRoot}/ng-package.json`, + }, + configurations: { + production: { + tsConfig: `${projectRoot}/tsconfig.lib.prod.json`, + }, + development: { + tsConfig: `${projectRoot}/tsconfig.lib.json`, + }, + }, + }, + test: { + builder: workspace_models_1.Builders.Karma, + options: { + main: `${projectRoot}/src/test.ts`, + tsConfig: `${projectRoot}/tsconfig.spec.json`, + karmaConfig: `${projectRoot}/karma.conf.js`, + }, + }, + }, + }); + }); +} +function default_1(options) { + return async (host) => { + const prefix = options.prefix; + // If scoped project (i.e. "@foo/bar"), convert projectDir to "foo/bar". + const packageName = options.name; + if (/^@.*\/.*/.test(options.name)) { + const [, name] = options.name.split('/'); + options.name = name; + } + const workspace = await (0, workspace_1.getWorkspace)(host); + const newProjectRoot = workspace.extensions.newProjectRoot || ''; + let folderName = packageName.startsWith('@') ? packageName.substr(1) : packageName; + if (/[A-Z]/.test(folderName)) { + folderName = core_1.strings.dasherize(folderName); + } + const projectRoot = (0, core_1.join)((0, core_1.normalize)(newProjectRoot), folderName); + const distRoot = `dist/${folderName}`; + const pathImportLib = `${distRoot}/${folderName.replace('/', '-')}`; + const sourceDir = `${projectRoot}/src/lib`; + const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [ + (0, schematics_1.applyTemplates)({ + ...core_1.strings, + ...options, + packageName, + projectRoot, + distRoot, + relativePathToWorkspaceRoot: (0, paths_1.relativePathToWorkspaceRoot)(projectRoot), + prefix, + angularLatestVersion: latest_versions_1.latestVersions.Angular.replace(/~|\^/, ''), + tsLibLatestVersion: latest_versions_1.latestVersions['tslib'].replace(/~|\^/, ''), + folderName, + }), + (0, schematics_1.move)(projectRoot), + ]); + return (0, schematics_1.chain)([ + (0, schematics_1.mergeWith)(templateSource), + addLibToWorkspaceFile(options, projectRoot, packageName), + options.skipPackageJson ? (0, schematics_1.noop)() : addDependenciesToPackageJson(), + options.skipTsConfig ? (0, schematics_1.noop)() : updateTsConfig(packageName, pathImportLib, distRoot), + (0, schematics_1.schematic)('module', { + name: options.name, + commonModule: false, + flat: true, + path: sourceDir, + project: packageName, + }), + (0, schematics_1.schematic)('component', { + name: options.name, + selector: `${prefix}-${options.name}`, + inlineStyle: true, + inlineTemplate: true, + flat: true, + path: sourceDir, + export: true, + project: packageName, + }), + (0, schematics_1.schematic)('service', { + name: options.name, + flat: true, + path: sourceDir, + project: packageName, + }), + (_tree, context) => { + if (!options.skipPackageJson && !options.skipInstall) { + context.addTask(new tasks_1.NodePackageInstallTask()); + } + }, + ]); + }; +} +exports.default = default_1; diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/library-long.md b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/library-long.md new file mode 100644 index 00000000..a61e0beb --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/library-long.md @@ -0,0 +1,5 @@ +A library is a type of project that does not run independently. +The library skeleton created by this command is placed by default in the `/projects` folder, and has `type` of "library". + +You can build a new library using the `ng build` command, run unit tests for it using the `ng test` command, +and lint it using the `ng lint` command. diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.d.ts b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.d.ts new file mode 100644 index 00000000..d0e0aeb7 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.d.ts @@ -0,0 +1,30 @@ +/** + * Creates a new, generic library project in the current workspace. + */ +export interface Schema { + /** + * The path at which to create the library's public API file, relative to the workspace root. + */ + entryFile?: string; + /** + * The name of the library. + */ + name: string; + /** + * A prefix to apply to generated selectors. + */ + prefix?: string; + /** + * Do not install dependency packages. + */ + skipInstall?: boolean; + /** + * Do not add dependencies to the "package.json" file. + */ + skipPackageJson?: boolean; + /** + * Do not update "tsconfig.json" to add a path mapping for the new library. The path mapping + * is needed to use the library in an app, but can be disabled here to simplify development. + */ + skipTsConfig?: boolean; +} diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.js b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.js new file mode 100644 index 00000000..4fb6d3d1 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.js @@ -0,0 +1,4 @@ +"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 }); diff --git a/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.json b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.json new file mode 100644 index 00000000..18da4f76 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@schematics/angular/library/schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "SchematicsLibrary", + "title": "Library Options Schema", + "type": "object", + "description": "Creates a new, generic library project in the current workspace.", + "long-description": "./library-long.md", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the library.", + "pattern": "^(?:@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*/)?[a-zA-Z0-9-~][a-zA-Z0-9-._~]*$", + "$default": { + "$source": "argv", + "index": 0 + }, + "x-prompt": "What name would you like to use for the library?" + }, + "entryFile": { + "type": "string", + "format": "path", + "description": "The path at which to create the library's public API file, relative to the workspace root.", + "default": "public-api" + }, + "prefix": { + "type": "string", + "format": "html-selector", + "description": "A prefix to apply to generated selectors.", + "default": "lib", + "alias": "p" + }, + "skipPackageJson": { + "type": "boolean", + "default": false, + "description": "Do not add dependencies to the \"package.json\" file. " + }, + "skipInstall": { + "description": "Do not install dependency packages.", + "type": "boolean", + "default": false + }, + "skipTsConfig": { + "type": "boolean", + "default": false, + "description": "Do not update \"tsconfig.json\" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development." + } + }, + "required": ["name"] +} |