Commit ba911d6d authored by Tino Goratsch's avatar Tino Goratsch

run the autoprefixer as part of the less gulp task

parent 3bc53b23
Pipeline #50969761 passed with stages
in 2 minutes and 43 seconds
/*
* Copyright (c) by the ACP3 Developers.
* See the LICENSE file at the top-level module directory for licensing details.
*/
module.exports = function (gulp, plugins) {
'use strict';
const autoprefixer = require('autoprefixer');
return function () {
return gulp
.src(
[
'./ACP3/Modules/*/*/Resources/Assets/css/style.css',
'./ACP3/Modules/*/*/Resources/Assets/css/append.css',
'./designs/*/*/Assets/css/style.css',
'./designs/*/*/Assets/css/append.css',
'./designs/**/Assets/css/*.css',
'./installation/design/Assets/css/*.css',
'./installation/Installer/Modules/*/Resources/Assets/css/style.css',
],
{base: './'}
)
.pipe(plugins.postcss([autoprefixer()]))
.pipe(plugins.plumber())
.pipe(gulp.dest('./'));
};
};
......@@ -3,10 +3,10 @@
* See the LICENSE file at the top-level module directory for licencing details.
*/
module.exports = function (gulp) {
module.exports = (gulp) => {
'use strict';
return function (done) {
return (done) => {
const nodeBasePath = './node_modules',
systemBasePath = './ACP3/Modules/ACP3/System/Resources/Assets',
ckeditorBasePath = './ACP3/Modules/ACP3/Wysiwygckeditor/Resources/Assets',
......
......@@ -3,10 +3,12 @@
* See the LICENSE file at the top-level module directory for licencing details.
*/
module.exports = function (gulp, plugins) {
module.exports = (gulp, plugins) => {
'use strict';
return function () {
const autoprefixer = require('autoprefixer');
return () => {
return gulp
.src(
[
......@@ -22,7 +24,8 @@ module.exports = function (gulp, plugins) {
)
.pipe(plugins.plumber())
.pipe(plugins.less())
.pipe(plugins.rename(function (path) {
.pipe(plugins.postcss([autoprefixer()]))
.pipe(plugins.rename((path) => {
path.dirname = path.dirname.substring(0, path.dirname.length - 4) + 'css';
}))
.pipe(gulp.dest('./'));
......
......@@ -3,10 +3,10 @@
* See the LICENSE file at the top-level module directory for licencing details.
*/
module.exports = function (gulp) {
module.exports = (gulp) => {
'use strict';
return function () {
return () => {
// Watch all the .less files, then run the less task
return gulp.watch(
[
......@@ -17,7 +17,7 @@ module.exports = function (gulp) {
'installation/Installer/Modules/*/Resources/Assets/less/style.less'
],
{cwd: './'},
gulp.series('less', 'autoprefixer')
gulp.series('less')
);
};
};
......@@ -16,8 +16,7 @@
gulp.task('copy', getTask('copy'));
gulp.task('bump-version', getTask('bump-version'));
gulp.task('less', getTask('less'));
gulp.task('autoprefixer', getTask('autoprefixer'));
gulp.task('watch', gulp.series('less', 'autoprefixer', getTask('watch')));
gulp.task('watch', gulp.series('less', getTask('watch')));
gulp.task('default', gulp.series('watch'));
})();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment