I am struggeling with this modul as it is not generating the needed output.
the source HTML:
<!DOCTYPE html><html lang="en"><head><!-- Encoding--><meta charset="utf-8"><!-- Responsiveness, scaling--><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><!-- IE compatibility modes--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Set the title of you site--><title>C4T marketing - A full service digital agency</title><!-- Set the descritpion of your site--><meta name="description" content="A full service digital agency for social marketing, search marketing, mobile marketing, consumer insights, strategy, creativity & technology"><!-- Set the author of your site--><meta name="author" content="C4T marketing"><!-- Main Bootstrap styling for me--><!-- build:css ../css/minified.css--><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"><!-- Custom styling--><link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.3/css/bootstrapValidator.min.css"><!-- Iconic font - FontAwesome--><link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"><!-- Google fonts--><link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css"><link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"><link href="http://fonts.googleapis.com/css?family=Droid+Serif:400,400italic" rel="stylesheet" type="text/css"><!-- Custom styling--><link href="../css/styles.css" rel="stylesheet"><!-- endbuild--><!-- Site thumbnail--><link rel="image_src" href="thumbnail.png"><!-- App Favicon--><link rel="icon" type="image/png" href="../img/favicon.png"></head><body data-spy="scroll" data-target=".navbar" data-offset="61"><script id="__bs_script__">//<![CDATA[ document.write("<script async src='/browser-sync/browser-sync-client.2.12.3.js'><\/script>".replace("HOST", location.hostname)); //]]></script>
I am struggeling with this modul as it is not generating the needed output.
the source HTML:
<!DOCTYPE html><html lang="en"><head><!-- Encoding--><meta charset="utf-8"><!-- Responsiveness, scaling--><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><!-- IE compatibility modes--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Set the title of you site--><title>C4T marketing - A full service digital agency</title><!-- Set the descritpion of your site--><meta name="description" content="A full service digital agency for social marketing, search marketing, mobile marketing, consumer insights, strategy, creativity & technology"><!-- Set the author of your site--><meta name="author" content="C4T marketing"><!-- Main Bootstrap styling for me--><!-- build:css ../css/minified.css--><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"><!-- Custom styling--><link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.3/css/bootstrapValidator.min.css"><!-- Iconic font - FontAwesome--><link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"><!-- Google fonts--><link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css"><link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"><link href="http://fonts.googleapis.com/css?family=Droid+Serif:400,400italic" rel="stylesheet" type="text/css"><!-- Custom styling--><link href="../css/styles.css" rel="stylesheet"><!-- endbuild--><!-- Site thumbnail--><link rel="image_src" href="thumbnail.png"><!-- App Favicon--><link rel="icon" type="image/png" href="../img/favicon.png"></head><body data-spy="scroll" data-target=".navbar" data-offset="61"><script id="__bs_script__">//<![CDATA[ document.write("<script async src='/browser-sync/browser-sync-client.2.12.3.js'><\/script>".replace("HOST", location.hostname)); //]]></script>
The gulpfile block:
var gulp = require('gulp'), watch = require('gulp-watch'), concat = require('gulp-concat'), uglify = require('gulp-uglify'), stripDebug = require('gulp-strip-debug'), cleanCSS = require('gulp-clean-css'), concatCSS = require('gulp-concat-css'), browserSync = require('browser-sync'), connect = require('gulp-connect-php'), sass = require('gulp-ruby-sass'), notify = require('gulp-notify'), bower = require('gulp-bower'), autoprefixer = require('gulp-autoprefixer'), jsonminify = require('gulp-jsonminify'), gutil = require('gulp-util'), data = require('gulp-data'), jade = require('gulp-jade'), html_i18n = require('gulp-html-i18n'), plumber = require('gulp-plumber'), jshint = require('gulp-jshint'); inject = require('gulp-inject'); useref = require('gulp-useref'); debug = require('gulp-debug'); var onError = function(err) { console.log(err); } config = { srcDir: './src', sassDir: './src/sass', scriptDir: './src/js', bowerDir: './bower_components', nodeDir: './nodemodules', imgDir: './src/img', langDir: './src/lang', svgDir: './src/svg', htmlDir: './src/html', incDir: './src/inc', phpDir: './src/php', distDir: './public/' + (gutil.env.build === 'prod' ? 'release' : 'debug'), production: gutil.env.build === 'prod' }; gulp.task('useref', function() { return gulp.src(config.distDir + '/*/_.html') .pipe(debug()) .pipe(useref({searchPath: config.distDir})) .pipe(gulp.dest(config.distDir)) .on("error", notify.onError(function (error) { return "Error: " + error.message; })) });
Directory Structure
Project Root |---public |---release |---en |---index.html |---de |---index.html |---js |---many js files |---css |---styles.css |---debug
Command to produce file
gulp --build=prod useref
Any hint what the problem is?
Thank you