Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
939 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | /**
|
---|
3 | * @license
|
---|
4 | * Copyright Google LLC All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Use of this source code is governed by an MIT-style license that can be
|
---|
7 | * found in the LICENSE file at https://angular.io/license
|
---|
8 | */
|
---|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
10 | const core_1 = require("@angular-devkit/core");
|
---|
11 | function* visit(directory) {
|
---|
12 | for (const path of directory.subfiles) {
|
---|
13 | if (path !== 'browserslist') {
|
---|
14 | continue;
|
---|
15 | }
|
---|
16 | yield core_1.join(directory.path, path);
|
---|
17 | }
|
---|
18 | for (const path of directory.subdirs) {
|
---|
19 | if (path === 'node_modules' || path.startsWith('.')) {
|
---|
20 | continue;
|
---|
21 | }
|
---|
22 | yield* visit(directory.dir(path));
|
---|
23 | }
|
---|
24 | }
|
---|
25 | function default_1() {
|
---|
26 | return (tree) => {
|
---|
27 | for (const path of visit(tree.root)) {
|
---|
28 | tree.rename(path, path.replace(/browserslist$/, '.browserslistrc'));
|
---|
29 | }
|
---|
30 | };
|
---|
31 | }
|
---|
32 | exports.default = default_1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.