mirror of
https://gitea.com/gitea/theme.git
synced 2026-05-03 21:34:09 +08:00
update deps to patch security & remove yarn usage (#65)
This commit is contained in:
36
gulpfile.js
36
gulpfile.js
@@ -16,8 +16,22 @@ var sources = [
|
||||
'theme.toml'
|
||||
];
|
||||
|
||||
gulp.task('default', ['build']);
|
||||
gulp.task('build', ['sass']);
|
||||
var build = function () {
|
||||
return gulp.src('./src/main.scss')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
.pipe(sourcemaps.write('.'))
|
||||
.pipe(gulp.dest('./static/styles'));
|
||||
}
|
||||
|
||||
gulp.task('clean', function () {
|
||||
return gulp.src(['dist', 'static/styles'], { allowEmpty: true })
|
||||
.pipe(clean());
|
||||
});
|
||||
|
||||
gulp.task('watch', function () {
|
||||
return gulp.watch('./src/*.scss', build);
|
||||
});
|
||||
|
||||
gulp.task('release', function () {
|
||||
return gulp.src(sources)
|
||||
@@ -26,19 +40,5 @@ gulp.task('release', function () {
|
||||
.pipe(gulp.dest('dist'))
|
||||
});
|
||||
|
||||
gulp.task('sass', function () {
|
||||
return gulp.src('./src/main.scss')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
.pipe(sourcemaps.write('.'))
|
||||
.pipe(gulp.dest('./static/styles'));
|
||||
});
|
||||
|
||||
gulp.task('clean', function () {
|
||||
return gulp.src(['dist', 'static/styles'])
|
||||
.pipe(clean());
|
||||
});
|
||||
|
||||
gulp.task('watch', function () {
|
||||
return gulp.watch('./src/*.scss', ['sass']);
|
||||
});
|
||||
gulp.task('build', build);
|
||||
gulp.task('default', build);
|
||||
|
||||
Reference in New Issue
Block a user