mirror of
https://github.com/Xevion/old.xevion.github.io.git
synced 2025-12-06 15:15:39 -06:00
@@ -5,19 +5,26 @@ const jekyll = process.platform === 'win32' ? 'jekyll.bat' : 'jekyll';
|
|||||||
|
|
||||||
const scssPath = '_scss/**/*.scss';
|
const scssPath = '_scss/**/*.scss';
|
||||||
const jsPath = '_scripts/*.js';
|
const jsPath = '_scripts/*.js';
|
||||||
const templatePath = ['*.html', '+(_includes|_layouts)/*.html', '*.yml', '_data/*.yml', '_posts/*'];
|
const templatePath = [
|
||||||
|
'*.html',
|
||||||
|
'+(_includes|_layouts)/*.html',
|
||||||
|
'*.yml',
|
||||||
|
'_data/*.yml',
|
||||||
|
'_posts/*',
|
||||||
|
];
|
||||||
|
|
||||||
module.exports = gulp => {
|
module.exports = gulp => {
|
||||||
|
|
||||||
// run `jekyll build`
|
// run `jekyll build`
|
||||||
gulp.task('jekyll-build', done => {
|
gulp.task('jekyll-build', done => {
|
||||||
return cp.spawn(jekyll, ['build'], {stdio: 'inherit'})
|
return cp.spawn(jekyll, ['build'], { stdio: 'inherit' }).on('close', done);
|
||||||
.on('close', done);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// run `jekyll build` with _config_dev.yml
|
// run `jekyll build` with _config_dev.yml
|
||||||
gulp.task('jekyll-dev', done => {
|
gulp.task('jekyll-dev', done => {
|
||||||
return cp.spawn(jekyll, ['build', '--config', '_config.yml,_config_dev.yml'], {stdio: 'inherit'})
|
return cp
|
||||||
|
.spawn(jekyll, ['build', '--config', '_config.yml,_config_dev.yml'], {
|
||||||
|
stdio: 'inherit',
|
||||||
|
})
|
||||||
.on('close', done);
|
.on('close', done);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -29,13 +36,12 @@ module.exports = gulp => {
|
|||||||
gulp.task('serve', ['jekyll-dev'], () => {
|
gulp.task('serve', ['jekyll-dev'], () => {
|
||||||
browserSync.init({
|
browserSync.init({
|
||||||
server: {
|
server: {
|
||||||
baseDir: '_site'
|
baseDir: '_site',
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.watch(scssPath, ['sass', browserSync.reload]);
|
gulp.watch(scssPath, ['sass', browserSync.reload]);
|
||||||
gulp.watch(jsPath, ['scripts', browserSync.reload]);
|
gulp.watch(jsPath, ['scripts', browserSync.reload]);
|
||||||
gulp.watch(templatePath, ['jekyll-rebuild']);
|
gulp.watch(templatePath, ['jekyll-rebuild']);
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ const imgPath = 'img/**/*.+(png|jpg|gif|svg)';
|
|||||||
const destPath = '_site/img';
|
const destPath = '_site/img';
|
||||||
|
|
||||||
module.exports = gulp => {
|
module.exports = gulp => {
|
||||||
|
|
||||||
gulp.task('images', () => {
|
gulp.task('images', () => {
|
||||||
return gulp.src(imgPath)
|
return gulp
|
||||||
|
.src(imgPath)
|
||||||
.pipe(imagemin())
|
.pipe(imagemin())
|
||||||
.pipe(gulp.dest(destPath));
|
.pipe(gulp.dest(destPath));
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,20 +6,23 @@ const scssPath = '_scss/*.scss';
|
|||||||
const destPath = '_site/css';
|
const destPath = '_site/css';
|
||||||
|
|
||||||
module.exports = gulp => {
|
module.exports = gulp => {
|
||||||
|
|
||||||
gulp.task('sass', () => {
|
gulp.task('sass', () => {
|
||||||
return gulp.src(scssPath)
|
return gulp
|
||||||
.pipe(sass({
|
.src(scssPath)
|
||||||
|
.pipe(
|
||||||
|
sass({
|
||||||
includePaths: ['scss'],
|
includePaths: ['scss'],
|
||||||
outputStyle: 'expanded'
|
outputStyle: 'expanded',
|
||||||
}))
|
})
|
||||||
.pipe(prefix({
|
)
|
||||||
|
.pipe(
|
||||||
|
prefix({
|
||||||
browsers: ['last 2 versions'],
|
browsers: ['last 2 versions'],
|
||||||
cascade: false
|
cascade: false,
|
||||||
}))
|
})
|
||||||
|
)
|
||||||
.pipe(cleanCSS({ compatibility: 'ie8' }))
|
.pipe(cleanCSS({ compatibility: 'ie8' }))
|
||||||
.pipe(gulp.dest(destPath))
|
.pipe(gulp.dest(destPath))
|
||||||
.pipe(gulp.dest('css'));
|
.pipe(gulp.dest('css'));
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,16 +5,19 @@ const jsPath = '_scripts/*.js';
|
|||||||
const destPath = '_site/js';
|
const destPath = '_site/js';
|
||||||
|
|
||||||
module.exports = gulp => {
|
module.exports = gulp => {
|
||||||
|
|
||||||
gulp.task('scripts', () => {
|
gulp.task('scripts', () => {
|
||||||
return gulp.src(jsPath)
|
return (
|
||||||
.pipe(eslint({
|
gulp
|
||||||
useEslintrc: true
|
.src(jsPath)
|
||||||
}))
|
.pipe(
|
||||||
|
eslint({
|
||||||
|
useEslintrc: true,
|
||||||
|
})
|
||||||
|
)
|
||||||
.pipe(eslint.format())
|
.pipe(eslint.format())
|
||||||
// .pipe(uglify())
|
// .pipe(uglify())
|
||||||
.pipe(gulp.dest(destPath))
|
.pipe(gulp.dest(destPath))
|
||||||
.pipe(gulp.dest('js'));
|
.pipe(gulp.dest('js'))
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const sass = require('./build/sass');
|
const sass = require('./build/sass');
|
||||||
const scripts = require('./build/scripts');
|
const scripts = require('./build/scripts');
|
||||||
|
|||||||
862
package-lock.json
generated
862
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,14 +11,14 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuscout/eslint-config": "^0.2.1",
|
"@nuscout/eslint-config": "^0.2.1",
|
||||||
"browser-sync": "^2.24.5",
|
"browser-sync": "^2.24.7",
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-autoprefixer": "^5.0.0",
|
"gulp-autoprefixer": "^6.0.0",
|
||||||
"gulp-clean-css": "3.9.4",
|
"gulp-clean-css": "3.10.0",
|
||||||
"gulp-eslint": "5.0.0",
|
"gulp-eslint": "5.0.0",
|
||||||
"gulp-imagemin": "4.1.0",
|
"gulp-imagemin": "4.1.0",
|
||||||
"gulp-sass": "^4.0.1",
|
"gulp-sass": "^4.0.1",
|
||||||
"gulp-uglify": "3.0.0"
|
"gulp-uglify": "3.0.1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user