Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
], {read: false});
var injectOptions = {
transform: function(filePath) {
filePath = filePath.replace(mainFolder, '');
return '@import "' + filePath + '";';
},
starttag: '// inject:styles',
endtag: '// endinject',
relative: true,
addRootSlash: false
};
return gulp.src(path.join(mainFolder, 'main.scss'))
.pipe($.inject(injectFiles, injectOptions))
.pipe(wiredep(_.extend({}, conf.wiredep)))
.pipe($.sourcemaps.init())
.pipe($.sass(sassOptions)).on('error', conf.errorHandler('Sass'))
.pipe($.autoprefixer()).on('error', conf.errorHandler('Autoprefixer'))
.pipe($.sourcemaps.write())
.pipe(gulp.dest(path.join(conf.paths.tmp, '/css/')));
}
], {read: false});
var injectOptions = {
transform: function(filePath) {
filePath = filePath.replace(mainFolder, '');
return '@import "' + filePath + '";';
},
starttag: '// inject:styles',
endtag: '// endinject',
relative: true,
addRootSlash: false
};
return gulp.src(path.join(mainFolder, 'main.scss'))
.pipe($.inject(injectFiles, injectOptions))
.pipe(wiredep(_.extend({}, conf.wiredep)))
.pipe($.sourcemaps.init())
.pipe($.sass(sassOptions)).on('error', conf.errorHandler('Sass'))
.pipe($.autoprefixer()).on('error', conf.errorHandler('Autoprefixer'))
.pipe($.sourcemaps.write())
.pipe(gulp.dest(path.join(conf.paths.tmp, '/css/')));
}
var injectOptions = {
transform: function(filePath) {
filePath = filePath.replace(conf.paths.src + '/', '');
return '@import "' + filePath + '";';
},
starttag: '// injector',
endtag: '// endinjector',
addRootSlash: false
};
return gulp.src([
path.join(conf.paths.src, '/index.scss')
])
.pipe($.inject(injectFiles, injectOptions))
.pipe(wiredep(_.extend({}, conf.wiredep)))
.pipe($.sourcemaps.init())
.pipe($.sass(sassOptions)).on('error', conf.errorHandler('Sass'))
.pipe($.autoprefixer()).on('error', conf.errorHandler('Autoprefixer'))
.pipe($.sourcemaps.write())
.pipe(gulp.dest(path.join(conf.paths.tmp, '/serve/<%= appSubFolder %>')))
.pipe(browserSync.reload({ stream: true }));
});
[
path.join(config.paths.app, config.patterns.stylesInput),
'!' + config.entry.styles,
],
{read: false});
const injectOptions = {
addRootSlash: false,
endtag: '// endinject',
starttag: '// inject',
};
return gulp.src(config.entry.styles).
pipe($.inject(injectStyles, injectOptions)).
// Inject Bower Sass dependencies if present.
pipe(wiredep(config.plugins.wiredep)).
pipe($.sourcemaps.init()).
pipe($.sass(config.plugins.sass)).on('error', utils.errorHandler('Sass')).
pipe($.autoprefixer()).on('error', utils.errorHandler('Autoprefixer')).
pipe($.sourcemaps.write(config.paths.maps)).
pipe(gulp.dest(config.paths.serve));
}
gulp.task('wiredep', function() {
log('Wiring the bower dependencies into the html');
var wiredep = require('wiredep').stream;
var options = config.getWiredepDefaultOptions();
// Only include stubs if flag is enabled
var js = args.stubs ? [].concat(config.js, config.stubsjs) : config.js;
return gulp
.src(config.index)
.pipe(wiredep(options))
.pipe(inject(js, '', config.jsOrder))
.pipe(gulp.dest(config.client));
});
gulp.task('wiredep', ['tsc'], function() {
log('Wiring the bower dependencies into the html');
var wiredep = require('wiredep').stream;
var options = config.getWiredepDefaultOptions();
// Only include stubs if flag is enabled
var js = args.stubs ? [].concat(config.js, config.stubsjs) : config.js;
return gulp
.src(config.index)
.pipe(wiredep(options))
.pipe(inject(js, '', config.jsOrder))
.pipe(gulp.dest(config.client));
});
gulp.task('wiredep', function() {
log('Wiring the bower dependencies into the html');
var wiredep = require('wiredep').stream;
var options = config.getWiredepDefaultOptions();
// Only include stubs if flag is enabled
var js = args.stubs ? [].concat(config.js, config.stubsjs) : config.js;
return gulp
.src(config.index)
.pipe(wiredep(options))
.pipe(inject(js, '', config.jsOrder))
.pipe(gulp.dest(config.client));
});
gulp.task('wiredep', function() {
log('Wiring the bower dependencies into the html');
var wiredep = require('wiredep').stream;
var options = config.getWiredepDefaultOptions();
// Only include stubs if flag is enabled
var js = args.stubs ? [].concat(config.js, config.stubsjs) : config.js;
return gulp
.src(config.index)
.pipe(wiredep(options))
.pipe(inject(js, '', config.jsOrder))
.pipe(gulp.dest(config.client));
});
gulp.task('wiredep', function() {
log('Wiring the bower dependencies into the html');
var wiredep = require('wiredep').stream;
var options = config.getWiredepDefaultOptions();
// Only include stubs if flag is enabled
var js = args.stubs ? [].concat(config.js, config.stubsjs) : config.js;
return gulp
.src(config.index)
.pipe(wiredep(options))
.pipe(inject(js, '', config.jsOrder))
.pipe(gulp.dest(config.client));
});
gulp.task('wiredep', function () {
var wiredep = require('wiredep').stream;
gulp.src('app/styles/*.scss')
.pipe(wiredep({
directory: 'app/bower_components'
}))
.pipe(gulp.dest('app/styles'));
gulp.src('app/*.html')
.pipe(wiredep({
directory: 'app/bower_components',
exclude: ['bootstrap-sass-official']
}))
.pipe(gulp.dest('app'));
});