How to use the linefeed function from gulp-util

Find comprehensive JavaScript gulp-util.linefeed code examples handpicked from public code repositorys.

19
20
21
22
23
24
25
26
27
28
opt.indentString = opt.indentString || '  '
opt.target = opt.target || ''
opt.htmlmin = opt.htmlmin || {}
opt.useStrict = opt.useStrict || false
opt.outputModuleName = opt.outputModuleName || false;
opt.separator = gutil.linefeed;

var _module,
    latestFile,
    latestMod;
fork icon25
star icon38
watch icon5

184
185
186
187
188
189
190
191
192


var encodeWorker = function(fileName, varname, opt){
        if (!fileName) throw new PluginError('gulp-concat',  'Missing fileName option for gulp-concat');
        if (!opt) opt = {};
        if (!opt.newLine) opt.newLine = gutil.linefeed;

        var buffer = [];
        var firstFile = null;
fork icon3
star icon9
watch icon8

+ 3 other calls in file

14
15
16
17
18
19
20
21
22

exports.stitch = function(fileName, opts) {
  opts = opts || {};
  if (!fileName) throw new PluginError('gulp-surgeon', 'Missing fileName for destination');

  var newLine = opts.newLine || gutil.linefeed;

  var buffer = [],
      comment, firstFile;
fork icon1
star icon8
watch icon2

45
46
47
48
49
50
51
52
53
54
      incSrc[incPath] = fs.readFileSync(incPath).toString();
      includes.push(incPath);
      return '/*#inport \'' + incPath + '\'*/' + gutil.linefeed;
    }

    return gutil.linefeed;
  });
} // end while

var includePath, streanThis = this, includes = [],
fork icon0
star icon0
watch icon2

+ 5 other calls in file

8
9
10
11
12
13
14
15
16
17

module.exports = function(fileName, opt){
  if (!fileName) throw new PluginError('gulp-concat', 'Missing fileName option for gulp-concat');
  if (!opt) opt = {};
  // to preserve existing |undefined| behaviour and to introduce |newLine: ""| for binaries
  if (typeof opt.newLine !== 'string') opt.newLine = gutil.linefeed;

  var strs = [];
  var firstFile = null;
  var newLineBuffer = opt.newLine ? new Buffer(opt.newLine) : null;
fork icon0
star icon0
watch icon2