-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathgulpfile.js
36 lines (32 loc) · 1.12 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
'use strict';
var plugin = require('./package.json');
var gulp = require('gulp');
var sass = require('gulp-sass');
var wpPot = require('gulp-wp-pot');
var sort = require('gulp-sort');
var autoprefixer = require('gulp-autoprefixer');
gulp.task('makepot', function () {
return gulp.src(['algolia-woocommerce.php', 'includes/*.php', 'templates/*.php'])
.pipe(sort())
.pipe(wpPot( {
domain: 'algolia-woocommerce',
destFile:'algolia-woocommerce.pot',
package: 'Algolia for WooCommerce ' + plugin.version,
/*bugReport: 'http://example.com',
lastTranslator: 'John Doe <[email protected]>',
team: 'Team Team <[email protected]>'*/
} ))
.pipe(gulp.dest('languages'));
});
gulp.task('sass', function () {
return gulp.src(['./assets/css/scss/admin.scss', './assets/css/scss/algolia-woocommerce-instantsearch.scss'])
.pipe(sass())
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(gulp.dest('./assets/css'));
});
gulp.task('sass:watch', ['sass'], function () {
gulp.watch(['./assets/css/scss/*.scss','./assets/css/scss/components/*.scss'], ['sass']);
});