DRAFT | new theme - minimage
This commit is contained in:
parent
5116fe4640
commit
ac8d9e7eb3
90 changed files with 15302 additions and 1 deletions
12
themes/minimage/tasks/_default.js
Normal file
12
themes/minimage/tasks/_default.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
import gulp from 'gulp'
|
||||
import config from '../config'
|
||||
|
||||
gulp.task('default', [], () => {
|
||||
console.log('gulp runnning.');
|
||||
|
||||
gulp.watch(config.source.html + '**/*.pug', ['pug']);
|
||||
gulp.watch(config.source.stylesheets + '**/*.scss', ['sass']);
|
||||
gulp.watch(config.source.javascripts.path + '**/*.js', ['webpack']);
|
||||
});
|
||||
19
themes/minimage/tasks/_pug.js
Normal file
19
themes/minimage/tasks/_pug.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
import gulp from 'gulp'
|
||||
import pug from 'gulp-pug'
|
||||
import plumber from 'gulp-plumber'
|
||||
|
||||
import config from '../config'
|
||||
|
||||
gulp.task('pug', () => {
|
||||
return gulp.src([
|
||||
config.source.html + '**/*.pug',
|
||||
'!' + config.source.html + '**/_*.pug'
|
||||
])
|
||||
.pipe(plumber())
|
||||
.pipe(pug({
|
||||
pretty: true
|
||||
}))
|
||||
.pipe(gulp.dest(config.build.html));
|
||||
});
|
||||
37
themes/minimage/tasks/_sass.js
Normal file
37
themes/minimage/tasks/_sass.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
'use strict';
|
||||
|
||||
import gulp from 'gulp'
|
||||
import sass from 'gulp-sass'
|
||||
import autoprefixer from 'gulp-autoprefixer'
|
||||
import bulkSass from 'gulp-sass-bulk-import'
|
||||
import newer from 'gulp-newer'
|
||||
import plumber from 'gulp-plumber'
|
||||
import notify from 'gulp-notify'
|
||||
import cleancss from 'gulp-clean-css';
|
||||
import packageImporter from 'node-sass-package-importer';
|
||||
|
||||
import config from '../config'
|
||||
|
||||
gulp.task('sass', () => {
|
||||
return gulp.src([
|
||||
config.source.stylesheets + '**/*.scss',
|
||||
'!' + config.source.stylesheets + '**/_*.scss'
|
||||
])
|
||||
.pipe(plumber({
|
||||
errorHandler: notify.onError("Error: <%= error.message %>")
|
||||
}))
|
||||
.pipe(newer(config.build.stylesheets))
|
||||
.pipe(bulkSass())
|
||||
.pipe(sass({
|
||||
importer: packageImporter({
|
||||
extensions: ['.scss', '.css']
|
||||
})
|
||||
}))
|
||||
.pipe(autoprefixer({
|
||||
browsers: config.browsers,
|
||||
cascade: false
|
||||
}))
|
||||
// .pipe(cleancss())
|
||||
.pipe(gulp.dest(config.build.stylesheets));
|
||||
|
||||
});
|
||||
18
themes/minimage/tasks/_webpack.js
Normal file
18
themes/minimage/tasks/_webpack.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
import gulp from 'gulp'
|
||||
import webpack from 'webpack'
|
||||
import webpackStream from 'webpack-stream'
|
||||
import plumber from 'gulp-plumber'
|
||||
import webpackConfig from '../webpack.config.babel.js'
|
||||
import config from '../config'
|
||||
|
||||
gulp.task('webpack', () => {
|
||||
return gulp.src([
|
||||
config.source.javascripts + '**/*.js',
|
||||
'!' + config.source.javascripts + '**/_*js'
|
||||
])
|
||||
.pipe(plumber())
|
||||
.pipe(webpackStream(webpackConfig, webpack))
|
||||
.pipe(gulp.dest(config.build.javascripts.path));
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue