mirror of
https://github.com/Xevion/old.xevion.github.io.git
synced 2025-12-06 07:15:32 -06:00
uncommenting build files creates jekyll error
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
const fontsPath = 'fonts/**/*';
|
||||
const destPath = '_site/fonts';
|
||||
// const fontsPath = 'fonts/**/*';
|
||||
// const destPath = '_site/fonts';
|
||||
|
||||
module.exports = gulp => {
|
||||
// module.exports = gulp => {
|
||||
|
||||
gulp.task('fonts', () => {
|
||||
return gulp.src( fontsPath )
|
||||
.pipe(gulp.dest( destPath ));
|
||||
});
|
||||
// gulp.task('fonts', () => {
|
||||
// return gulp.src( fontsPath )
|
||||
// .pipe(gulp.dest( destPath ));
|
||||
// });
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
const imagemin = require('gulp-imagemin');
|
||||
// const imagemin = require('gulp-imagemin');
|
||||
|
||||
const imgPath = 'img/**/*.+(png|jpg|gif|svg)';
|
||||
const destPath = '_site/img';
|
||||
// const imgPath = 'img/**/*.+(png|jpg|gif|svg)';
|
||||
// const destPath = '_site/img';
|
||||
|
||||
module.exports = gulp => {
|
||||
// module.exports = gulp => {
|
||||
|
||||
gulp.task('images', () => {
|
||||
return gulp.src( imgPath )
|
||||
.pipe(imagemin())
|
||||
.pipe(gulp.dest( destPath ));
|
||||
});
|
||||
// gulp.task('images', () => {
|
||||
// return gulp.src( imgPath )
|
||||
// .pipe(imagemin())
|
||||
// .pipe(gulp.dest( destPath ));
|
||||
// });
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
const sass = require('gulp-sass');
|
||||
const prefix = require('gulp-autoprefixer');
|
||||
const cleanCSS = require('gulp-clean-css');
|
||||
// const sass = require('gulp-sass');
|
||||
// const prefix = require('gulp-autoprefixer');
|
||||
// const cleanCSS = require('gulp-clean-css');
|
||||
|
||||
const scssPath = '_scss/*.scss';
|
||||
const destPath = '_site/css';
|
||||
// const scssPath = '_scss/*.scss';
|
||||
// const destPath = '_site/css';
|
||||
|
||||
module.exports = gulp => {
|
||||
// module.exports = gulp => {
|
||||
|
||||
gulp.task('sass', () => {
|
||||
return gulp.src( scssPath )
|
||||
.pipe(sass({
|
||||
includePaths: ['scss'],
|
||||
outputStyle: 'expanded'
|
||||
}))
|
||||
.pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], {cascade: true}))
|
||||
.pipe(cleanCSS({compatibility: 'ie8'}))
|
||||
.pipe(gulp.dest( destPath ))
|
||||
.pipe(gulp.dest('css'));
|
||||
});
|
||||
}
|
||||
// gulp.task('sass', () => {
|
||||
// return gulp.src( scssPath )
|
||||
// .pipe(sass({
|
||||
// includePaths: ['scss'],
|
||||
// outputStyle: 'expanded'
|
||||
// }))
|
||||
// .pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], {cascade: true}))
|
||||
// .pipe(cleanCSS({compatibility: 'ie8'}))
|
||||
// .pipe(gulp.dest( destPath ))
|
||||
// .pipe(gulp.dest('css'));
|
||||
// });
|
||||
// }
|
||||
@@ -1,21 +1,21 @@
|
||||
const jshint = require('gulp-jshint');
|
||||
const babel = require('gulp-babel');
|
||||
const uglify = require('gulp-uglify');
|
||||
// const jshint = require('gulp-jshint');
|
||||
// const babel = require('gulp-babel');
|
||||
// const uglify = require('gulp-uglify');
|
||||
|
||||
const jsPath = '_scripts/*.js';
|
||||
const destPath = '_site/js';
|
||||
// const jsPath = '_scripts/*.js';
|
||||
// const destPath = '_site/js';
|
||||
|
||||
module.exports = gulp => {
|
||||
// module.exports = gulp => {
|
||||
|
||||
gulp.task('scripts', () => {
|
||||
return gulp.src( jsPath )
|
||||
.pipe(jshint())
|
||||
.pipe(babel({
|
||||
presets: ['es2015']
|
||||
}))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest( destPath ))
|
||||
.pipe(gulp.dest( 'js' ));
|
||||
});
|
||||
// gulp.task('scripts', () => {
|
||||
// return gulp.src( jsPath )
|
||||
// .pipe(jshint())
|
||||
// .pipe(babel({
|
||||
// presets: ['es2015']
|
||||
// }))
|
||||
// .pipe(uglify())
|
||||
// .pipe(gulp.dest( destPath ))
|
||||
// .pipe(gulp.dest( 'js' ));
|
||||
// });
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
32
gulpfile.js
32
gulpfile.js
@@ -11,7 +11,13 @@ const babel = require('gulp-babel');
|
||||
const uglify = require('gulp-uglify');
|
||||
const imagemin = require('gulp-imagemin');
|
||||
|
||||
const jekyll = process.platform === 'win32' ? 'jekyll.bat' : 'jekyll';
|
||||
// const sync = require('./build/browsersync');
|
||||
// const sass = require('./build/sass');
|
||||
// const scripts = require('./build/scripts');
|
||||
// const images = require('./build/images');
|
||||
// const fonts = require('./build/fonts');
|
||||
|
||||
const jekyll = process.platform === 'win32' ? 'jekyll.bat' : 'jekyll';
|
||||
|
||||
// Build the Jekyll Site
|
||||
gulp.task('jekyll-build', done => {
|
||||
@@ -33,7 +39,16 @@ gulp.task('browser-sync', ['styles', 'scripts', 'jekyll-build'], () => {
|
||||
});
|
||||
});
|
||||
|
||||
// Compile files from _scss into both _site/css (for live injecting) and site (for future jekyll builds)
|
||||
const scssPath = ['_scss/**/*.scss','_scss/*.scss'];
|
||||
const jsPath = ['_scripts/*.js'];
|
||||
const templatePath = ['index.html', '404.html', '_layouts/*.html', '_includes/*.html', '_data/*.yml', '_posts/*', '_drafts/*', '**/*.html'];
|
||||
|
||||
gulp.task('watch', () => {
|
||||
gulp.watch(scssPath, ['styles', 'jekyll-rebuild']);
|
||||
gulp.watch(jsPath, ['scripts', 'jekyll-rebuild']);
|
||||
gulp.watch(templatePath, ['jekyll-rebuild']);
|
||||
});
|
||||
|
||||
gulp.task('styles', () => {
|
||||
return gulp.src('_scss/*.scss')
|
||||
.pipe(sass({
|
||||
@@ -43,11 +58,9 @@ gulp.task('styles', () => {
|
||||
.pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], {cascade: true}))
|
||||
.pipe(cleanCSS({compatibility: 'ie8'}))
|
||||
.pipe(gulp.dest('_site/css'))
|
||||
// .pipe(browserSync.reload({stream:true}))
|
||||
.pipe(gulp.dest('css'));
|
||||
});
|
||||
|
||||
// Compile files from js folder into both _site/js folder (for live injecting)
|
||||
gulp.task('scripts', () => {
|
||||
return gulp.src('_scripts/*.js')
|
||||
.pipe(jshint())
|
||||
@@ -56,20 +69,9 @@ gulp.task('scripts', () => {
|
||||
}))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('_site/js'))
|
||||
// .pipe(browserSync.reload({stream:true}))
|
||||
.pipe(gulp.dest('js'));
|
||||
});
|
||||
|
||||
const scssPath = ['_scss/**/*.scss','_scss/*.scss'];
|
||||
const jsPath = ['_scripts/*.js'];
|
||||
const templatePath = ['index.html', '404.html', '_layouts/*.html', '_includes/*.html', '_data/*.yml', '_posts/*', '_drafts/*', '**/*.html'];
|
||||
|
||||
gulp.task('watch', () => {
|
||||
gulp.watch(scssPath, ['styles', 'jekyll-rebuild']);
|
||||
gulp.watch(jsPath, ['scripts', 'jekyll-rebuild']);
|
||||
gulp.watch(templatePath, ['jekyll-rebuild']);
|
||||
});
|
||||
|
||||
gulp.task('images', () => {
|
||||
return gulp.src('img/**/*.+(png|jpg|gif|svg)')
|
||||
.pipe(imagemin())
|
||||
|
||||
Reference in New Issue
Block a user