gulp.task('angularjs:html', () => {
  /* Template */
  gulp.src(['src/angularjs/**/*.html', '!src/angularjs/elements/*.html', '!src/angularjs/components/*.html', '!src/angularjs/components/index.html'])
    .pipe(fileinclude({
      prefix: '@@',
      basepath: '@file'
    }))
    .pipe(htmlhint({
      "doctype-first": false,
      "attr-no-duplication": false
    }))
    .pipe(htmlhint.reporter())
    .pipe(templateCache({
      module: 'app.templates',
      standalone: true
    }))
    .pipe(gulp.dest('temp/angularjs/js'))

  /* Index */
  return gulp.src(['src/angularjs/index.html'])
    .pipe(fileinclude({
      prefix: '@@',
      basepath: '@file'
    }))
    .pipe(htmlhint())
    .pipe(htmlhint.reporter())
    .pipe(gulp.dest('temp/angularjs/'))
});
Example #2
0
 gulp.task('htmlhint', function() {
     return gulp.src(htmlViews, {
         cwd : publicDir
     }).pipe(htmlhint({
         htmlhintrc : 'htmlhintrc.json'
     })).pipe(htmlhint.reporter());
 });
Example #3
0
gulp.task('lint:html', function() {
  return gulp
    .src(root.html.template)                                  // Source
    .pipe(htmlhint('.htmlhintrc'))                            // HTMLHint
    .pipe(htmlhint.reporter())                                // Default reporter
    .pipe(notify('HTML validated'));                          // Notification
});
Example #4
0
gulp.task('templates', (cb) => {
  return gulp.src(['src/**/*.html', '!src/index.html', '!src/embed*.html'])
    .pipe(cached('templates'))
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(htmlhint.reporter())
    .pipe(htmlhint.failReporter()).on('error', function(e) {
      notifyError('Error found in a HTML template.');
      new gutil.PluginError('htmlhint', e).toString();
      if (!watching) process.exit(1);
      this.emit('end');
    })
    .pipe(htmlmin({
      collapseWhitespace: true,
      conservativeCollapse: true,
      removeComments: true,
      collapseBooleanAttributes: true,
      removeAttributeQuotes: true,
      removeRedundantAttributes: true,
      removeEmptyAttributes: true
    }))
    .pipe(remember('templates'))
    .pipe(newer('.tmp/templates.js'))
    .pipe(templatecache({ standalone: true }))
    .pipe(gulp.dest('.tmp/'))
});
Example #5
0
	recurse(".", function(filepath, rootdir, subdir, filename) {
		if (/\.html?$/.test(filename)) {
			gulp.src(filepath)
				.pipe(htmlhint())
				.pipe(htmlhint.reporter());
		}
	});
Example #6
0
gulp.task("livereload", function() {
	livereload.listen();
	gulp.src(["index.html"])
		.pipe(htmlhint())
		.pipe(livereload())
		.pipe(htmlhint.reporter());
});
gulp.task('HTMLHint', function(){
    return gulp.src(paths.html.all)
        .pipe(htmlhint({
            "doctype-first": false
        }))
        .pipe(htmlhint.reporter());
});
Example #8
0
 gulp.task('html', function() {
     return gulp.src(opts.html.src)
         .pipe(
             swig({
                 defaults:{
                     cache:false,
                     varControls: ['<%=', '=%>'],
                     tagControls: ['<%', '%>'],
                     cmtControls: ['<#', '#>']
                 },
                 data: {
                     debug:      true,
                     content:    opts.content,
                     dirs:       opts.dirs,
                     exts:       opts.ext.debug,
                     names:      opts.names
                 }
             }
         ))
         .pipe(htmlhint())
         .pipe(htmlhint.reporter())
         .pipe(rename({suffix: '-dbg', extname: '.htm'}))
         .pipe(gulp.dest(opts.html.dest))
         .pipe(htmlmin({collapseWhitespace: true}))
         .pipe(
             rename(function (path) {
                 path.basename = path.basename.replace('-dbg', '');
                 path.extname = '.htm';
             })
         )
         .pipe(gulp.dest(opts.html.dest))
         .pipe(livereload());
 });
					gulp.task(htmlTask, function() {
							htmlReporter.openReporter(projectName, htmlPath);
							return gulp.src(htmlSources)
									.pipe(htmlhint())
									.pipe(htmlhint.reporter(htmlReporter.reporter.bind(htmlReporter)))
									.on('end', htmlReporter.closeReporter.bind(htmlReporter));
					});
Example #10
0
gulp.task('htmlhint', function() {
  return gulp.src('./src/html/*.html')
    .pipe(htmlhint({
      "tag-pair": true,
      }))
    .pipe(htmlhint.reporter());
});
Example #11
0
gulp.task('htmlhint', function() {
    console.log('htmlhint');

    return gulp.src(config.path.tmp + '**/*.html')
      .pipe(htmlhint('.htmlhintrc'))
      .pipe(htmlhint.reporter());
});
Example #12
0
gulp.task('html-hint', () => {
  return (
    gulp.src(CONFIG.path.dist + '/**/*.html')
    .pipe(IS_PROD? plumber.stop() : plumber(CONFIG.plumber))
    .pipe(htmlhint(CONFIG.htmlhint))
    .pipe(htmlhint.reporter())
  );
});
Example #13
0
gulp.task('html', function(){
  gulp.src('app/src/**/*.html')
    .pipe(htmlhint('.htmlhintrc')) // 引数に.htmlhintrcへのパスを指定する
    .pipe(htmlhint.reporter())
    .pipe(htmlhint.failReporter())
    .pipe(gulp.dest('app/product/'))
    .pipe(browserSync.stream());
});
Example #14
0
gulp.task('html-lint', function(){
  return gulp.src(['src/*.html'])
    .pipe(htmlhint())
    .pipe(htmlhint.reporter())
    .on("error", function(err) {
      notifyError("", "HTML")
    })
});
Example #15
0
gulp.task('demo:templates', () => {
  return gulp.src(['demo/**/*.html'])
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(watching ? htmlhint.reporter() : htmlhint.failReporter())
    .pipe(htmlmin(htmlMinOptions))
    .pipe(templatecache({ module: 'demoApp' }))
    .pipe(gulp.dest('.tmp/build'));
})
Example #16
0
gulp.task('code_hint', ['js-cleaning'], function() {
    gulp.src('./_source/_js/*.js')
        .pipe(jshint())
        .pipe(jshint.reporter('default'));
    gulp.src('./_build/dev/*.html')
        .pipe(htmlhint())
        .pipe(htmlhint.reporter());
});
Example #17
0
gulp.task('htmlhint', (cb) => {
	return gulp.src([path.app.html])
		.pipe(gulpif(DEV, debug({title: 'html:'})))
		.pipe(htmlhint({htmlhintrc: path.htmlhintrc}))
		.pipe(htmlhint.reporter())
		.pipe(htmlhint.failReporter())
		//.on('end', cb)
});
Example #18
0
gulp.task('htmlhint', function() {
  return gulp.src('project/*.html')
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(htmlhint.reporter())
    .pipe(browserSync.reload({
      stream: true
    }));
});
Example #19
0
gulp.task('htmlhint', function () {
    var htmlhint = require("gulp-htmlhint");

    return gulp
    .src("./src/**/*.{html,mustache}")
    .pipe(htmlhint({ htmlhintrc: '.htmlhintrc' }))
    .pipe(htmlhint.reporter())
    .pipe(gulpLR(tinyLR))
});
Example #20
0
gulp.task('htmlhint', function() {
  gulp
    .src(paths.htmlhint)
    .pipe(plumber())
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(htmlhint.reporter())
    .pipe(htmlhint.failReporter())
    .on('error', notify.onError());
});
Example #21
0
gulp.task('html', function() {
  var htmlhint = require('gulp-htmlhint');
  return gulp.src(['src/*html'])
    .pipe(newer('app'))
    .pipe(using())
    .pipe(htmlhint())
    .pipe(htmlhint.reporter())
    .pipe(gulp.dest('app'));
});
Example #22
0
module.exports = function () {
    const htmlhint = require('gulp-htmlhint');
    const gulp = require('gulp');
    const config = require('../gulp.config.js')();

    return gulp.src(config.html.src)
        .pipe(htmlhint())
        .pipe(htmlhint.reporter())
};
Example #23
0
		.on('error', function(err) {
			notify.onError({ title: 'checkHtml error!', message: '<%= error.message %>', sound: 'Frog' })(err);
			this.emit('end');
		})
		.pipe(htmlHint.reporter("htmlhint-stylish"))
;
});
gulp.task('copyHtml', function() {

	return gulp.src(htmlPaths.htmlSrc)

		.on('error', function(err) {
			notify.onError({ title: 'copyHtml error!', message: '<%= error.message %>', sound: 'Frog' })(err);
Example #24
0
gulp.task('html', function() {
    gulp.src('src/*.html')
        .pipe(rigger())
        .pipe(htmlhint())
        .pipe(htmlhint.reporter())
        .pipe(gulp.dest('build/'))
        .pipe(reload({
            stream: true
        }));
});
Example #25
0
			return doWhenNotLock(function() {
				return files.pipe(plumber(errrHandler))
					.pipe(replace(/\{\s*%[\s\S]+?%\s*\}/g, ""))
					.pipe(replace(/\{\{[\s\S]+?\}\}/g, escape))
					.pipe(htmlhint({
						"doctype-first": false
					}))
					.pipe(htmlhint.reporter())
					.pipe(htmlhint.failReporter());
			});
Example #26
0
gulp.task('templates', (cb) => {
  return gulp.src(['src/**/*.html'])
    .pipe(htmlhint('.htmlhintrc'))
    .pipe(watching ? htmlhint.reporter() : htmlhint.failReporter())
    .pipe(htmlmin(htmlMinOptions))
    .pipe(templatecache({
      module: config.moduleName,
      transformUrl: url => config.moduleName + '/' + url
    }))
    .pipe(gulp.dest('build/'));
});
Example #27
0
gulp.task('html', function() {
  gulp.src(paths.html, {base: src})
  .pipe(debug({title: 'Minifying HTML page :'}))
  .pipe(changed(dst))
  .pipe(htmlhint({
    "doctype-first": false
  }))
	.pipe(htmlhint.reporter())
  .pipe(minifyHTML({collapseWhitespace: true}))
  .pipe(gulp.dest(dst));
});
Example #28
0
gulp.task('views', function() {
  var htmlhint = require('gulp-htmlhint');
  return gulp.src(['src/views/**/*html'])
    .pipe(newer('app/views'))
    .pipe(using())
    .pipe(htmlhint({
      'doctype-first': false
    }))
    .pipe(htmlhint.reporter())
    .pipe(gulp.dest('app/views'));
});
Example #29
0
pipes.buildHTML = function() {
    return pipes.htmlSources()
        // .pipe(plugins.htmlhint.failReporter())
        .pipe(htmlhint.reporter())
        .pipe(htmlmin({collapseWhitespace: true, removeComments: true}))
        .pipe(ngHtml2Js({
            moduleName: "dugun.log"
        }))
        .pipe(gulpConcat('templates.js'))
        .pipe(gulp.dest('dist/'));
};
Example #30
0
	recurse(".", function(filepath, rootdir, subdir, filename) {
		if (/\.html?$/.test(filename)) {
			gulp.src(filepath)
				.pipe(replace(/([\t ]*)<\!--\s*compatible\s*:\s*(\w+(-\w+)?)\s*-->[\s\S]*?<!--\s*compatible\s*:\s*end\s*-->/g, caniuseData))
				.pipe(replace(/(\t|\n) {4,}/g, function(str, char) {
					return char + tab(parseInt(str.length / 4));
				}))
				.pipe(htmlhint())
				.pipe(htmlhint.reporter())
				.pipe(gulp.dest(subdir || "."));
		}
	});