-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.js
22 lines (22 loc) · 928 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const generate_from_files_1 = require("../utility/generate-from-files");
function default_1(options) {
// This schematic uses an older method to implement the flat option
const flat = options.flat;
options.flat = true;
const extraTemplateValues = {
'if-flat': (s) => (flat ? '' : s),
};
return options.functional
? (0, generate_from_files_1.generateFromFiles)({ ...options, templateFilesDirectory: './functional-files' }, extraTemplateValues)
: (0, generate_from_files_1.generateFromFiles)({ ...options, templateFilesDirectory: './class-files' }, extraTemplateValues);
}