File: vendors/bootstrap-wysiwyg/gulpfile.js

Recommend this page to a friend!
  Classes of Jorge Castro  >  Gentelella BladeOne  >  vendors/bootstrap-wysiwyg/gulpfile.js  >  Download  
File: vendors/bootstrap-wysiwyg/gulpfile.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 2 months ago
Size: 1,696 bytes
 

Contents

Class file image Download
// Include gulp
var gulp = require('gulp');

// Include our plugins
var jshint = require('gulp-jshint');
var bootlint = require('gulp-bootlint');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var bootlint = require('gulp-bootlint');
var html5lint = require('gulp-html5-lint');

var checkPages = require('check-pages');

// Default task
gulp.task('default', ['js', 'html', 'bootstrap', 'links', 'minify']);

// Lint our JavaScript files
gulp.task('js', function () {
	return gulp.src('src/**/*.js')
		.pipe(jshint())
		.pipe(jshint.reporter('default'));
});

gulp.task('html', function () {
	return gulp.src(['*.html', 'examples/*.html'])
		.pipe(html5lint());
});

// Lint our Bootstrap files
gulp.task('bootstrap', function () {
	return gulp.src(['*.html', 'examples/**/*.html'])
		.pipe(bootlint());
});

// Check for broken and invalid links in the web pages
gulp.task('links', function (callback) {
	var options = {
		pageUrls: [
			'index.html',
			'examples/basic.html',
			'examples/clear-formatting.html',
			'examples/events.html',
			'examples/form-post.html',
			'examples/formatblock-example.html',
			'examples/html-editor.html',
			'examples/multiple-editors.html',
			'examples/simple-toolbar.html'
		],
		checkLinks: true,
		summary: true
	};

	checkPages(console, options, callback);
});

// Minify our JS
gulp.task('minify', function () {
    return gulp.src('src/*.js')
		.pipe(uglify())
        .pipe(rename('bootstrap-wysiwyg.min.js'))
        .pipe(gulp.dest('js'));
});

// Watch files for changes
gulp.task('watch', function () {
    gulp.watch(['src/*.js', 'index.html', 'examples/*.html'], ['js', 'html', 'bootstrap', 'links', 'minify']);
});

For more information send a message to info at phpclasses dot org.