-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
50 lines (45 loc) · 1.66 KB
/
gulpfile.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
46
47
48
49
50
const { src, dest } = require('gulp')
const concat = require('gulp-concat')
// requiring path and fs modules
const path = require('path')
const fs = require('fs')
const directoryPath = 'css'
fs.readdir(directoryPath, function (err, files) {
// handling error
if (err) {
return console.log('Unable to scan directory: ' + err)
}
// listing all files using forEach
files.forEach(function (file) {
// Do whatever you want to do with the file
console.log(file)
})
})
const cssBundle = () =>
src([
directoryPath + '/settings/variables.css',
directoryPath + '/settings/generic-styles.css',
directoryPath + '/settings/typography.css',
directoryPath + '/components/accessibility-controls.css',
directoryPath + '/components/accessibility-preferences.css',
directoryPath + '/components/accordion.css',
directoryPath + '/components/article.css',
directoryPath + '/components/artwork.css',
directoryPath + '/components/breadcrumb.css',
directoryPath + '/components/buttons.css',
directoryPath + '/components/filter.css',
directoryPath + '/components/footer.css',
directoryPath + '/components/header.css',
directoryPath + '/components/hero.css',
directoryPath + '/components/inputs.css',
directoryPath + '/components/layouts.css',
directoryPath + '/components/links.css',
directoryPath + '/components/skip-link.css',
directoryPath + '/components/skip-link.css',
directoryPath + '/components/sub-nav.css',
directoryPath + '/components/other.css'
])
.pipe(concat('styles.css'))
.pipe(dest('assets/css/'))
.pipe(dest('themes/responsibleItTheme/static/admin'))
exports.cssBundle = cssBundle