forked from ruudsilvrants/fs_code_snippet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
executable file
·51 lines (47 loc) · 2.09 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
51
/*global require*/
const { series, src, dest } = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
privatePath = 'Resources/Private/',
prismBasePath = 'node_modules/prismjs/',
customBasePath = privatePath + 'JavaScript/';
function buildJs() {
'use strict';
return src([
prismBasePath + 'components/prism-core.min.js',
prismBasePath + 'components/prism-markup-templating.min.js',
prismBasePath + 'components/prism-markup.min.js',
prismBasePath + 'components/prism-apacheconf.min.js',
prismBasePath + 'components/prism-css.min.js',
prismBasePath + 'components/prism-clike.min.js',
prismBasePath + 'components/prism-javascript.min.js',
prismBasePath + 'components/prism-json.min.js',
prismBasePath + 'components/prism-bash.min.js',
prismBasePath + 'components/prism-php.min.js',
prismBasePath + 'components/prism-less.min.js',
prismBasePath + 'components/prism-php-extras.min.js',
prismBasePath + 'components/prism-sql.min.js',
prismBasePath + 'components/prism-yaml.min.js',
customBasePath + 'prism-typoscript.js',
prismBasePath + 'plugins/toolbar/prism-toolbar.min.js',
prismBasePath + 'plugins/file-highlight/prism-file-highlight.min.js',
prismBasePath + 'plugins/line-numbers/prism-line-numbers.min.js',
prismBasePath + 'plugins/show-language/prism-show-language.min.js',
prismBasePath + 'plugins/command-line/prism-command-line.min.js'
])
.pipe(concat('FsCodeSnippet.js'))
.pipe(uglify())
.pipe(dest('Resources/Public/JavaScript/'));
}
function buildCss() {
'use strict';
return src([
prismBasePath + 'themes/*.css',
prismBasePath + 'plugins/toolbar/prism-toolbar.css',
prismBasePath + 'plugins/line-numbers/prism-line-numbers.css',
prismBasePath + 'plugins/command-line/prism-command-line.css'
])
.pipe(dest('Resources/Public/CSS/'));
}
exports.build = series(buildJs, buildCss);
exports.buildCss = buildCss;