✏️ Sketch out css preprocessing
This commit is contained in:
parent
b7ee4747f5
commit
b3aa899ffa
|
|
@ -1,5 +1,4 @@
|
|||
/vendor/
|
||||
/node_modules/
|
||||
/build/
|
||||
/application/
|
||||
/tmp/
|
||||
.DS_Store
|
||||
|
|
@ -5,7 +5,8 @@ var gulp = require('gulp'),
|
|||
|
||||
var options = {
|
||||
src: 'src',
|
||||
dist: 'dist'
|
||||
dist: 'dist',
|
||||
workingDir: 'tmp'
|
||||
};
|
||||
|
||||
/** Load tasks from the '/tasks' directory.
|
||||
|
|
@ -22,4 +23,4 @@ wrench
|
|||
});
|
||||
|
||||
/** By default templates will be built into '/dist', then gulp will watch for changes in '/src'. */
|
||||
gulp.task('default', ['build', 'watch']);
|
||||
gulp.task('default', ['dupe', 'postcss', 'less', 'sass', 'build', 'clean', 'watch']);
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/fadeit/responsive-html-email-signature#readme",
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.3.6",
|
||||
"del": "~2.2.0",
|
||||
"gulp": "~3.9.1",
|
||||
"gulp-david": "~0.4.2",
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
"gulp-inline-image-html": "~0.2.1",
|
||||
"gulp-minify-html": "~1.0.5",
|
||||
"gulp-minify-inline": "~0.2.1",
|
||||
"gulp-postcss": "^6.1.1",
|
||||
"gulp-preprocess": "~2.0.0",
|
||||
"gulp-rename": "~1.2.2",
|
||||
"q": "~1.4.1",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
var gulp = require('gulp'),
|
||||
postcss = require('gulp-postcss'),
|
||||
autoprefixer = require('autoprefixer');
|
||||
|
||||
function postcssTask(options){
|
||||
gulp.task('postcss', function () {
|
||||
var processors = [
|
||||
autoprefixer({browsers: ['Android', 'ChromeAndroid', 'FirefoxAndroid', 'Opera Mini', 'Chrome', 'Firefox', 'Explorer', 'Edge', 'iOS', 'Opera', 'Safari', 'ExplorerMobile']}),
|
||||
];
|
||||
|
||||
//@TODO src & dest
|
||||
return gulp.src('./src/*.css')
|
||||
.pipe(postcss(processors))
|
||||
.pipe(gulp.dest('./tmp'));
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = postcssTask;
|
||||
|
|
@ -4,7 +4,8 @@ var gulp = require('gulp');
|
|||
|
||||
function watchTask(options){
|
||||
gulp.task('watch', function(){
|
||||
gulp.watch([options.src + '/**/*.html', options.src + '/**/*.css', options.src + '/**/conf.js'], ['build']);
|
||||
//@todo watch less & sass files
|
||||
gulp.watch([options.src + '/**/*.html', options.src + '/**/*.css', options.src + '/**/conf.js'], ['dupe', 'postcss', 'less', 'sass', 'build', 'clean']);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue