Gulp plugin for pug-lint
Usage
var gulp = require('gulp'),
puglint = require('gulp-pug-lint');
gulp.task('default', function () {
return gulp
.src('views/*.jade')
.pipe(puglint());
});
Configuration
Plugin will read .pug-lintrc file.
Gulp plugin for pug-lint
License: MIT License
var gulp = require('gulp'),
puglint = require('gulp-pug-lint');
gulp.task('default', function () {
return gulp
.src('views/*.jade')
.pipe(puglint());
});
Plugin will read .pug-lintrc file.
my gulpfile is
var gulp = require('gulp');
let gutil = require('gulp-util');
var pug = require('gulp-pug');
var puglint = require('gulp-pug-lint');
let webpack = require('webpack');
let webpackConfig = require('./webpack.config.js');
let browserSync = require('browser-sync');
let ghPages = require('gulp-gh-pages');
/**
* check pug syntax
*/
gulp.task('checkGulp', function(){
return gulp.src('app/src/html/index.pug')
.pipe(puglint);
})
the detail error is
[10:18:58] TypeError: dest.on is not a function
at DestroyableTransform.Readable.pipe (/home/clyde/npm-global/lib/node_modules/gulp/node_modules/through2/
node_modules/readable-stream/lib/_stream_readable.js:485:8)
at /home/clyde/dev/github/resume/gulpfile.js:15:5
at taskWrapper (/home/clyde/npm-global/lib/node_modules/gulp/node_modules/undertaker/lib/set-task.js:13:15
)
at bound (domain.js:280:14)
at runBound (domain.js:293:12)
at asyncRunner (/home/clyde/npm-global/lib/node_modules/gulp/node_modules/async-done/index.js:36:18)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:609:11)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3
my index.pug is
extends ./layout/resume-layout.pug
include ./mixins/util.pug
block title
title= locals.title
block info
+myInfo(locals.info)
block personal
+session(locals.section_name.personal,'personal',locals.personal)
block experience
+session(locals.section_name.experience,'experience',locals.experience)
block projects
+session(locals.section_name.projects,'projects',locals.projects)
block education
+session(locals.section_name.education,'education',locals.education)
block IEcondition
<!--[if lte IE 8]>
.lte-ie8-comment-wrapper
p.lte-ie8-comment #{locals.lt_ie8_comment}
<![endif]-->
where is wrong? and how to fix? thank you
https://github.com/emartech/gulp-jade-lint/blob/master/config_parser.js is causing an issue running node v0.12 and below(haven't tested any of the io.js versions).
$ gulp
E:\Users\Joshua\Documents\Development\Node\Dashboard\node_modules\gulp-jade-lint\config_parser.js:5
class ConfigParser {
^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (E:\Users\Joshua\Documents\Development\Node\Dashboard\node_modules\gulp-jade-lint\index.js:7:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (E:\Users\Joshua\Documents\Development\Node\Dashboard\tasks\lint.js:4:16)
at Module._compile (module.js:460:26)
Please update pug-lint
, because linter dont understand ${var}
notation
I would like to use the new extends feature for pug-lint config files, which was added in version 2.2.0 of pug-lint. Unfortunately, this gulp plugin still has version 2.1.2 of pug-lint hardcoded as the dependency version. Could this be update to the latest version, or better yet, "^2.3.0"?
gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5`
Reference: https://www.npmjs.com/package/gulp-util
The migration task is actually super straight forward:
npm uninstall gulp-util
npm install fancy-log ansi-colors plugin-errors
Then simply replace the require() and remove the gutil.
prefix. Otherwise the API has not changed.
Just curious, is this plugin still actively maintained?
Add a new pipe handler to fail the gulp task if the linter detects any error.
For example:
https://github.com/sasstools/gulp-sass-lint#sasslintfailonerror
https://github.com/adametry/gulp-eslint#eslintfailonerror
Old pug-lint has bug: pugjs/pug-lint#60
Now this pug-lint bug is fixed, but gulp-pug-lint use old version of pug-lint :(
Hi
The following issue was raised over on the jade-lint
repo; pugjs/pug-lint#48
I was wondering if you'd experienced this issue before at all?
Cheers
Ben
how use custom .pug-lintrc (other path or name) config file?
Because of reasons; pugjs/pug#2184, Jade is being renamed to Pug in the not so distant future. At this point jade-lint
will be deprecated in favour of pug-lint
.
I'll keep you posted as to when this is happening
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.