diff --git a/.editorconfig b/.editorconfig
index d3fa63321c..c27418fc41 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,5 +7,6 @@ indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
+end_of_line = lf
[*.md]
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..ba65a96f11
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+#Auto detect text files and perform LF normalization
+* text=input
diff --git a/.prettierignore b/.prettierignore
index 3ef7058ed4..fdd55f4842 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -3,12 +3,12 @@ package-lock.json
dist
angular.json
.vscode/*
-projects/*/*/schematics/*/index.js
-projects/*/*/schematics/*/files
+projects/**/schematics/*/index.js
+projects/**/schematics/*/files
projects/angular-showcase/src/assets/**/*
projects/angular-showcase/src/docs/**/*
tools
coverage
-**/icon-*.module.ts
+**/svg-icons/**/icon-*.module.ts
**/*.svg
**/*.properties
\ No newline at end of file
diff --git a/angular.json b/angular.json
index 1f4bcb817e..36ace847e8 100644
--- a/angular.json
+++ b/angular.json
@@ -285,7 +285,8 @@
"projects/sbb-esta/angular-icons/tsconfig.spec.json"
],
"exclude": [
- "**/node_modules/**"
+ "**/node_modules/**",
+ "**/schematics/*/files/**/*"
]
}
}
diff --git a/package-lock.json b/package-lock.json
index c03b1710d6..00057d0bcb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13716,6 +13716,26 @@
}
}
},
+ "rollup-plugin-copy-glob": {
+ "version": "0.3.0",
+ "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/rollup-plugin-copy-glob/-/rollup-plugin-copy-glob-0.3.0.tgz",
+ "integrity": "sha1-zsDpbCbopa7gkwxi5hR/lBo5RS0=",
+ "dev": true,
+ "requires": {
+ "chokidar": "2.0.4",
+ "colors": "1.3.3",
+ "glob": "7.1.3",
+ "glob-parent": "3.1.0"
+ },
+ "dependencies": {
+ "colors": {
+ "version": "1.3.3",
+ "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/colors/-/colors-1.3.3.tgz",
+ "integrity": "sha1-OeAF1Uav4B4B+cTKj6UPaGoBIF0=",
+ "dev": true
+ }
+ }
+ },
"rollup-plugin-json": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz",
diff --git a/package.json b/package.json
index 3c29173a25..ebb2abc49d 100644
--- a/package.json
+++ b/package.json
@@ -5,15 +5,37 @@
"ng": "ng",
"start": "ng serve",
"clean": "rimraf dist coverage lintReport.json",
- "lint": "ng lint angular-showcase",
- "test": "ng test angular-showcase -c ci",
- "build": "ng build angular-showcase --prod",
- "build:angular-icons": "cd projects/sbb-esta/angular-icons && npm run build",
- "build:angular-icons:license": "cd projects/sbb-esta/angular-icons && npm run build:license",
- "build:angular-icons:schematics": "cd projects/sbb-esta/angular-icons && npm run build:schematics",
- "build:angular-public": "cd projects/sbb-esta/angular-public && npm run build",
- "e2e": "ng e2e angular-showcase",
- "docs": "gulp docs"
+ "build": "run-s angular-icons angular-public angular-showcase",
+ "angular-icons": "run-s angular-icons:*",
+ "angular-icons:lint": "ng lint @sbb-esta/angular-icons",
+ "angular-icons:build": "run-s angular-icons:build:*",
+ "angular-icons:build:ng": "ng build @sbb-esta/angular-icons",
+ "angular-icons:build:license": "copyfiles LICENSE ./dist/sbb-esta/angular-icons/",
+ "angular-icons:build:schematics": "cd projects/sbb-esta/angular-icons && rollup --config rollup.config.js",
+ "angular-icons:build:schematics:generate-icons": "cd projects/sbb-esta/angular-icons && schematics .:generate-icon-modules --dist src/lib --debug false",
+ "angular-business": "run-s angular-business:*",
+ "angular-business:lint": "ng lint @sbb-esta/angular-business",
+ "angular-business:test": "ng test @sbb-esta/angular-business -c ci",
+ "angular-business:build": "run-s angular-business:build:*",
+ "angular-business:build:ng": "ng build @sbb-esta/angular-business",
+ "angular-business:build:license": "copyfiles LICENSE ./dist/sbb-esta/angular-business/",
+ "angular-public": "run-s angular-public:lint angular-public:test angular-public:build",
+ "angular-public:lint": "run-p angular-public:lint:*",
+ "angular-public:lint:console": "ng lint @sbb-esta/angular-icons",
+ "angular-public:lint:report": "ng lint @sbb-esta/angular-icons > lintReport.json",
+ "angular-public:test": "ng test @sbb-esta/angular-public -c ci",
+ "angular-public:sonar": "cross-env-shell \"sonar-scanner -Dsonar.projectVersion=$npm_package_version -Dsonar.branch.name=$BRANCH_NAME\"",
+ "angular-public:build": "run-s angular-public:build:*",
+ "angular-public:build:ng": "ng build @sbb-esta/angular-public",
+ "angular-public:build:styles": "scss-bundle -e ./projects/sbb-esta/angular-public/src/styles/main.scss -d ./dist/sbb-esta/angular-public/styles.scss",
+ "angular-public:build:typography": "node-sass ./projects/sbb-esta/angular-public/src/typography.scss ./dist/sbb-esta/angular-public/typography.css",
+ "angular-public:build:license": "copyfiles LICENSE ./dist/sbb-esta/angular-public/",
+ "angular-showcase": "run-s angular-showcase:lint angular-showcase:test angular-showcase:build",
+ "angular-showcase:lint": "ng lint angular-showcase",
+ "angular-showcase:test": "ng test angular-showcase -c ci",
+ "angular-showcase:build": "ng build angular-showcase --prod",
+ "angular-showcase:e2e": "ng e2e angular-showcase",
+ "angular-showcase:docs": "gulp docs"
},
"repository": {
"type": "git",
@@ -101,6 +123,7 @@
"prettier": "1.17.0",
"protractor": "^5.4.2",
"rollup": "^1.9.0",
+ "rollup-plugin-copy-glob": "^0.3.0",
"rollup-plugin-typescript2": "^0.20.1",
"run-sequence": "^2.2.1",
"scss-bundle": "^2.4.0",
@@ -126,6 +149,7 @@
},
"prettier": {
"singleQuote": true,
+ "endOfLine": "lf",
"overrides": [
{
"files": "*.html",
@@ -142,7 +166,7 @@
},
"lint-staged": {
"*.{js,ts,css,scss,json,md,html}": [
- "prettier --write",
+ "npx prettier --write",
"git add",
"npx ng lint @sbb-esta/angular-public"
]
diff --git a/projects/angular-showcase/src/app/app.module.ts b/projects/angular-showcase/src/app/app.module.ts
index 60c14249ad..2fda5c00b9 100644
--- a/projects/angular-showcase/src/app/app.module.ts
+++ b/projects/angular-showcase/src/app/app.module.ts
@@ -8,7 +8,7 @@ import { MonacoEditorModule } from 'ngx-monaco-editor';
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import {
IconCollectionModule,
- iconComponentList
+ ICON_COMPONENT_LIST
} from '@sbb-esta/angular-icons';
import { AppRoutingModule } from './app-routing.module';
@@ -135,7 +135,7 @@ import { TypographyComponent } from './typography/typography.component';
BreadcrumbShowcaseComponent,
GhettoboxShowcaseComponent,
BadgeShowcaseComponent,
- ...iconComponentList
+ ...ICON_COMPONENT_LIST
]
})
export class AppModule {}
diff --git a/projects/angular-showcase/src/app/directives/icon-viewer.directive.ts b/projects/angular-showcase/src/app/directives/icon-viewer.directive.ts
index 774f35644c..487f0a88a9 100644
--- a/projects/angular-showcase/src/app/directives/icon-viewer.directive.ts
+++ b/projects/angular-showcase/src/app/directives/icon-viewer.directive.ts
@@ -5,7 +5,7 @@ import {
OnChanges,
ViewContainerRef
} from '@angular/core';
-import { iconComponentsMetaInformation } from '@sbb-esta/angular-icons';
+import { ICON_COMPONENT_META_INFORMATION } from '@sbb-esta/angular-icons';
import { UiIcon } from '../shared/ui-icon';
@@ -24,7 +24,7 @@ export class IconViewerDirective implements OnChanges {
) {}
loadIconComponent(): void {
- const component = iconComponentsMetaInformation.find(
+ const component = ICON_COMPONENT_META_INFORMATION.find(
i => i.name === this.sbbIconViewer.name
).component;
const componentFactory = this._resolver.resolveComponentFactory(component);
diff --git a/projects/angular-showcase/src/app/services/icon-ui.service.ts b/projects/angular-showcase/src/app/services/icon-ui.service.ts
index 4761bea8a8..09fbe1f40e 100644
--- a/projects/angular-showcase/src/app/services/icon-ui.service.ts
+++ b/projects/angular-showcase/src/app/services/icon-ui.service.ts
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
-import { iconComponentsMetaInformation } from '@sbb-esta/angular-icons';
+import { ICON_COMPONENT_META_INFORMATION } from '@sbb-esta/angular-icons';
import { UiComponent } from '../shared/ui-component';
import { UiIcon } from '../shared/ui-icon';
@@ -9,21 +9,21 @@ import { UiIcon } from '../shared/ui-icon';
})
export class IconUiService {
getUiIconByRouterLink(name: any): UiIcon {
- return iconComponentsMetaInformation
- .map(item => new UiIcon(item.name, item.selector, item.modules))
- .find(
- uiIcon =>
- uiIcon.name.localeCompare(name, 'en', { sensitivity: 'base' }) === 0
- );
+ return ICON_COMPONENT_META_INFORMATION.map(
+ item => new UiIcon(item.name, item.selector, item.modules)
+ ).find(
+ uiIcon =>
+ uiIcon.name.localeCompare(name, 'en', { sensitivity: 'base' }) === 0
+ );
}
getUiComponentByRouterLink(name: any): UiComponent {
- const foundUiIcon: UiIcon = iconComponentsMetaInformation
- .map(item => new UiIcon(item.name, item.selector, item.modules))
- .find(
- uiIcon =>
- uiIcon.name.localeCompare(name, 'en', { sensitivity: 'base' }) === 0
- );
+ const foundUiIcon: UiIcon = ICON_COMPONENT_META_INFORMATION.map(
+ item => new UiIcon(item.name, item.selector, item.modules)
+ ).find(
+ uiIcon =>
+ uiIcon.name.localeCompare(name, 'en', { sensitivity: 'base' }) === 0
+ );
return new UiComponent(
foundUiIcon.name,
foundUiIcon.name,
@@ -39,33 +39,35 @@ export class IconUiService {
}
getUiIconsBySearchValue(searchValue: any) {
- if (searchValue.length > 0) {
- return iconComponentsMetaInformation
- .filter(
- uiIcon =>
- new RegExp(searchValue, 'ig').test(uiIcon.name) ||
- new RegExp(searchValue, 'ig').test(uiIcon.selector) ||
- uiIcon.modules.find(tag => new RegExp(searchValue, 'ig').test(tag))
- )
- .map(item => new UiIcon(item.name, item.selector, item.modules))
- .map(uiIcon => {
- if (new RegExp(searchValue, 'ig').test(uiIcon.name)) {
- uiIcon.label = uiIcon.label.replace(
- new RegExp(searchValue, 'ig'),
- m => `${m}`
- );
- }
- return uiIcon;
- })
- .sort((a, b) => a.name.localeCompare(b.name));
+ if (!searchValue) {
+ return this.getAll();
}
- return this.getAll();
+ const searchRegex = new RegExp(searchValue, 'ig');
+ return ICON_COMPONENT_META_INFORMATION.filter(
+ icon =>
+ searchRegex.test(icon.name) ||
+ searchRegex.test(icon.selector) ||
+ icon.modules.find(tag => searchRegex.test(tag))
+ )
+ .sort((a, b) => a.name.localeCompare(b.name))
+ .concat(
+ ICON_COMPONENT_META_INFORMATION.filter(icon =>
+ icon.meta.some(m => searchRegex.test(m))
+ )
+ )
+ .map(icon => new UiIcon(icon.name, icon.selector, icon.modules))
+ .map(icon => {
+ if (searchRegex.test(icon.name)) {
+ icon.label = icon.label.replace(searchRegex, m => `${m}`);
+ }
+ return icon;
+ });
}
getAll(): Array {
- return iconComponentsMetaInformation
- .map(item => new UiIcon(item.name, item.selector, item.modules))
- .sort((a, b) => a.name.localeCompare(b.name));
+ return ICON_COMPONENT_META_INFORMATION.map(
+ item => new UiIcon(item.name, item.selector, item.modules)
+ ).sort((a, b) => a.name.localeCompare(b.name));
}
}
diff --git a/projects/sbb-esta/angular-business/package.json b/projects/sbb-esta/angular-business/package.json
index daac77d23b..7bd54d3b95 100644
--- a/projects/sbb-esta/angular-business/package.json
+++ b/projects/sbb-esta/angular-business/package.json
@@ -1,14 +1,6 @@
{
"name": "@sbb-esta/angular-business",
"version": "0.0.0-PLACEHOLDER",
- "scripts": {
- "lint": "ng lint @sbb-esta/angular-business",
- "test": "ng test @sbb-esta/angular-business -c ci",
- "build": "run-s build:ng build:license",
- "build:ng": "ng build @sbb-esta/angular-business",
- "build:license": "cd ../../../ && copyfiles LICENSE ./dist/sbb-esta/angular-business/",
- "build:schematics": "rollup --config rollup.config.js"
- },
"repository": {
"type": "git",
"url": "git+https://github.com/SchweizerischeBundesbahnen/sbb-angular.git"
diff --git a/projects/sbb-esta/angular-icons/package.json b/projects/sbb-esta/angular-icons/package.json
index 52a48f1248..989e64c418 100644
--- a/projects/sbb-esta/angular-icons/package.json
+++ b/projects/sbb-esta/angular-icons/package.json
@@ -1,14 +1,6 @@
{
"name": "@sbb-esta/angular-icons",
"version": "0.0.0-PLACEHOLDER",
- "scripts": {
- "lint": "ng lint @sbb-esta/angular-icons",
- "test": "ng test @sbb-esta/angular-icons -c ci",
- "build": "run-s build:ng build:license",
- "build:ng": "ng build @sbb-esta/angular-icons",
- "build:license": "cd ../../../ && copyfiles LICENSE ./dist/sbb-esta/angular-icons/",
- "build:schematics": "rollup --config rollup.config.js"
- },
"repository": {
"type": "git",
"url": "git+https://github.com/SchweizerischeBundesbahnen/sbb-angular.git"
diff --git a/projects/sbb-esta/angular-icons/rollup.config.js b/projects/sbb-esta/angular-icons/rollup.config.js
index 5da9957a5a..e2a2fc86d3 100644
--- a/projects/sbb-esta/angular-icons/rollup.config.js
+++ b/projects/sbb-esta/angular-icons/rollup.config.js
@@ -1,11 +1,22 @@
import typescript from 'rollup-plugin-typescript2';
+import copy from 'rollup-plugin-copy-glob';
+import { join } from 'path';
export default {
- input: './schematics/generate-icon-modules/index.ts',
- output: {
- file: './schematics/generate-icon-modules/index.js',
- format: 'cjs'
- },
+ input: join(__dirname, 'schematics/generate-icon-modules/index.ts'),
+ output: [
+ {
+ file: join(__dirname, 'schematics/generate-icon-modules/index.js'),
+ format: 'cjs'
+ },
+ {
+ file: join(
+ __dirname,
+ '../../../dist/sbb-esta/angular-icons/schematics/generate-icon-modules/index.js'
+ ),
+ format: 'cjs'
+ }
+ ],
external: [
'@angular-devkit/schematics',
'@angular-devkit/core',
@@ -14,8 +25,17 @@ export default {
],
plugins: [
typescript({
- tsconfig: 'tsconfig.schematics.json',
+ tsconfig: join(__dirname, 'tsconfig.schematics.json'),
cacheRoot: `${require('os').tmpdir()}/.rpt2_cache_seai_schematics`
- })
+ }),
+ copy([
+ {
+ files: join(__dirname, 'schematics/generate-icon-modules/files/**/*.*'),
+ dest: join(
+ __dirname,
+ '../../../dist/sbb-esta/angular-icons/schematics/generate-icon-modules/files'
+ )
+ }
+ ])
]
};
diff --git a/projects/sbb-esta/angular-icons/schematics/collection.json b/projects/sbb-esta/angular-icons/schematics/collection.json
index 7b7e409c61..11e5c26272 100644
--- a/projects/sbb-esta/angular-icons/schematics/collection.json
+++ b/projects/sbb-esta/angular-icons/schematics/collection.json
@@ -1,8 +1,8 @@
{
- "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
+ "$schema": "../../../../node_modules/@angular-devkit/schematics/collection-schema.json",
"schematics": {
"generate-icon-modules": {
- "description": "A blank schematic.",
+ "description": "Generate icon modules.",
"factory": "./generate-icon-modules/index#generateIconModules",
"schema": "./generate-icon-modules/schema.json"
}
diff --git a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/files/root/meta-information.ts b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/files/root/meta-information.ts
index 45a72a3249..8ceadf1147 100644
--- a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/files/root/meta-information.ts
+++ b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/files/root/meta-information.ts
@@ -17,6 +17,9 @@ export const iconComponentsMetaInformation = [<% for (let icon of icons) { %>
sizes: [<% for (let size of icon.sizes) { %>
'<%= size %>',<% } %>
],
+ meta: [<% for (let meta of icon.meta) { %>
+ '<%= meta %>',<% } %>
+ ],
component: Icon<%= classify(icon.name) %>Component,
},<% } %>
];
diff --git a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/filter-rules.ts b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/filter-rules.ts
deleted file mode 100644
index 33bd10a3de..0000000000
--- a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/filter-rules.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { SvgFile } from './svg-file';
-import { SchematicsException } from '@angular-devkit/schematics';
-
-export const filterRules: Array<
- (svgFile: SvgFile, svgFiles: SvgFile[]) => boolean
-> = [
- (file, files) => {
- if (!file.modules.includes('non-responsive')) {
- return true;
- }
-
- const idNumberMatch = /\_\s*(\d+)\_/.exec(file.name);
- if (!idNumberMatch || !idNumberMatch[1]) {
- throw new SchematicsException(file.name);
- }
-
- return files
- .filter(f => f.modules.includes('responsive'))
- .every(f => !f.name.includes(idNumberMatch[1]));
- }
-];
diff --git a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/icon-collection-module.ts b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/icon-collection-module.ts
index 64d6f5adc4..bc6c75e8c5 100644
--- a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/icon-collection-module.ts
+++ b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/icon-collection-module.ts
@@ -1,14 +1,15 @@
-import { strings, fragment } from '@angular-devkit/core';
+import { fragment, strings } from '@angular-devkit/core';
import {
- DirEntry,
- url,
apply,
- template,
- move,
- mergeWith,
chain,
- Rule
+ DirEntry,
+ mergeWith,
+ move,
+ Rule,
+ template,
+ url
} from '@angular-devkit/schematics';
+
import { IconModule } from './icon-module';
const ICON_ROOT = 'root';
diff --git a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/icon-module.ts b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/icon-module.ts
index 96767cccdf..c86b232f58 100644
--- a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/icon-module.ts
+++ b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/icon-module.ts
@@ -1,13 +1,14 @@
import { strings } from '@angular-devkit/core';
import {
- url,
apply,
- template,
- move,
DirEntry,
mergeWith,
- Rule
+ move,
+ Rule,
+ template,
+ url
} from '@angular-devkit/schematics';
+
import { SvgFile } from './svg-file';
export class IconModule {
@@ -19,10 +20,13 @@ export class IconModule {
.filter(s => !!s)
.sort();
}
+ get meta() {
+ return this._files.map(f => f.filepath);
+ }
private _files: SvgFile[];
- constructor(_files: SvgFile[]) {
- this._files = _files.sort((a, b) => b.size.localeCompare(a.size));
+ constructor(files: SvgFile[]) {
+ this._files = files.sort((a, b) => b.size.localeCompare(a.size));
this.name = this._files[0].name;
this.modules = this._files[0].modules.slice();
}
diff --git a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/index.js b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/index.js
index b28f3a1c79..7116ce3324 100644
--- a/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/index.js
+++ b/projects/sbb-esta/angular-icons/schematics/generate-icon-modules/index.js
@@ -2,8 +2,8 @@
Object.defineProperty(exports, '__esModule', { value: true });
-var schematics = require('@angular-devkit/schematics');
var core = require('@angular-devkit/core');
+var schematics = require('@angular-devkit/schematics');
var rxjs = require('rxjs');
var operators = require('rxjs/operators');
@@ -31,6 +31,103 @@ function __awaiter(thisArg, _arguments, P, generator) {
});
}
+const ICON_ROOT = 'root';
+class IconCollectionModule {
+ constructor(name = '') {
+ this.name = name;
+ this.icons = [];
+ this.collections = [];
+ this.filename = core.strings.dasherize(name || ICON_ROOT);
+ }
+ get iconsRecursive() {
+ return [
+ ...this.icons,
+ ...this.collections.reduce((current, next) => [...current, ...next.iconsRecursive], [])
+ ];
+ }
+ apply(root) {
+ const directory = this.name ? root.dir(core.fragment(this.filename)) : root;
+ return schematics.chain([
+ schematics.mergeWith(schematics.apply(schematics.url('./files/collection'), [
+ schematics.template(Object.assign({}, core.strings, this)),
+ schematics.move(directory.path)
+ ])),
+ ...this.collections.map(c => c.apply(directory)),
+ ...this.icons.map(i => i.apply(directory))
+ ]);
+ }
+}
+
+class IconModule {
+ get sizes() {
+ return this._files
+ .map(f => f.size)
+ .filter(s => !!s)
+ .sort();
+ }
+ get meta() {
+ return this._files.map(f => f.filepath);
+ }
+ constructor(files) {
+ this._files = files.sort((a, b) => b.size.localeCompare(a.size));
+ this.name = this._files[0].name;
+ this.modules = this._files[0].modules.slice();
+ }
+ apply(directory) {
+ const iconBaseImport = () => `${'../'.repeat(this.modules.length)}icon-base`;
+ return schematics.mergeWith(schematics.apply(schematics.url('./files/icon'), [
+ schematics.template(Object.assign({}, core.strings, { iconBaseImport }, this._files[0], (this._files.some(f => ['large', 'medium', 'small'].includes(f.size))
+ ? { width: '24px', height: '24px', ratio: 1 }
+ : undefined), (this._files.length > 1
+ ? { template: this._mergeTemplates() }
+ : undefined))),
+ schematics.move(directory.path)
+ ]));
+ }
+ _mergeTemplates() {
+ return this._files
+ .reduce((current, next, i) => `${current} ${next.template.replace('