forked from vmware-archive/clarity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ngcc.js
45 lines (39 loc) · 1.28 KB
/
ngcc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* Copyright (c) 2016-2020 VMware, Inc. All Rights Reserved.
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
'use strict';
const fs = require('fs');
const path = require('path');
const ignoreList = ['src/schematics'];
const findPackagesSync = function(dir, list = []) {
if (dir.indexOf('src/schematics') > -1) {
return list;
}
const files = fs.readdirSync(dir);
files.forEach(file => {
if (fs.statSync(dir + '/' + file).isDirectory()) {
list = findPackagesSync(dir + '/' + file, list);
} else {
if (path.basename(file) === 'package.json') {
list.push(dir + '/' + file);
}
}
});
return list;
};
module.exports = findPackagesSync(path.join(process.cwd(), 'src'));
// module.exports = [
// './src/clr-angular/package.json',
// './src/clr-ui/package.json',
// './src/clr-icons/package.json',
// './src/clr-core/package.json',
// './src/clr-core/badge/package.json',
// './src/clr-core/button/package.json',
// './src/clr-core/internal/package.json',
// './src/clr-core/icon-shapes/package.json',
// './src/clr-core/icon/package.json',
// './src/clr-core/tag/package.json',
// './src/clr-core/test-dropdown/package.json',
// ];