Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function testsBuild() {
// Combine js files and append tests
return gulp.src(getPaths().map(function(f) { return 'site/public/' + f; })) // Get rid of prepend
.pipe(concat('tests/index.js'))
.pipe(gap.prependFile('tests/prepend.js'))
.pipe(gap.appendText('start();'))
.pipe(addsrc.append(getTestPaths().map(function (f) { return 'tests/public/' + f; })))
.pipe(concat('tests/index.js'))
.pipe(gulp.dest('.'));
}
const compileRiot = () =>
gulp.src('./src/riotTags/**')
.pipe(riot({
compact: false,
template: 'pug'
}))
.pipe(concat('riot.js'))
.pipe(gap.prependFile('./eslintfix.js'))
.pipe(gulp.dest('./app/js'));
function build() {
return gulp.src(paths.includes)
.pipe(replace('define([', function() {
var pathObj = path.parse(path.relative('src', this.file.path));
var name = path.format(Object.assign({}, pathObj, { ext: null, base: null }));
return 'define(\'' + name + '\', [';
}))
.pipe(concat('select2.multi-checkboxes.js', { newLine: '\n\n' }))
.pipe(indent())
.pipe(gap.prependFile('build/wrapper.start.js', { trim: false }))
.pipe(gap.appendFile('build/wrapper.end.js', { trim: false, separator: '' }))
.pipe(gulp.dest('build'));
};