mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-20 19:02:33 +00:00
Update gulpfile.js
This commit is contained in:
parent
f0f69a4d22
commit
eee457cab6
11
gulpfile.js
11
gulpfile.js
@ -1,18 +1,15 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const eslint = require('gulp-eslint');
|
|
||||||
const shell = require('gulp-shell');
|
const shell = require('gulp-shell');
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
gulp.task('lint', () => gulp.src([
|
gulp.task('lint', shell.task([
|
||||||
'./source/js/**/*.js',
|
'npm run eslint'
|
||||||
'./scripts/**/*.js'
|
]));
|
||||||
]).pipe(eslint())
|
|
||||||
.pipe(eslint.format()));
|
|
||||||
|
|
||||||
gulp.task('lint:stylus', shell.task([
|
gulp.task('lint:stylus', shell.task([
|
||||||
'npx stylint ./source/css/'
|
'npm run stylint'
|
||||||
]));
|
]));
|
||||||
|
|
||||||
gulp.task('validate:config', cb => {
|
gulp.task('validate:config', cb => {
|
||||||
|
|||||||
@ -4,7 +4,9 @@
|
|||||||
"description": "Elegant and powerful theme for Hexo.",
|
"description": "Elegant and powerful theme for Hexo.",
|
||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "gulp"
|
"test": "gulp",
|
||||||
|
"eslint": "eslint source/js scripts/",
|
||||||
|
"stylint": "stylint source/css/"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -25,7 +27,6 @@
|
|||||||
"eslint": "6.8.0",
|
"eslint": "6.8.0",
|
||||||
"eslint-config-theme-next": "1.1.4",
|
"eslint-config-theme-next": "1.1.4",
|
||||||
"gulp": "4.0.2",
|
"gulp": "4.0.2",
|
||||||
"gulp-eslint": "6.0.0",
|
|
||||||
"gulp-shell": "0.8.0",
|
"gulp-shell": "0.8.0",
|
||||||
"js-yaml": "3.13.1",
|
"js-yaml": "3.13.1",
|
||||||
"stylint": "2.0.0"
|
"stylint": "2.0.0"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user