-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
executable file
·105 lines (101 loc) · 2.69 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/**
* Gulp task config file.
*/
'use strict';
var pkg = require( './package.json' ),
gulp = require( 'gulp' ),
globs = require( 'gulp-src-ordered-globs' ),
toolkit = require( 'gulp-wp-toolkit' ),
zip = require( 'gulp-zip' );
toolkit.extendConfig(
{
theme: {
name: pkg.theme.name,
themeuri: pkg.theme.uri,
description: pkg.description,
author: pkg.author,
authoruri: pkg.theme.authoruri,
version: pkg.version,
license: pkg.license,
licenseuri: pkg.theme.licenseuri,
tags: pkg.theme.tags,
textdomain: pkg.theme.textdomain,
domainpath: pkg.theme.domainpath,
template: pkg.theme.template,
notes: pkg.theme.notes
},
src: {
php: ['**/*.php', '!vendor/**'],
images: 'resources/img/**/*',
scss: 'resources/scss/**/*.scss',
css: ['**/*.css', '!node_modules/**', '!develop/vendor/**'],
js: ['resources/js/**/*.js', '!node_modules/**'],
json: ['**/*.json', '!node_modules/**'],
i18n: './resources/lang/',
sassdoc: './resources/scss/**/*.scss',
zip: [
'./**/*',
'!./*.zip',
'!./git',
'!./git/**/*',
'!./node_modules',
'!./node_modules/**/*',
'!./vendor',
'!./vendor/**/*',
'./vendor/autoload.php',
'./vendor/composer/*.php',
'./vendor/composer/installed.json',
'./vendor/seothemes/core/src/*.php',
'./vendor/tgmpa/tgm-plugin-activation/languages/*',
'./vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php'
]
},
css: {
basefontsize: 10, // Used by postcss-pxtorem.
remmediaquery: false,
scss: {
'style': {
src: 'resources/scss/style.scss',
dest: './',
outputStyle: 'expanded'
},
'woocommerce': {
src: 'resources/scss/vendor/woocommerce/__index.scss',
dest: './',
outputStyle: 'expanded'
}
},
sassdoc: {
dest: './sassdoc'
}
},
dest: {
i18npo: './resources/lang/',
i18nmo: './resources/lang/',
images: './resources/img/',
js: './resources/js/'
},
/*server: {
proxy: 'https://genesis-starter.test',
host: 'genesis-starter.test',
open: 'external',
port: '8000',
https: {
'key': '/Users/seothemes/.valet/Certificates/genesis-starter.test.key',
'cert': '/Users/seothemes/.valet/Certificates/genesis-starter.test.crt'
}
}*/
}
);
toolkit.extendTasks( gulp, {
'zip': function() {
return globs(toolkit.config.src.zip, {base: './'}).
pipe(zip(pkg.name + '-' + pkg.version + '.zip')).
pipe(gulp.dest('../'));
},
'sassdoc': function () {
return gulp.src(toolkit.config.src.sassdoc)
.pipe(sassdoc(toolkit.config.css.sassdoc))
.resume();
}
} );