forked from frontend-school/Do-While
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject-layout.js
More file actions
56 lines (52 loc) · 1.23 KB
/
project-layout.js
File metadata and controls
56 lines (52 loc) · 1.23 KB
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
46
47
48
49
50
51
52
53
54
55
56
var deepAllOfType = function (root, ext) {
if (typeof ext === 'undefined')
ext = '*';
return root + '/**/*.' + ext;
};
var allOfType = function (root, ext) {
if (typeof ext === 'undefined')
ext = '*';
return root + '/*.' + ext;
};
var paths = {
src: {
_root: 'src',
scss: 'src/scss',
scss_main: 'src/scss/styles.scss',
js: 'src/js',
img: 'src/img'
},
dist: {
_root: 'dist',
html: 'dist',
js: 'dist/js',
css: 'dist/css',
img: 'dist/img',
vendor: 'dist/vendor'
},
bower: {
_root: "bower_components"
}
};
var patterns = {
src: {
html: allOfType(paths.src._root, 'html'),
js: deepAllOfType(paths.src.js, 'js'),
scss: deepAllOfType(paths.src.scss, 'scss'),
img: deepAllOfType(paths.src.img)
},
bower: {
js: paths.bower._root + '/*/dist/*.js'
},
dist: {
html: allOfType(paths.dist.html),
js: deepAllOfType(paths.dist.js),
css: deepAllOfType(paths.dist.css),
img: deepAllOfType(paths.dist.img),
vendor: deepAllOfType(paths.dist.vendor)
}
};
module.exports = {
paths: paths,
patterns: patterns
};