-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglob.js
More file actions
27 lines (22 loc) · 681 Bytes
/
glob.js
File metadata and controls
27 lines (22 loc) · 681 Bytes
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
const glob = require('glob');
const path = 'src/main/webapp/resources';
const preview = 'src/main/webapp/preview/**';
const errorMsg = "can't find the js file inside the project.";
const ignore = [
path + '/js/language/**',
path + '/release/**',
path + '/config/**',
path + '/css/**',
path + '/download/**',
path + '/admin/*.js',
path + '/js/admin/common.js',
path + '/js/ja/**',
path + '/js/util/**',
preview
];
// src/main/webapp/**/*.js
module.exports = new Promise( (resolve, reject) => {
glob('src/main/webapp/**/*.js', {ignore}, (err, files) => {
files ? resolve(files) : reject(new Error(errorMsg));
});
});